Pick Sage Router when keys should stay under your control.
Default deployments keep provider credentials on your machine, server, Tailnet, or private router. Hosted account access can manage keys and billing without becoming the only custody model.
Model gateway for agents
Hosted model gateways are useful when you want one marketplace-style API. Sage Router is built for teams and agents that want one endpoint too, but with local-first control, BYOK routing, private provider credentials, Ollama support, health-aware fallback, and an optional hosted account layer.
Compliance boundary: Sage Router routes access customers are authorized to use. The hosted service is account, billing, routing, telemetry, and reliability infrastructure, not a promise to bypass provider terms.
Evaluating OpenRouter specifically? Read the focused Sage Router vs OpenRouter comparison for marketplace API vs local-first routing tradeoffs.
Default deployments keep provider credentials on your machine, server, Tailnet, or private router. Hosted account access can manage keys and billing without becoming the only custody model.
Route by task, model profile, provider health, latency, local-vs-cloud preference, and failure history. Use one endpoint across Codex, OpenClaw, Cursor, Aider, Continue, and OpenAI-compatible tools.
Local Ollama and Ollama Cloud routes can sit beside OpenAI, Anthropic, Gemini, NVIDIA NIM, endpoints, and other authorized providers.
| Need | Sage Router | Hosted model gateway |
|---|---|---|
| Credential custody | Local-first by default. Provider keys can remain on customer-controlled routers. | Typically centralized through the hosted API account. |
| Agent harness support | OpenAI-compatible, Anthropic-compatible, Codex, OpenClaw, Cursor, Aider, Continue, OpenHands, and harness fallback docs. | Strong hosted OpenAI-compatible API story. |
| Local models | First-class. Route local Ollama and local/cloud hybrid profiles beside hosted providers. | Usually focused on remote hosted model providers. |
| Provider selection | Policy, health, latency, capability, task intent, route profiles, and fallback chains. | Model catalog selection and provider routing through hosted infrastructure. |
| Fusion / compound answers | Premium Pro/Max route. Use sage-router/fusion or the sage-router:fusion server tool for panel-plus-judge synthesis. | Compound routing can expose a hosted multi-model deliberation flow. |
| Resilience model | Tailnet and edge routing can select the healthiest Sage Router installation and keep private routers behind the public API edge. | Depends on the hosted provider platform and upstream provider health. |
| Hosted SaaS | Hosted signup, Stripe checkout, API keys, usage quotas, status page, analytics, and Supabase-backed auth. | Mature hosted account and billing experience. |
| Best fit | AI agents, teams with existing provider access, local-first deployments, private routing, and policy control. | Hosted model marketplace access with minimal local infrastructure. |
How to switch
For hosted access, create an account and key, then point clients at the public Sage Router edge. For local-first access, run the router on port 8790 and keep provider credentials on your machine or Tailnet host.
export OPENAI_BASE_URL="https://api.sagerouter.dev/v1"
export OPENAI_API_KEY="sk_sage_..."
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"}]
}'
sk_sage_* key.
Create API key next
Monetization fit
Sage Router can sell hosted API keys, usage analytics, fallback reliability, team policy sync, and support while keeping the core open-source router useful for local and private deployments.