Integrations
Migrate from OpenRouter
Migrate your existing OpenRouter workflows to LLM Router
If you are already using OpenRouter, migrating to LLM Router is straightforward. Our API is designed to be a drop-in replacement for OpenAI-compatible endpoints, with additional features for enterprise reliability and cost optimization.
Key Differences
| Feature | OpenRouter | LLM Router |
|---|---|---|
| Authentication | API key (Authorization: Bearer) | Base64 API credential (Authorization: Basic) |
| Base URL | https://openrouter.ai/api/v1 | https://api.inworld.ai/v1 |
| Model Names | provider/model | provider/model (e.g., openai/gpt-5.4) |
| Routing | Handled via model string | Handled via model: "auto" or custom Routers |
Migration Steps
1. Update Authentication
OpenRouter uses a single API key with Bearer auth. Inworld uses a key/secret pair, delivered as one Base64 credential that you copy from Portal or the CLI and send with Basic auth. Don't encode it again.
OpenRouter:
Authorization: Bearer $OPENROUTER_API_KEYInworld:
Authorization: Basic $INWORLD_API_KEY2. Update the Base URL
Change your client configuration to point to our endpoint. With the OpenAI SDK, the examples also set the Basic authorization header. The SDK sends api_key as a Bearer token, which LLM Router also accepts, but the examples use Basic throughout:
import os
from openai import OpenAI
api_key = os.environ["INWORLD_API_KEY"]
client = OpenAI(
# From:
# base_url="https://openrouter.ai/api/v1"
# To:
base_url="https://api.inworld.ai/v1",
api_key=api_key,
default_headers={"Authorization": f"Basic {api_key}"},
)See OpenAI compatibility for the supported endpoints.
3. Map Your Models
Inworld supports the same provider/model syntax you're used to.
openai/gpt-5.4→openai/gpt-5.4anthropic/claude-opus-4-6→anthropic/claude-opus-4-6google-ai-studio/gemini-2.5-flash→google-ai-studio/gemini-2.5-flash
4. Enable Intelligent Routing
Instead of manually picking models, you can now use our routing engine.
{
"model": "auto",
"extra_body": {
"sort": ["price", "latency"]
}
}Why Migrate?
- Enterprise Reliability: Built-in automatic fallbacks across providers.
- Cost Optimization: Dynamic tiering to reduce bills by up to 70%.
- Unified Observability: Detailed logs and performance metrics across all models.
- Privacy Controls: Regional routing and PII detection.
Support
Need help with a complex migration? Contact our engineering team.