NativeAIHub

How the Unified API Works

All users1 min read
1

Your App Sends a Request

Standard OpenAI format request with your chosen model ID, sent to the OpenRouter endpoint.

2

OpenRouter Routes to the Best Provider

The platform evaluates available providers for that model and routes to the fastest, cheapest, or most reliable one based on your preferences.

3

Provider Processes the Request

The underlying provider (OpenAI, Anthropic, Google, etc.) generates the response using the model you selected.

4

Response Returned in Standard Format

The response comes back in OpenAI compatible format, regardless of which provider actually processed it. Your app handles it the same way every time.

0

Models Available

0

API Compatibility

0

Switch Models

Migration tip for existing OpenAI users

If you already have code using the OpenAI SDK, migration takes about 30 seconds. Change the base_url to https://openrouter.ai/api/v1, swap in your OpenRouter API key, and optionally change the model name. All existing parameters (temperature, max_tokens, streaming, tools) work the same way.