Indicia Code.

Responses

Create a model response in the OpenAI Responses format, on the ChatGPT (Codex) pool.

Endpoint
POST https://code.test.indicia-ai.com/v1/responses

Creates 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:

FieldWhat the gateway does
modelPassed on. Use a ChatGPT model id, such as gpt-6-luna.
inputPassed on. Must be an array of input items, not a string.
streamAlways set to true.
storeAlways set to false.
max_output_tokens, client_metadataRemoved.

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

Terminal
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.

On this page