Skip to main content
POST
/
v1
/
chat
/
completions
cURL
curl --request POST \
  --url https://proxy.innk.cc/v1/chat/completions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "<string>",
  "messages": [
    {
      "role": "user",
      "content": "Hello, how are you?"
    }
  ],
  "stream": false,
  "max_completion_tokens": 123,
  "temperature": 1,
  "top_p": 1
}
'
{
  "id": "<string>",
  "object": "<string>",
  "created": 123,
  "model": "<string>",
  "choices": [
    {
      "index": 123,
      "message": {
        "role": "<string>",
        "content": "<string>"
      },
      "finish_reason": "<string>"
    }
  ],
  "usage": {
    "prompt_tokens": 123,
    "completion_tokens": 123,
    "total_tokens": 123,
    "prompt_tokens_details": {
      "cached_tokens": 123,
      "audio_tokens": 123
    },
    "completion_tokens_details": {
      "reasoning_tokens": 123,
      "audio_tokens": 123,
      "accepted_prediction_tokens": 123,
      "rejected_prediction_tokens": 123
    }
  }
}

Authorizations

Authorization
string
header
required

身份验证标头格式为 Bearer <API_KEY>,其中 <API_KEY> 是您的API令牌。

Body

application/json
model
string
required

要使用的模型的 ID。

messages
object[]
required

以聊天格式生成聊天完成的消息。

stream
boolean
default:false

是否流式对话

max_completion_tokens
integer

最大完成令牌数

temperature
number
default:1

温度

top_p
number
default:1

核采样

Response

200 - application/json

Model response

id
string
required

请求ID标识符

object
string
required

对象类型

created
integer
required

创建时间

model
string
required

模型版本

choices
object[]
required
usage
object
required

用量