v27

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-2193427579.9 KB
Responses

Create a model response.

Create a model response.

post/v1/responses

Request body

modelstring required

The underlying LLM used for completions.

backgroundboolean

Whether to run the model response in the background. When true, returns immediately with status 'queued'.

instructionsstring nullable

Instructions to guide the model's behavior.

parallel_tool_callsboolean nullable

Whether to enable parallel tool calls.

previous_response_idstring nullable

Optional ID of a previous response to continue from.

prompt_cache_keystring nullable

A key to use when reading from or writing to the prompt cache.

conversationstring nullable

Optional ID of a conversation to add the response to.

storeboolean

Whether to store the response in the database.

streamboolean

Whether to stream the response.

temperaturenumber nullable

Sampling temperature.

top_pnumber nullable

Nucleus sampling parameter that controls response diversity (lower values increase focus).

frequency_penaltynumber nullable

Penalizes new tokens based on their frequency in the text so far.

includeResponseItemInclude[]

Additional fields to include in the response.

max_infer_itersinteger nullable

Maximum number of inference iterations.

max_tool_callsinteger nullable

Max number of total calls to built-in tools that can be processed in a response.

max_output_tokensinteger nullable

Upper bound for the number of tokens that can be generated for a response.

service_tier'auto' | 'default' | 'flex' | 'priority'

The service tier for the request.

metadataobject nullable

Dictionary of metadata key-value pairs to attach to the response.

safety_identifierstring nullable

A stable identifier used to associate the request with an end user, for safety monitoring. Echoed back on the response.

truncation'auto' | 'disabled'

Controls how the service truncates input when it exceeds the model context window.

top_logprobsinteger nullable

The number of most likely tokens to return at each position, along with their log probabilities.

presence_penaltynumber nullable

Penalizes new tokens based on whether they appear in the text so far.

Response

An OpenAIResponseObject or a stream of OpenAIResponseObjectStream.

backgroundboolean
created_atinteger required
completed_atinteger nullable
frequency_penaltynumber
idstring required
modelstring required
object'response'
parallel_tool_callsboolean
previous_response_idstring nullable
prompt_cache_keystring nullable
statusstring required
temperaturenumber
top_pnumber
top_logprobsinteger
truncation'auto' | 'disabled'

Controls how the service truncates input when it exceeds the model context window.

instructionsstring nullable
max_tool_callsinteger nullable
max_output_tokensinteger nullable
service_tierstring
{"stackTrail":"components:schemas:OpenAIResponseObject:properties:metadata","oasType":"schema","type":"unknown"}
presence_penaltynumber
storeboolean required
safety_identifierstring nullable