Create Response
Create an OpenAI Responses API compatible request — the shape Codex CLI uses — served natively for GPT-family and DeepSeek V4 models. Text, instructions, streaming and function tools work as sent; custom tools, previous_response_id / conversation / prompt, hosted tools (file_search, code_interpreter, computer_use, mcp, web_search), file_id / file_url input parts and service_tier values are accepted on natively served Responses models and billed at the model's standard rate. Rejected with 400 invalid_request: the image_generation tool and image_generation_call items (use /v1/images/generations) and background: true. Claude-family model IDs are not served here: pinning one is rejected before any model runs with 400 invalid_request_error and the message model 'anthropic/claude-opus-5' must be called via /v1/messages or /v1/chat/completions; with model: auto the candidate set excludes Claude and another family serves the request.
Authenticate with your API Key. Get your API Key in the Router One console; the format is sk-xxx.
In: header
Model ID. Set to auto for Router One routing.
Optional system instructions.
Whether to enable streaming response.
falseSampling temperature, range 0-2.
10 <= value <= 2Maximum number of output tokens.
1 <= valueTool declarations. Function tools are the Codex default. Custom tools and hosted tools (file_search, code_interpreter, computer_use, mcp, web_search) are accepted on models served natively over the Responses wire format and billed at the model's standard rate. The image_generation tool is rejected with 400 invalid_request — use /v1/images/generations.
Continue from a prior response (server-side context reference). Accepted on models served natively over the Responses wire format; other models return 400 invalid_request.
Conversation reference (id string or object). Same model rule as previous_response_id.
Prompt template reference (id plus variables). Same model rule as previous_response_id.
Forwarded as sent; every value is accepted and billed at the model's standard rate.
Forwarded as sent.
Not supported — background: true returns 400 invalid_request. The gateway does not run detached responses and has no GET /v1/responses/{id}; the request must complete within the HTTP connection.
falseResponse Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.router.one/v1/responses" \ -H "Content-Type: application/json" \ -d '{ "model": "auto", "input": "Introduce Router One in one sentence" }'{
"id": "resp_abc123",
"object": "response",
"created_at": 1700000000,
"status": "completed",
"model": "auto",
"output_text": "Router One is a unified LLM API gateway.",
"output": [
{
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "Router One is a unified LLM API gateway."
}
]
}
],
"usage": {
"input_tokens": 12,
"output_tokens": 10,
"total_tokens": 22
}
}{
"error": {
"message": "model 'anthropic/claude-opus-5' must be called via /v1/messages or /v1/chat/completions",
"type": "invalid_request_error",
"code": "INVALID_REQUEST",
"request_id": "290dd478f91d8aec68f7535e871376eb"
}
}{
"error": {
"message": "invalid api key",
"type": "authentication_error",
"code": "AUTH_INVALID_API_KEY",
"request_id": "290dd478f91d8aec68f7535e871376eb"
}
}{
"error": {
"message": "insufficient balance: top up at https://router.one/deposit",
"type": "billing_error",
"code": "INSUFFICIENT_BALANCE",
"request_id": "290dd478f91d8aec68f7535e871376eb"
}
}{
"error": {
"message": "rate limit exceeded",
"type": "rate_limit_error",
"code": "RATE_LIMIT_EXCEEDED",
"request_id": "290dd478f91d8aec68f7535e871376eb"
}
}{
"error": {
"message": "internal error",
"type": "api_error",
"code": "INTERNAL_ERROR",
"request_id": "290dd478f91d8aec68f7535e871376eb"
}
}