v45

latestOpenAPI 3.0.1raw.githubusercontent.com2026-06-2223106188.8 KB
Responses

Creates a model response for the given input.

post/openai/v1/responses

Request body

instructionsstring nullable

Inserts a system (or developer) message as the first item in the model's context.

max_output_tokensinteger nullable

An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens.

temperaturenumber nullable

Controls randomness in the response generation. Range: 0 to 2. Lower values produce more deterministic outputs, higher values increase variety and creativity.

top_pnumber nullable

Nucleus sampling parameter that controls the cumulative probability cutoff. Range: 0 to 1. A value of 0.1 restricts sampling to tokens within the top 10% probability mass.

metadataobject nullable

Custom key-value pairs for storing additional information. Maximum of 16 pairs.

parallel_tool_callsboolean nullable

Enable parallel execution of multiple tool calls.

storeboolean nullable

Response storage flag. Note: Currently only supports false or null values.

streamboolean nullable

Enable streaming mode to receive response data as server-sent events.

userstring

Optional identifier for tracking end-user requests. Useful for usage monitoring and compliance.

service_tier'auto' | 'default' | 'flex' nullable

Specifies the latency tier to use for processing the request.

truncation'auto' | 'disabled' nullable

Context truncation strategy. Supported values: auto or disabled.

Example request

{
  "temperature": 1,
  "top_p": 1,
  "user": "user-1234"
}

Response

OK

idstring required

A unique identifier for the response.

object'response' required

The object type, which is always response.

status'completed' | 'failed' | 'in_progress' | 'incomplete' required

The status of the response generation. One of completed, failed, in_progress, or incomplete.

created_atinteger required

The Unix timestamp (in seconds) of when the response was created.

previous_response_idstring nullable

Not supported. Always null.

modelstring required

The model used for the response.

max_output_tokensinteger nullable

The maximum number of tokens configured for the response.

instructionsstring nullable

The system instructions used for the response.

truncation'auto' | 'disabled' required

The truncation strategy used.

metadataobject nullable required

Metadata attached to the response.

temperaturenumber required

The sampling temperature used.

top_pnumber required

The nucleus sampling parameter used.

userstring nullable

The user identifier.

service_tier'auto' | 'default' | 'flex' required

The service tier used for processing.

parallel_tool_callsboolean required

Whether the model can run tool calls in parallel.

storeboolean required

Whether the response was stored.

backgroundboolean

Whether the response was generated in the background.

top_logprobsinteger

The number of top log probabilities returned.

max_tool_callsinteger nullable

The maximum number of tool calls allowed.