For the complete documentation index, see llms.txt. This page is also available as Markdown.

Responses

Create a response

post

Creates a streaming or non-streaming response using OpenResponses API format

Authorizations
AuthorizationstringRequired

API key as bearer token in Authorization header

Body

Request schema for Responses endpoint

inputany ofOptional

Input for a response request - can be a string or array of items

Example: [{"role":"user","content":"What is the weather today?"}]
stringOptional
or
instructionsstring · nullableOptional
tool_choiceany ofOptional
string · enumOptionalPossible values:
or
string · enumOptionalPossible values:
or
string · enumOptionalPossible values:
or
or
parallel_tool_callsboolean · nullableOptional
modelstringOptional
modelsstring[]Optional
max_output_tokensnumber · nullableOptional
temperaturenumber · max: 2 · nullableOptional
top_pnumber · nullableOptional
top_logprobsinteger · max: 20 · nullableOptional
max_tool_callsinteger · nullableOptional
presence_penaltynumber · min: -2 · max: 2 · nullableOptional
frequency_penaltynumber · min: -2 · max: 2 · nullableOptional
top_knumberOptional
prompt_cache_keystring · nullableOptional
previous_response_idstring · nullableOptional
backgroundboolean · nullableOptional
safety_identifierstring · nullableOptional
storebooleanOptionalDefault: false
service_tierstring · enumOptionalDefault: autoPossible values:
truncationall ofOptional
string · enum · nullableOptionalPossible values:
and
anyOptionalExample: auto
streambooleanOptionalDefault: false
routestring · enum · nullableOptionalDeprecated

DEPRECATED Use providers.sort.partition instead. Backwards-compatible alias for providers.sort.partition. Accepts legacy values: "fallback" (maps to "model"), "sort" (maps to "none").

Possible values:
userstring · max: 128Optional

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 128 characters.

session_idstring · max: 128Optional

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 128 characters.

Responses
post
/responses

Last updated

Was this helpful?