Endpoint
Authorization: Bearer lx1_.... This is the surface a Codex provider
block with wire_api = "responses" talks to — see the
Codex CLI guide.
Request parameters
On reasoning models a very small
max_output_tokens can be consumed entirely by hidden
reasoning, leaving an empty output_text. If you see empty outputs, raise the budget —
4,000+ is a safe floor for reasoning models.Example
Response (shape)
Streaming
Withstream: true the response is an SSE event stream — typed events such as
response.output_text.delta as text generates, closed by response.completed. The
OpenAI SDKs’ responses.stream(...) helpers consume it unchanged. See
Streaming.
Stateful conversations
Responses is the one chat dialect that can hold the conversation for you. Setstore: true and the response is persisted under your key; a later turn then chains on it
by id and sends only the new input, instead of re-uploading the whole transcript. This
is the OpenAI SDK’s default conversation pattern, and it works here unchanged.
Turn 1 — store it
Turn 2 — chain on it
Reading a stored response back
404, never their response.
Chaining on an unknown or expired id is a
404 with an invalid_request_error body,
naming only the id you sent. That is deliberate: a loud failure beats a conversation that
silently lost its history and answers as if the earlier turns never happened.store: true nothing is persisted
for chaining and GET /v1/responses/{id} has nothing to return — send the full transcript
each turn instead, exactly like Chat Completions.
Errors
Standard status codes, OpenAI-shaped bodies. Retry on429/5xx with backoff and honor
retry-after. Full reference: Errors.