Creates a streaming or non-streaming response using OpenResponses API format
Authentication
AuthorizationBearer
API key as bearer token in Authorization header
Request
This endpoint expects an object.
inputstring or list of objectsOptional
Input for a response request - can be a string or array of items
instructionsstring or nullOptional
metadatamap from strings to stringsOptional
Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed.
toolslist of objectsOptional
tool_choiceenum or objectOptional
parallel_tool_callsboolean or nullOptional
modelstringOptional
modelslist of stringsOptional
textobjectOptional
Text output configuration including format and verbosity
reasoningobjectOptional
Configuration for reasoning mode in the response
max_output_tokensintegerOptional
temperaturedoubleOptional
top_pdoubleOptional
top_logprobsintegerOptional
max_tool_callsintegerOptional
presence_penaltydoubleOptional
frequency_penaltydoubleOptional
top_kintegerOptional
image_configmap from strings to strings or doublesOptional
Output modalities for the response. Supported values are "text" and "image".
Allowed values:
prompt_cache_keystring or nullOptional
previous_response_idstring or nullOptional
promptobjectOptional
includelist of enums or nullOptional
Allowed values:
backgroundboolean or nullOptional
safety_identifierstring or nullOptional
storefalseOptional
service_tierenum or nullOptionalDefaults to auto
Allowed values:
truncationenumOptional
Allowed values:
streambooleanOptionalDefaults to false
providerobject or nullOptional
When multiple model providers are available, optionally indicate your routing preference.
pluginslist of objectsOptional
Plugins you want to enable for this request, including their settings.
userstringOptional<=256 characters
A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters.
session_idstringOptional<=256 characters
A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
traceobjectOptional
Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
Response
Successful response
completed_atinteger
created_atinteger
errorobject
Error information returned from the API
frequency_penaltydouble
idstring
incomplete_detailsobject
instructionsstring or list of objects or any
metadatamap from strings to strings
Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed.
modelstring
objectenum
Allowed values:
parallel_tool_callsboolean
presence_penaltydouble
statusenum
temperaturedouble
tool_choiceenum or object
toolslist of objects
top_pdouble
backgroundboolean or null
max_output_tokensinteger
max_tool_callsinteger
outputlist of objects
output_textstring
previous_response_idstring or null
promptobject
prompt_cache_keystring or null
reasoningobject
safety_identifierstring or null
service_tierstring or null
storeboolean
textobject
Text output configuration including format and verbosity