Skip to main content
POST

授权

Authorization
string
header
必填

所有接口均需要使用Bearer Token进行认证

使用时在请求头中添加:

Authorization: Bearer YOUR_API_KEY

请求体

application/json
model
string
必填

模型名称

示例:

"gpt-5.4"

input
必填

用于生成响应的文本输入或消息列表

stream
boolean
默认值:false

是否流式返回响应

temperature
number

采样温度 (0-2)

必填范围: 0 <= x <= 2
max_output_tokens
integer

最大输出token生成数

top_p
number

核采样参数 (0-1)

必填范围: 0 <= x <= 1
previous_response_id
string

上一个响应的ID,用于多轮对话

instructions
string

系统级指令

tools
object[]

可用工具列表

text
object

文本输出格式配置

响应

响应对象

id
string

响应唯一ID

示例:

"resp_abc123"

object
enum<string>

对象类型

可用选项:
response
created_at
integer

创建时间戳

示例:

1757165031

model
string

使用的模型

status
enum<string>

响应状态

可用选项:
completed,
failed,
in_progress,
incomplete
示例:

"completed"

output
object[]

响应输出内容列表

usage
object

用量统计