RouterFor Documentation

Quickstart

  1. Register or sign in.
  2. Check your balance in the wallet.
  3. Create and copy an API key. In Bash or Zsh run export ROUTERFOR_API_KEY='<your-api-key>' with your own key.
  4. Send your first request with the published model gpt-5.4.
curl -X POST "https://routerfor.com/v1/responses" \
  -H "Authorization: Bearer $ROUTERFOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-5.4","input":"Hello"}'

Coding Agents & CLIs

Connect Claude Code, Codex CLI, OpenCode, Cursor, Windsurf, Trae, Roo Code, or Cline with the same gateway address and API key.

model_provider = "routerfor"
model = "gpt-5.4"

[model_providers.routerfor]
name = "RouterFor"
base_url = "https://routerfor.com/v1"
wire_api = "responses"
env_key = "ROUTERFOR_API_KEY"

API Protocols & SDKs

Supported wire protocols: Responses API · Messages API · Chat Completions API.

Confirm your first request

Open your request history to check the model, HTTP status and duration.

Request and session IDs

Compare the X-RouterForAI-Request-Id response header with the request detail. To group calls in one conversation, send the same UUID in the optional Session-Id request header.

Billing and limits

Browse published per-token rates in the model catalog and check actual charges in Usage.

Troubleshooting

For 401 check the API key. For 403 check the error message, balance, key status, and model/IP allowlists. For 429 send fewer requests and increase the time between retries. Keep the request ID when reporting an error.