Inworld Router

One API. The best model for every user and context.

Route requests across OpenAI, Anthropic, Google, and 200+ models through a single API. Built-in failover, A/B testing, and intelligent model selection with no code changes required.
from openai import OpenAI client = OpenAI( base_url="https://api.inworld.ai/v1", api_key="YOUR_INWORLD_API_KEY", ) response = client.chat.completions.create(
model="openai/gpt-5.2",
messages=[{"role": "user", "content": "Hello"}], )
Use it with+ many more


Everything you need to run realtime AI models at scale

One integration. Every model. Inworld Router handles reliability, cost, traffic splitting, and model selection so you don't have to.

Unified API

Access OpenAI, Anthropic, Google, Mistral, and more through a single endpoint. Drop-in compatible with the OpenAI and Anthropic SDKs.

Automatic failover

When a provider returns a 429, 5xx, or times out, the router instantly retries the next model in your fallback chain.

Routing strategies

Route to different models based on cost, latency, user tier, region, complexity, or any custom metadata. Set model to "auto" and Inworld Router picks the best option for each request.

A/B testing

Split traffic across model variants by percentage. Set a user field for sticky routing. Ramp new models gradually without redeploy.

Observability built in

See model selection, latency, cost, and the full attempt chain, including any failovers. Push routing data to your analytics platform of choice.

Multimodal

Route requests with text, audio, image, code, or document inputs. Pair with Inworld TTS for end-to-end voice pipelines.

Use cases

Common patterns for Inworld Router in production. Each one maps to a real configuration you can copy and adapt.
01

Multi-provider failover

Stop depending on a single provider. Configure a fallback chain and let Inworld Router handle 429s, 5xx errors, and timeouts automatically.
# Primary: GPT-4o. Falls back to Claude, then Gemini if either fails. response = client.chat.completions.create( model="openai/gpt-5.2", messages=[{"role": "user", "content": user_message}], extra_body={ "models": [ "anthropic/claude-opus-4-6", "google/gemini-2.5-pro" ] } ) # Response metadata tells you what actually ran # → {"attempts": [{"provider": "openai", "status": "failed", "error": "429"}, # {"provider": "anthropic", "status": "success"}]}

FAQ

Yes. Migration guides are available for OpenRouter and Anthropic-based setups. The core change is updating your base_url and API key, while your existing request structure stays the same.
Router provides access to hundreds of models from leading providers, such as OpenAI, Anthropic, Google, and many more. You can see the full model list here.
While Router is in Research Preview, you pay provider rates directly, with no markup or margin added. Rates for all models are available here.
Inworld Router itself doesn't impose additional rate limits on top of providers. Provider-level rate limits are handled automatically by retrying the next model in your fallback chain.
Most gateways give you a unified API and basic fallback. Inworld Router offers more control and lets you run real experiments: conditional routing, dynamic tiering, traffic splitting by percentage, sticky user assignment, with results pushed to your analytics platform of choice.

Start building

Join millions of developers building the next wave of AI applications.

Copyright © 2021-2026 Inworld AI