Skip to main content
POST
cURL
OpenAI’s Responses wire format, served by the same models as everything else here. Codex and other Responses clients work by changing base_url alone.

Stateless, on purpose

The real Responses API can store a response and continue from it later. This one keeps nothing, and says so instead of pretending:
  • store must be false. Leaving it out means true on OpenAI’s API, so a call without it is rejected rather than quietly not stored.
  • previous_response_id is rejected. Send the whole conversation in input on every call — earlier function_call and function_call_output items included.
  • There is no GET or DELETE /responses/{id}.
Clients that already resend the full history each turn, Codex among them, need none of the stateful half.

Tools

Only {"type": "function", ...} tools reach the model. Tools of any other type — hosted tools, MCP servers, namespaced groups — are dropped from the list rather than failing the call, so the model never learns they exist and cannot call them.

Streaming

stream: true returns Responses events, ending at response.completed, which carries the usage. There is no [DONE] sentinel.

Authorizations

Authorization
string
header
required

Authorization: Bearer <your API key>. On /v1/messages, the Anthropic-style x-api-key: <your API key> header is accepted instead.

Body

application/json
model
string
required

Which model answers the call. A bare slug for platform models (deepseek-v4.1-flash), or a full resource name for something your account owns (accounts/{account}/models/{model}, or a deployment). Never an upstream vendor's own name.

input
required

The conversation, oldest first: a string, or a list of message, function_call and function_call_output items. Send all of it on every call.

store
boolean
required

Must be false. This endpoint keeps nothing to retrieve later, so a call that leaves store out or sets it to true is rejected rather than quietly not stored.

instructions
string

Instructions that sit outside the conversation, sent to the model as a system message. Counted as input tokens.

max_output_tokens
integer

Ceiling on how many tokens may be generated. Omit it to use the model's own default.

Required range: x >= 1
temperature
number

How much randomness to allow when picking each token. Lower is more repeatable, higher is more varied.

Required range: 0 <= x <= 2
top_p
number

Nucleus sampling: only consider the most likely tokens up to this share of the probability mass. Tune this or temperature, not both.

Required range: 0 <= x <= 1
stream
boolean
default:false

Return the answer as server-sent events as it is generated, instead of one response at the end. The last data event carries the usage numbers either way.

tools
object[]

Function definitions in the Responses shape ({type: "function", name, description, parameters}). Tools of any other type are dropped from the list, so the model never learns they exist.

tool_choice

Whether the model may, must, or must not call a tool: auto, none, required, or {type: "function", name}.

reasoning
object

Ask for the model's reasoning. effort is low, medium or high (minimal counts as low); an object without effort asks for medium. Only models that reason accept it.

previous_response_id
string | null

Not supported: send the whole conversation in input instead.

Not supported. Sending it returns INVALID_REQUEST.

Response

OK. With stream: true the same call answers text/event-stream instead, as Responses events: response.created, the output item and delta events, and response.completed, which carries usage and ends the stream. There is no [DONE] line. A failure part-way through adds an error event before the stream closes.

id
string
required
object
string
required
Allowed value: "response"
status
enum<string>
required
Available options:
completed,
incomplete
model
string
required
output
object[]
required
usage
object
required
store
boolean
required
incomplete_details
object