Model gateway for agents

Sage Router model gateway

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.

No provider key or credit card required until your generated sk_sage key exists.

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.

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.

Pick Sage Router when agents need fallback policy.

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.

Pick Sage Router when local models matter.

Local Ollama and Ollama Cloud routes can sit beside OpenAI, Anthropic, Gemini, NVIDIA NIM, endpoints, and other authorized providers.

Comparison

NeedSage RouterHosted model gateway
Credential custodyLocal-first by default. Provider keys can remain on customer-controlled routers.Typically centralized through the hosted API account.
Agent harness supportOpenAI-compatible, Anthropic-compatible, Codex, OpenClaw, Cursor, Aider, Continue, OpenHands, and harness fallback docs.Strong hosted OpenAI-compatible API story.
Local modelsFirst-class. Route local Ollama and local/cloud hybrid profiles beside hosted providers.Usually focused on remote hosted model providers.
Provider selectionPolicy, health, latency, capability, task intent, route profiles, and fallback chains.Model catalog selection and provider routing through hosted infrastructure.
Fusion / compound answersPremium 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 modelTailnet 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 SaaSHosted signup, Stripe checkout, API keys, usage quotas, status page, analytics, and Supabase-backed auth.Mature hosted account and billing experience.
Best fitAI 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

Use one OpenAI-compatible base URL.

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"}]
  }'
Copy setup first. Paste the bundle into your current OpenAI-compatible client, then replace the placeholder with your generated sk_sage_* key.

Monetization fit

Hosted convenience without losing local control.

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.

  • Lite: simple hosted routing and usage visibility for individual agent workflows.
  • Pro: frontier routing profiles, premium Fusion synthesis, better fallback policy, and analytics for serious development work.
  • Max: high-volume automation, priority fallback and Fusion budget, and team use.
  • Max implementation review: request migration help, private deployment support, or future one-subscription model access only after provider authorization, margin, quota, operator-audit, and abuse-control gates are ready. Request private-beta review.