Responses
Create a model response in the OpenAI Responses format, on the ChatGPT (Codex) pool.
POST https://code.test.indicia-ai.com/v1/responsesCreates a model response in the OpenAI Responses format, on the ChatGPT (Codex) pool. Codex CLI uses this endpoint.
For scripts, /v1/chat/completions is
simpler and fails over to other providers.
Request body
The body is a Responses request for the ChatGPT Codex backend. The gateway changes it before forwarding:
| Field | What the gateway does |
|---|---|
model | Passed on. Use a ChatGPT model id, such as gpt-6-luna. |
input | Passed on. Must be an array of input items, not a string. |
stream | Always set to true. |
store | Always set to false. |
max_output_tokens, client_metadata | Removed. |
The body may be up to 64 MiB. A session-id header, or else
prompt_cache_key in the body, keeps related requests on one ChatGPT account.
Example request
curl https://code.test.indicia-ai.com/v1/responses \
-H "Authorization: Bearer $INDICIA_TOKEN" \
-H "Content-Type: application/json" \
-N \
-d '{
"model": "gpt-6-luna",
"instructions": "Answer briefly.",
"input": [
{"type": "message", "role": "user", "content": [{"type": "input_text", "text": "Say hello"}]}
]
}'Response
Always a text/event-stream of Responses events: response.created,
response.output_text.delta, response.completed and the rest. The gateway
moves to another ChatGPT account when one is rate limited, as long as nothing
has been sent yet. Other provider errors come back unchanged, with the
provider's status and body.