Skip to content
Router One
Router One

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.

POST
/v1/responses
AuthorizationBearer <token>

Authenticate with your API Key. Get your API Key in the Router One console; the format is sk-xxx.

In: header

modelstring

Model ID. Set to auto for Router One routing.

inputstring|
instructions?string

Optional system instructions.

stream?boolean

Whether to enable streaming response.

Defaultfalse
temperature?number

Sampling temperature, range 0-2.

Default1
Range0 <= value <= 2
max_output_tokens?integer

Maximum number of output tokens.

Range1 <= value
tools?

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

previous_response_id?string

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?string|

Conversation reference (id string or object). Same model rule as previous_response_id.

prompt?

Prompt template reference (id plus variables). Same model rule as previous_response_id.

service_tier?string

Forwarded as sent; every value is accepted and billed at the model's standard rate.

store?boolean

Forwarded as sent.

background?boolean

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.

Defaultfalse

Response 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"
  }
}