跳转到主要内容
POST
POST /v1/responses

授权

Authorization
string
header
必填

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

请求体

application/json
access_programs
object | null
background
boolean | null
context_management
object[] | null
conversation
include
enum<string>[] | null
可用选项:
web_search_call.action.sources,
code_interpreter_call.outputs,
computer_call_output.output.image_url,
file_search_call.results,
message.input_image.image_url,
message.output_text.logprobs,
reasoning.encrypted_content
input
instructions
string | null
max_output_tokens
integer<int64> | null
max_tool_calls
integer<int64> | null
metadata
object | null
model
string | null
moderation
object | null
multi_agent
object | null
parallel_tool_calls
boolean | null
previous_response_id
string | null
prompt
object | null
prompt_cache_key
string | null
prompt_cache_options
object | null
prompt_cache_retention
enum<string> | null
可用选项:
in_memory,
24h
reasoning
object | null
safety_identifier
string | null
service_tier
enum<string> | null
可用选项:
auto,
default,
flex,
scale,
priority,
fast,
ultrafast
store
boolean | null
stream
boolean | null
stream_options
object | null
temperature
number | null
text
object | null
tool_choice
可用选项:
none,
auto,
required
tools
object[] | null
top_logprobs
integer<int64> | null
top_p
number | null
truncation
enum<string> | null
可用选项:
auto,
disabled
user
string | null

响应

Successful protocol response

created_at
integer<int64>
必填
error
object | null
必填
id
string
必填
incomplete_details
object | null
必填
instructions
必填
metadata
object | null
必填
model
string
必填
object
enum<string>
必填
可用选项:
response
output
object[]
必填

Native output items; input-only messages/references/triggers are excluded. Same-shape items are reused; response-specific required fields use separate structs.

parallel_tool_calls
boolean
必填
temperature
number | null
必填
tool_choice
必填
可用选项:
none,
auto,
required
tools
object[]
必填
top_p
number | null
必填
access_programs
object | null

Newer API responses report this even when null; older responses omit it.

background
boolean | null
completed_at
integer<int64> | null
conversation
object | null
max_output_tokens
integer<int64> | null
max_tool_calls
integer<int64> | null
moderation
object | null
output_text
string | null
previous_response_id
string | null
prompt
object | null
prompt_cache_diagnostics
object
prompt_cache_key
string | null
prompt_cache_options
object | null
prompt_cache_retention
enum<string> | null
可用选项:
in_memory,
24h
reasoning
object | null
safety_identifier
string | null
service_tier
enum<string> | null
可用选项:
auto,
default,
flex,
scale,
priority,
fast,
ultrafast
status
enum<string> | null
可用选项:
completed,
failed,
in_progress,
cancelled,
queued,
incomplete
text
object | null
top_logprobs
integer<int64> | null
truncation
enum<string> | null
可用选项:
auto,
disabled
usage
object | null
user
string | null