Responses API
POST https://gateway.primex.work/v1/responses
The OpenAI Responses API, used by Codex CLI and OpenAI SDK "responses" mode.
It supports agentic tool use (function, custom/grammar, and built-in tools like
tool_search) that the chat endpoint cannot represent.
Passthrough vs rewrite
How a /v1/responses request is handled depends on the model:
- Responses-passthrough models — forwarded natively; the reply comes back in
Responses shape (
output[]). These are the first-party Azure OpenAI text models:gpt-5.6-sol,gpt-5.6-luna,gpt-5.6-terra,gpt-5.5,gpt-5.4-mini,gpt-5.4-nano,gpt-4.1, andgpt-5.3-codex. - Chat-only models — a
/responsesrequest is rewritten to/chat/completions. Function/custom-only tool requests translate fine; requests carrying built-in Responses tools return a400(unsupported_responses_tools) telling you to use a passthrough model.
:::tip For Codex and agentic clients
Use a passthrough model (e.g. gpt-5.3-codex or gpt-5.5). Codex's default
wire_api = "responses" works out of the box — no config change needed.
:::
Request
curl https://gateway.primex.work/v1/responses \
-H "Authorization: Bearer prx-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.5",
"input": "Summarize the Primex gateway in one sentence."
}'
Response (shape)
{
"id": "resp_…",
"object": "response",
"model": "gpt-5.5",
"output": [
{"type": "message", "role": "assistant",
"content": [{"type": "output_text", "text": "Primex is a metered AI gateway…"}]}
],
"usage": {"input_tokens": 18, "output_tokens": 16}
}