Endpoints
Responses API (OpenAI Codex)
OpenAI-compatible Responses API for the Codex CLI and other Responses-format clients.
Pendra implements the OpenAI Responses API at
/v1/responses (also aliased at
/api/v1/responses) so the OpenAI Codex CLI works without
modification when pointed at Pendra. The Python and JavaScript examples
use the official OpenAI SDKs.
model string required input string | array required store boolean previous_response_id is not supported and returns a
400.
Response
Pendra returns the OpenAI Responses envelope (see example).
output is an array of items; each message item
carries an array of content blocks. status is
completed on a clean finish, or incomplete when
the model hits a stop condition before exhausting
max_output_tokens.
Model mapping
Codex hard-codes OpenAI model names like gpt-5-codex and
gpt-5.5. Pendra falls back to an available chat model on
your worker pool when an unknown OpenAI model name is requested, so Codex
works out of the box. To pin a specific Pendra model, set
model in your Codex config — see
Integrations → Codex.
Streaming
The Responses API uses its own event taxonomy
(response.output_text.delta, response.completed, etc.).
Pendra emits these events from streamed chat completions; the Codex CLI
consumes them directly.
event: response.created
data: {"type":"response.created","response":{"id":"resp_01HZ8b","object":"response","status":"in_progress","model":"qwen3.6:27b"}}
event: response.output_text.delta
data: {"type":"response.output_text.delta","item_id":"msg_01","output_index":0,"content_index":0,"delta":"Hello"}
event: response.completed
data: {"type":"response.completed","response":{"id":"resp_01HZ8b","status":"completed","usage":{"input_tokens":8,"output_tokens":2,"total_tokens":10}}} Quick start
The full Codex setup — config file, env vars, and a model pin — lives in Integrations → Codex.