Endpoint
wire_api = "chat" was removed), so this is what lets Codex — and any other Responses-only client — use RouterBase as its provider.
Using RouterBase with Codex
Add a provider to~/.codex/config.toml:
store: false) is exactly what this endpoint expects — no extra configuration needed.
Request Headers
Request Body
string
required
Model ID (chat models only). See the Model Overview or the live Models API.
string | array
required
A plain string (treated as a single user message) or an array of input items. Supported item types:
message (roles user, assistant, system, developer — developer maps to system), function_call, function_call_output, and reasoning (accepted and skipped). Message content may be a string or typed parts (input_text, output_text, input_image).string
System-level instructions, prepended as a system message.
integer
Maximum tokens to generate.
number
Sampling temperature, 0–2.
number
Nucleus sampling probability, 0–1.
boolean
If
true, the response is a Server-Sent Events stream of response.* events: response.created → response.output_item.added → response.output_text.delta … → response.output_item.done → response.completed. Function-call items arrive complete in response.output_item.done.array
Function tools in the flat Responses shape:
{"type": "function", "name": "...", "description": "...", "parameters": {...}}. Server-side tool types (web_search, …) are accepted and silently dropped — RouterBase does not host them; the model simply does not get that tool.string | object
"auto", "none", "required", or {"type": "function", "name": "..."}.Stateless by design
previous_response_id and server-side conversation storage are not supported — requests carrying previous_response_id return a 400 with guidance. Send the full item history each turn (with store: false if your client sends it; the field is accepted and ignored). This is the default mode for Codex with custom providers and for most Responses SDK usage.
Examples
Response
output array carries function_call items (call_id, name, arguments); return each result as a function_call_output item in the next request’s input.