Files
build_infra/0_笔记/ai/ai.http
T
2026-06-16 10:23:51 +08:00

47 lines
845 B
HTTP

@host = 127.0.0.1
#@host = [2409:8a3c:2730:1840:ad89:a71:d6e1:ff67]
#@host = 10.126.126.1
@port = 8317
@bearer = a1234567
@managementKey = a1234567
# http://127.0.0.1:8317/v1
###
GET http://{{host}}:{{port}}/v1/models
Authorization: Bearer {{bearer}}
### usage
GET http://{{host}}:{{port}}/v0/management/usage
X-Management-Key: a1234567
### Chat Completions
POST http://{{host}}:{{port}}/v1/chat/completions
Authorization: Bearer {{bearer}}
Content-Type: application/json
{
"model": "gpt-5.4",
"messages": [
{
"role": "user",
"content": "C++ hello world"
}
]
}
###
### Responses API
POST http://{{host}}:{{port}}/v1/responses
Authorization: Bearer {{bearer}}
Content-Type: application/json
{
"model": "gpt-5.4",
"input": "C++"
}