0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

LLM Gateway Migration: OpenRouter / OpenAI / Portkey → nRouter

0
Posted at

nRouter speaks the OpenAI API, so migrating is a two-line change:

# Before
client = OpenAI(api_key=os.environ["OPENAI_API_KEY"],
                base_url="https://api.openai.com/v1")
# After
client = OpenAI(api_key=os.environ["NROUTER_API_KEY"],
                base_url="https://api.nrouter.ai/v1")

Per source:

  • OpenRouter → swap https://openrouter.ai/api/v1, replace sk-or-… key. Fee: 5.5% → 4% flat, no minimum.
  • OpenAI direct → replace api.openai.com/v1. No BYOK — nRouter manages provider keys.
  • Portkey → swap api.portkey.ai/v1. Guardrails/observability/prompts/A-B tests included every tier.

Checklist: remap model ids to nRouter ids (e.g. gemini-2.5-flash), parallel-run a traffic slice before full cutover. No migration fee.

Full guide: https://nrouter.ai/migrate

Post by the nRouter team.

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?