Migrating from OpenRouter
Move off OpenRouter in five minutes — same OpenAI SDK, a base-URL swap, and you keep the fallback-array pattern you already use.
If you are already calling OpenRouter through the OpenAI SDK, migration is a
two-line change. Nyuro keeps the patterns you rely on (a models fallback
array, OpenAI-compatible streaming) and adds governance, observability, and the
option to run models on your own infrastructure.
Step 1 — swap the base URL and key
client = OpenAI(
base_url="https://openrouter.ai/api/v1",
api_key="sk-or-v1-…",
)client = OpenAI(
base_url="https://api.nyuro.ai/v1",
api_key="neu_live_…", # from Settings → API Keys
)Step 2 — adjust model names
Nyuro accepts plain aliases (claude-3-5-sonnet) instead of
provider-prefixed slugs (anthropic/claude-3-5-sonnet). You can also replace a
hard-coded model with auto, a strategy: hint, or an industry: tag and let
the router choose. See Models & aliases.
Step 3 — keep your fallback array
The OpenRouter-style models array works unchanged — each entry is resolved
through Nyuro's router:
resp = client.chat.completions.create(
model="claude-3-5-sonnet",
extra_body={"models": ["claude-3-5-sonnet", "gpt-4o", "strategy:cost"]},
messages=[{"role": "user", "content": "Hi"}],
)What changes for the better
| OpenRouter | Nyuro | |
|---|---|---|
| OpenAI-compatible endpoint | ✓ | ✓ |
| Fallback array | ✓ | ✓ |
| Per-key & org budgets with hard cap | — | ✓ |
| Built-in spend/latency observability | partial | ✓ |
| Route to your own VPS / GPU node | — | ✓ |
| Industry-aware routing | — | ✓ |
Migrate gradually: send a slice of traffic to Nyuro behind a feature flag, compare the observability dashboards, then cut over fully once you are happy.