AI Router

Migration guide

Your product. More AI possibilities

Only the base_url and API key change. Your OpenAI SDK, LangChain, LlamaIndex, model IDs, prompts, tools, streaming — everything keeps working.

Two lines changed

Before and after — side by side. Everything else stays the same.
Before — OpenRouter
from openai import OpenAI

client = OpenAI(
  base_url = "https://openrouter.ai/api/v1",
  api_key  = "sk-or-v1-..."
)

resp = client.chat.completions.create(
  model    = "openai/gpt-5.4",
  messages = [{"role": "user", "content": "hi"}],
)
After — AI Router
from openai import OpenAI

client = OpenAI(
  base_url = "https://api.airouter.kz/api/v1",
  api_key  = "air_live_..."
)

resp = client.chat.completions.create(
  model    = "openai/gpt-5.4",
  messages = [{"role": "user", "content": "hi"}],
)

# messages, model IDs, tools, response_format, stream=True — unchanged

Two ways in

Pick the SDK you already have. Both take the same key and draw on the same balance.

OpenAI-compatible

The path above: any OpenAI-shaped client — the OpenAI SDK, LangChain, LlamaIndex, LiteLLM, Vercel AI SDK — pointed at /api/v1, with model IDs in provider/model-name form.

OpenAI SDK — base_url
from openai import OpenAI

client = OpenAI(
  base_url = "https://api.airouter.kz/api/v1",
  api_key  = "air_live_..."
)

client.chat.completions.create(
  model    = "anthropic/claude-opus-4-7",
  messages = [{"role": "user", "content": "hi"}],
)

Anthropic native

Already on the official Anthropic SDK? Point it at /anthropic and leave the code alone: /v1/messages and /v1/messages/count_tokens, Anthropic model names, anthropic-version and anthropic-beta passed through, streaming and errors in Anthropic's own format.

Anthropic SDK — base_url
from anthropic import Anthropic

client = Anthropic(
  base_url = "https://api.airouter.kz/anthropic",
  api_key  = "air_live_..."
)

client.messages.create(
  model      = "claude-opus-4-7",
  max_tokens = 1024,
  messages   = [{"role": "user", "content": "hi"}],
)

Migration checklist

Five steps from signup to production. Most teams finish within an hour.
01

Create an account

Sign up at app.airouter.kz as an enterprise customer. Entity KYC and API key issuance within one business day.

02

Top up balance

Bank transfer against invoice. Minimum top-up is the equivalent of $500. Balance credited in USD microdollars.

03

Generate API key

Key with air_live_ prefix. Configure PII masking, rate limits, and per-key model allowlists.

04

Change base_url

One line in your OpenAI client init. The rest of your code — SDK calls, prompts, tools — stays the same.

05

Run a canary

Route 1–5% of production traffic through AI Router. Cross-check tokens, cost, latency in the dashboard, then cut over.

What works identically

We hold full parity with OpenRouter on the API and add enterprise features on top.

Works identically

  • POST /chat/completions with full OpenAI schema
  • GET /models — same 500+ model catalog
  • Model IDs in provider/model-name format
  • streaming (SSE), tool calls, response_format, function calling
  • vision, structured outputs, prompt caching
  • OpenAI SDK, LangChain, LlamaIndex, LiteLLM, Vercel AI SDK

Differences in your favor

  • Prices published per model in the catalogue; your rate is set by your contract
  • Usage is reported in the API exactly as it is billed
  • Native Anthropic endpoint — the official Anthropic SDK works unchanged
  • B2B invoicing and bank transfer instead of credit card
  • Contractual 99.9% SLA with monetary credits
  • Data residency and regulatory compliance labels
  • Per-key PII masking policies
  • Dedicated TAM and direct escalation channel

Concierge migration for enterprise

If you have dozens of integrations, we migrate them with your team.
01

Integration audit

We find every OpenRouter call in your repos: code, configs, secrets, CI/CD. We prepare the exact change list.

02

Dual-run in parallel

We mirror traffic to AI Router in staging. Cross-check tokens, latency, cost per request against your keys.

03

Planned cutover

Phased traffic shift: 1% → 10% → 50% → 100% with one-line rollback in config. Outage-free migration.

Ready to migrate?

Get a key in one business day. Concierge migration is free for enterprise customers.

Connect your company