$5 free credits when you sign up — No card required · use any model right awayStart free
Migrate
Switch gateways in two lines — keep every line of your code.
NemoRouter is an OpenAI-compatible LLM gateway. Migrating from OpenRouter, OpenAI, or Portkey means changing the base URL and the API key — nothing else. Your SDKs and frameworks work unchanged, and you land on 20+ models, one bill, and built-in guardrails.
Whichever gateway or provider you start from, the diff is the same shape: repoint the base URL, swap the key. Your prompts, parameters, streaming, and error handling are unchanged.
From OpenRouter · Python · OpenAI SDK
# Before — OpenRouterclient = OpenAI( base_url="https://openrouter.ai/api/v1", api_key="sk-or-...",)# After — NemoRouter (only two lines change)client = OpenAI( base_url="https://api.nemorouter.ai/v1", api_key=os.environ["NEMOROUTER_API_KEY"],)
From OpenAI · Python · OpenAI SDK
# Before — OpenAI directclient = OpenAI( base_url="https://api.openai.com/v1", api_key=os.environ["OPENAI_API_KEY"],)# After — NemoRouter (only two lines change)client = OpenAI( base_url="https://api.nemorouter.ai/v1", api_key=os.environ["NEMOROUTER_API_KEY"],)
From Portkey · Python · OpenAI SDK
# Before — Portkey gatewayclient = OpenAI( base_url="https://api.portkey.ai/v1", api_key=os.environ["PORTKEY_API_KEY"],)# After — NemoRouter (only two lines change)client = OpenAI( base_url="https://api.nemorouter.ai/v1", api_key=os.environ["NEMOROUTER_API_KEY"],)
The same two-line pattern applies to the Node, Go, Java, Ruby, and PHP SDKs — the canonical, runnable version of the “after” snippet is below.
The new client
Your post-migration setup
This is the canonical NemoRouter client — generated from the same SDK examples the playground and dashboard use. Set NEMOROUTER_API_KEY in your environment and this runs as-is.
Installpip install openai
1
# Cache: enabled (org default). Pass nemo_cache: false to skip.
2
from openai importOpenAI
3
importos
4
5
client = OpenAI(
6
api_key=os.environ["NEMOROUTER_API_KEY"],
7
base_url="https://api.nemorouter.ai/v1",
8
)
9
10
response = client.chat.completions.create(
11
model="gemini-2.5-flash",
12
temperature=1,
13
max_tokens=1024,
14
top_p=1,
15
messages=[
16
{"role": "user", "content": "Hello! What models do you support?"},
17
],
18
extra_body={
19
# "nemo_cache": False, # Uncomment to skip cache
20
},
21
)
22
23
print(response.choices[0].message.content)
Base URL is always https://api.nemorouter.ai/v1.
Step by step
The four-step cutover
Run NemoRouter alongside your current setup if you want — repoint a slice of traffic, verify, then move the rest. There is no migration fee and no lock-in.
1
Create a key
Sign up at nemorouter.ai, add credits, and generate a NemoRouter virtual key (sk-nemo-…).
2
Repoint the base URL
Set your client base_url to https://api.nemorouter.ai/v1 — the same OpenAI-compatible path your code already calls.
3
Swap the key
Replace your old provider/gateway key with the NemoRouter virtual key. That is the second and final line.
4
Verify and cut over
Send a test request, confirm the response shape, then shift the rest of your traffic when you are ready.
By source
Where you are coming from
The mechanics are identical; the context is not. Here is what specifically changes — and what you gain — depending on what you run today.
OpenRouter
OpenRouter is OpenAI-compatible, so the migration is purely a base-URL and key swap. The upside is on the bill and the controls.
Swap https://openrouter.ai/api/v1 for the NemoRouter endpoint.
Replace your sk-or-… key with a NemoRouter virtual key (sk-nemo-…).
Tier 3 annual is 0% platform fee — OpenRouter charges 5-15% on every call.
You gain built-in guardrails, RBAC teams, audit logs, and per-team budgets.
OpenAI direct
Calling OpenAI directly means one provider and your own key management. Routing through NemoRouter keeps the OpenAI API but unlocks the catalog.
Replace api.openai.com/v1 with the NemoRouter endpoint.
Use a NemoRouter virtual key — we manage the underlying provider keys (no BYOK).
Switch models by changing one string; no new SDK, no new account per provider.
Get real-time per-key cost tracking, guardrails, and budgets on top.
Portkey
Portkey is also a gateway, so you are already used to repointing a base URL. NemoRouter keeps that model and folds the add-ons into every tier.
Swap api.portkey.ai/v1 for the NemoRouter endpoint.
Use a NemoRouter virtual key in place of your Portkey key.
Guardrails, observability callbacks, prompts, and A/B tests are included — not metered add-ons.
One credit balance, one bill — platform fee charged on top, never skimmed from credits.
The migration is trivial on purpose. The point is everything that happens once your traffic flows through a managed gateway.
Lower, predictable fees
0% platform fee on Tier 3 annual, 2% on Tier 2 monthly, 4% pay-as-you-go. The fee is charged on top of credits — you always keep 100% of what you buy.
Guardrails included
PII redaction, prompt-injection detection, and secret scanning run on every request — on every tier, at no extra cost.
Real team management
Owner / admin / member / viewer roles, per-team budgets, and per-key spend — RLS-enforced tenant isolation under the hood.
No feature gating
Every feature is unlocked on every plan. Tiers only change the platform fee and RPM/TPM guarantees — never what you can use.
FAQ
Migration questions, answered
Common questions teams ask before switching gateways.
Two lines · zero migration fee
Migrate to NemoRouter today
Create a free account, generate a key, repoint your base URL. Keep your code, your SDKs, and your frameworks — gain one bill, guardrails, and lower fees.