v53

latestOpenAPI 3.1.0Apache-2.0raw.githubusercontent.com2026-08-021596144.5 KB
Responses

Create a model response

Creates a model response using the OpenAI-compatible Responses API. The request accepts either a single text input or a list of input items (allowing batched, multi-turn input in one request), and the result can be streamed to the client as it is generated.

Not every provider implements the Responses API. Requests routed to a provider that does not support it return 400 Bad Request with an explanatory error message; use /chat/completions for those providers.

post/responses

Query parameters

provider'ollama' | 'ollama_cloud' | 'groq' | 'llamacpp' | 'openai' | 'cloudflare' | 'cohere' | 'anthropic' | 'deepseek' | 'google' | 'mistral' | 'minimax' | 'moonshot' | 'nvidia' | 'zai'

Specific provider to use (default determined by model)

Request body

modelstring required

Model ID used to generate the response.

instructionsstring nullable

A system (or developer) message inserted into the model's context. When used with previous_response_id, instructions from previous responses are not carried over.

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.

streamboolean

If set to true, the model response data is streamed to the client as it is generated using server-sent events.

temperaturenumber float nullable

What sampling temperature to use, between 0 and 2. Higher values make the output more random; lower values make it more focused.

top_pnumber float nullable

An alternative to sampling with temperature, called nucleus sampling, where the model considers the tokens with top_p probability mass.

previous_response_idstring nullable

The unique ID of the previous response to the model. Use this to create multi-turn conversations.

storeboolean

Whether to store the generated model response for later retrieval.

backgroundboolean

Whether to run the model response in the background. Useful for long-running or batched requests.

parallel_tool_callsboolean

Whether to allow the model to run tool calls in parallel.

metadataobject

Set of up to 16 key-value pairs that can be attached to the object and returned when retrieving the response.

userstring

A stable identifier for your end-users, used to help detect and prevent abuse.

Response

Successful response

idstring required

Unique identifier for this response.

objectstring required

The object type, which is always response.

created_atinteger required

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

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

The status of the response generation.

modelstring required

The model used to generate the response.

instructionsstring nullable

The system/developer message used to generate the response.

max_output_tokensinteger nullable

An upper bound for the number of generated tokens.

previous_response_idstring nullable

The unique ID of the previous response, if any.

temperaturenumber float nullable
top_pnumber float nullable
metadataobject