认证
authorization string required
所有 API 均使用 Bearer Token 鉴权
获取 API Key:
访问 API Key 管理页面 获取 API Key
用法:
将以下 Header 添加到请求中:
Authorization: Bearer YOUR_API_KEY
参数
model string required
用于请求的模型 ID
Value:vtrix-gpt-5.3-codex
messages array required
表示对话历史的消息对象数组
role
stringrequired消息角色
可选值:
user,assistant,system,developer
content
string | arrayrequired文本字符串或多模态数组。支持文本和图像输入
reasoning_effort string
应用的推理强度级别。更高的强度可能提高复杂编码任务的质量, 但会增加延迟和成本
可选值:low, medium, high, xhigh
默认值:medium
max_tokens integer
生成的最大 token 数量
范围:1 - 128000
temperature number
采样温度
默认值:1.0
范围:0.0 - 2.0
top_p number
核采样参数
默认值:1.0
范围:0.0 - 1.0
stream boolean
是否增量流式传输响应
默认值:false
functions array
模型可能生成 JSON 输入的函数列表
name
stringrequired函数名称
description
string函数功能描述
parameters
object函数接受的参数, 使用 JSON Schema 对象描述
function_call string | object
控制模型如何调用函数
可选值:none, auto, 或 {"name": "function_name"} 强制调用特定函数
默认值:auto
response_format object
模型必须输出的格式。用于结构化输出
type
stringrequired输出格式类型
可选值:
text,json_object,json_schema
响应格式
id string
completion 的唯一标识符
object string
对象类型, 始终为 chat.completion
created integer
创建 completion 时的 Unix 时间戳
model string
用于 completion 的模型
choices array
completion 选择数组
index
integer该选择在数组中的索引
message
object生成的消息
role
string消息作者的角色
content
string消息的内容
finish_reason
string模型停止生成 token 的原因
值:
stop,length,function_call,content_filter
usage object
token 使用统计
prompt_tokens
integer提示中的 token 数量
completion_tokens
integercompletion 中的 token 数量
total_tokens
integer使用的总 token 数量