Realtime TTS-2 is live. Built for realtime conversation that feels human. Read the Realtime TTS-2 announcement

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

FeatureOpenRouterLLM Router
AuthenticationAPI key (Authorization: Bearer)Base64 API credential (Authorization: Basic)
Base URLhttps://openrouter.ai/api/v1https://api.inworld.ai/v1
Model Namesprovider/modelprovider/model (e.g., openai/gpt-5.4)
RoutingHandled via model stringHandled 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:

bash
Authorization: Bearer $OPENROUTER_API_KEY

Inworld:

bash
Authorization: Basic $INWORLD_API_KEY

2. 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:

python
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.4
  • anthropic/claude-opus-4-6 → anthropic/claude-opus-4-6
  • google-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.

json
{
  "model": "auto",
  "extra_body": {
    "sort": ["price", "latency"]
  }
}

Why Migrate?

  1. Enterprise Reliability: Built-in automatic fallbacks across providers.
  2. Cost Optimization: Dynamic tiering to reduce bills by up to 70%.
  3. Unified Observability: Detailed logs and performance metrics across all models.
  4. Privacy Controls: Regional routing and PII detection.

Support

Need help with a complex migration? Contact our engineering team.