跳转到主要内容
POST
/
v1
/
chat
/
completions
Chat Completions Format
curl --request POST \
  --url https://utoken-test.uuzu.com/v1/chat/completions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "<string>",
  "messages": [
    {
      "content": "<string>",
      "name": "<string>",
      "tool_calls": [
        {
          "id": "<string>",
          "type": "<string>",
          "function": {
            "name": "<string>",
            "arguments": "<string>"
          }
        }
      ],
      "tool_call_id": "<string>",
      "reasoning_content": "<string>"
    }
  ],
  "temperature": 1,
  "top_p": 1,
  "n": 1,
  "stream": false,
  "stream_options": {
    "include_usage": true
  },
  "stop": "<string>",
  "max_tokens": 123,
  "max_completion_tokens": 123,
  "presence_penalty": 0,
  "frequency_penalty": 0,
  "logit_bias": {},
  "user": "<string>",
  "tools": [
    {
      "type": "<string>",
      "function": {
        "name": "<string>",
        "description": "<string>",
        "parameters": {}
      }
    }
  ],
  "response_format": {
    "json_schema": {}
  },
  "seed": 123,
  "modalities": [],
  "audio": {
    "voice": "<string>",
    "format": "<string>"
  }
}
'
{
  "id": "<string>",
  "object": "<string>",
  "created": 123,
  "model": "<string>",
  "choices": [
    {
      "index": 123,
      "message": {
        "content": "<string>",
        "name": "<string>",
        "tool_calls": [
          {
            "id": "<string>",
            "type": "<string>",
            "function": {
              "name": "<string>",
              "arguments": "<string>"
            }
          }
        ],
        "tool_call_id": "<string>",
        "reasoning_content": "<string>"
      }
    }
  ],
  "usage": {
    "prompt_tokens": 123,
    "completion_tokens": 123,
    "total_tokens": 123,
    "prompt_tokens_details": {
      "cached_tokens": 123,
      "text_tokens": 123,
      "audio_tokens": 123,
      "image_tokens": 123
    },
    "completion_tokens_details": {
      "text_tokens": 123,
      "audio_tokens": 123,
      "reasoning_tokens": 123
    }
  },
  "system_fingerprint": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.utoken.wgame-hk.com/llms.txt

Use this file to discover all available pages before exploring further.

授权

Authorization
string
header
必填

Use Bearer Token authentication Format: Authorization: Bearer sk-xxxxxx

请求体

application/json
model
string
必填

Model ID

示例:

"gpt-4"

messages
object[]
必填

List of conversation messages

temperature
number
默认值:1

Sampling Temperature

必填范围: 0 <= x <= 2
top_p
number
默认值:1

Nucleus sampling parameter (top_p)

必填范围: 0 <= x <= 1
n
integer
默认值:1

Number of completions to generate

必填范围: x >= 1
stream
boolean
默认值:false

Enable streaming response

stream_options
object
stop

Stop sequences

max_tokens
integer

Maximum tokens for generation

max_completion_tokens
integer

Maximum tokens for completion

presence_penalty
number
默认值:0
必填范围: -2 <= x <= 2
frequency_penalty
number
默认值:0
必填范围: -2 <= x <= 2
logit_bias
object
user
string
tools
object[]
tool_choice
可用选项:
none,
auto,
required
response_format
object
seed
integer
reasoning_effort
enum<string>

Reasoning effort level (for reasoning-capable models)

可用选项:
low,
medium,
high
modalities
enum<string>[]
可用选项:
text,
audio
audio
object

响应

Response created successfully

id
string
object
string
示例:

"chat.completion"

created
integer
model
string
choices
object[]
usage
object
system_fingerprint
string