Local-first custody
Provider API keys, OAuth profiles, local models, and private gateway credentials can stay on the router host. Hosted generated keys authorize Sage Router account access, quotas, and analytics.
Self-hosted AI infrastructure
Run Sage Router on your own machine, server, Docker host, or Tailnet. Give agents one OpenAI-compatible endpoint that can route across local Ollama, cloud providers, private endpoints, and hosted Sage Router keys without moving provider custody by default.
Provider API keys, OAuth profiles, local models, and private gateway credentials can stay on the router host. Hosted generated keys authorize Sage Router account access, quotas, and analytics.
Route by provider health, latency, policy, model capability, multimodal input requirements, and fallback order. Fail over on rate limits and provider outages without app-by-app rewiring.
Use local Ollama and Ollama Cloud through your local runtime, then expose the router to trusted agents on port 8790 locally or across a private Tailnet.
python3 router.py --port 8790
export OPENAI_BASE_URL=http://localhost:8790/v1
export OPENAI_API_KEY=local-router
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 well"}]
}'
The local router can stay useful by itself, but hosted Sage Router can add account-managed generated keys, quotas, analytics, health monitoring, and reliability routing. Public plans sell routing infrastructure and control-plane convenience; they do not bundle provider resale.
Configure multiple keys for the same provider, balance load, and fail over when a key hits 429 or another retryable provider error.
Image, audio, video, and document signals are routed to capable models instead of text-only models. Learned modalities improve future routing decisions.
Use the hosted public edge when you need stable external access, while keeping private routers and provider credentials on trusted machines.
Read the hosted/local quickstart, read the local-first routing guide, browse route families, or compare hosted plans.