Skip to content
exoticrouter.com ↗

Responses

OpenAI’s Responses format, for the OpenAI models. It is what Codex and the newer calls of the OpenAI SDK speak. The request is passed to the model as you send it.

POST https://api.exoticrouter.com/v1/responses

cURL
curl https://api.exoticrouter.com/v1/responses \
-H "Authorization: Bearer $EXOTIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-6.2-astra",
"input": "Why is the sky blue?"
}'
Python
response = client.responses.create(
model="openai/gpt-6.2-astra",
input="Why is the sky blue?",
)
print(response.output_text)
TypeScript
const response = await client.responses.create({
model: "openai/gpt-6.2-astra",
input: "Why is the sky blue?",
});
console.log(response.output_text);

The samples use the OpenAI SDK with its base URL set to https://api.exoticrouter.com/v1, as on OpenAI SDK.

  • model has to be there. Every text model answers on this endpoint: the OpenAI models take the request as you send it, and any other (anthropic/claude-sonnet-5-5, a Gemini or DeepSeek model) has it translated to Chat Completions by the gateway and answers in this format.
  • On an OpenAI model the rest of the body goes to the model untouched: instructions, tools, reasoning, text and so on.
  • Of the request’s headers, openai-beta is passed on, with content-type and accept. Others, an organisation or project header for instance, are not.

The answer is OpenAI’s response object. model in it is the model’s full id. usage is the model’s own report; the input figure you are billed on is the gateway’s own count and can differ from it.

With "stream": true the answer comes as the format’s own named events, from response.created to response.completed.

Python
stream = client.responses.create(
model="openai/gpt-6.2-astra",
input="Write a haiku about glass.",
stream=True,
)
for event in stream:
if event.type == "response.output_text.delta":
print(event.delta, end="", flush=True)
TypeScript
const stream = await client.responses.create({
model: "openai/gpt-6.2-astra",
input: "Write a haiku about glass.",
stream: true,
});
for await (const event of stream) {
if (event.type === "response.output_text.delta") process.stdout.write(event.delta);
}
  • While the model is silent the gateway sends a comment line, : keep-alive, every 15 seconds.
  • If the model fails after the stream has begun, the stream ends with one event named error, holding an error object.

Only creating a response is served. A stored response cannot be fetched, cancelled or deleted here, so do not build on store or previous_response_id: send the conversation so far with each request.