Browse documentation
Getting StartedMigration Guide

Migration Guide

Move to nRouter from OpenRouter or a direct provider integration — change the base URL and the API key; keep your code, and map your model names.

Last updated

Switching to nRouter is a two-value change for most teams: the base URL and the API key. Your request code, prompts, and tools stay the same. This page lists what changes and the checks that catch most migration issues.

What changes

ItemBecomes
Base URLhttps://api.nrouter.ai/v1
API keyNROUTER_API_KEY (sk-nrouter-…)
Model namesThe nRouter catalog name — or nrouter/auto
FallbacksThe nrouter_fallbacks request field
Response headersx-nr-* headers — routing, attempts, exact cost
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.nrouter.ai/v1",
    api_key=os.environ["NROUTER_API_KEY"],
)

From OpenRouter

  • Model names differ — OpenRouter uses provider/model names; use the nRouter catalog name, or nrouter/auto to let the router choose.
  • Response headers differ — routing and cost come back in x-nr-* headers.
  • Fallbacks are expressed differently — via the nrouter_fallbacks request field.

From a direct provider key

  • One key replaces your separate provider keys — create it in the dashboard; it is shown once.
  • Your OpenAI SDK stays — only the base URL and key change.
  • Budgets and logs apply from the first call — set a budget on the key before you ship.

After you switch

Next Steps

Was this page helpful?