OpenAI-compatible routing

OpenAI API router for apps that need failover

Keep the OpenAI SDK shape, but stop hard-coding one provider, one API key, and one model. Sage Router gives OpenAI-compatible clients one base URL for generated hosted keys, local routers, provider subscriptions, OpenAI keys, Anthropic, Gemini, Ollama, and private endpoints.

Create API key Read quickstart API reference Browse models

One OpenAI base URL

Use https://api.sagerouter.dev/v1 for hosted routing, http://127.0.0.1:8790/v1 for local routing, or a Tailnet host when provider credentials should stay private.

OpenAI key load balancing

Configure multiple OpenAI API keys for the same provider, balance traffic across healthy credentials, and fail over when one key hits a 429 or retryable provider error.

Responses API compatible

Route OpenAI-compatible chat completions and Responses-style agent traffic through stable profiles such as sage-router/frontier while keeping provider policy behind the router.

60-second OpenAI router setup

export OPENAI_BASE_URL=https://api.sagerouter.dev/v1
export OPENAI_API_KEY=sk_sage_your_generated_key

curl "$OPENAI_BASE_URL/chat/completions" \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "sage-router/frontier",
    "messages": [{"role": "user", "content": "Route this through the best healthy model"}]
  }'

429 failover

Retryable rate limits can move to another eligible credential, provider, or local model without every app implementing its own fallback stack.

Multimodal routing

Image, audio, video, and document inputs route to capable models only, with served modality history recorded per model for better future decisions.

Provider boundaries

Sage Router sells routing, generated keys, quotas, and analytics. Public plans do not grant unauthorized provider access or bypass provider terms.

Why route OpenAI-compatible traffic?

The OpenAI SDK is the common client interface for agents, coding tools, and internal apps. The operational problem is not syntax; it is reliability. Teams need health-aware fallback, credential pools, multimodal capability gates, provider policy, route telemetry, and hosted activation without rewriting every client.

Next steps

Create an API key, copy the hosted quickstart, read the API reference, or compare OpenRouter.