Skip to main content
POST
创建响应

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

请求体

application/json
model
enum<string>
必填

模型 ID

可用选项:
gpt-5.5
示例:

"gpt-5.5"

input
object[]
必填

供模型生成响应的文本或图像内容。

Minimum array length: 1
示例:
stream
boolean
默认值:false

为 true 时通过 SSE 流式传输响应增量。

temperature
number
默认值:1

采样温度,值越高输出越随机。

必填范围: 0 <= x <= 2
示例:

1

frequency_penalty
number
默认值:0

根据 Token 在文本中出现的频率对其进行惩罚。

必填范围: -2 <= x <= 2
presence_penalty
number
默认值:0

对已在文本中出现过的 Token 进行惩罚。

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

最大输出 Token 数。

必填范围: x >= 16
stop
string

触发停止生成的序列。

n
integer
默认值:1

生成的响应候选数量。

必填范围: x >= 1
text
object

模型文本响应的配置选项。

reasoning
object

模型推理/思考的配置。

tools
object[]

模型可调用的工具列表。

tool_choice
string

控制模型调用哪个(如果有)工具。

store
boolean
默认值:true

是否存储生成的响应以供后续通过 API 检索,默认为 true。

user
string

代表终端用户的唯一标识符。

响应

响应生成成功

id
string
必填
示例:

"resp_0ed94fe7ec73cf560169afd97bba648194b8661d445cfa4244"

object
string
必填
示例:

"response"

created_at
integer
必填

响应创建时的 Unix 时间戳。

示例:

1773132155

model
string
必填
示例:

"gpt-5.5"

status
enum<string>
必填
可用选项:
completed,
failed,
in_progress,
incomplete
示例:

"completed"

output
object[]
必填
usage
object
必填
completed_at
integer

响应完成时的 Unix 时间戳。

示例:

1773132156

reasoning
object
text
object