AI Router finds the best model for every request. There are two ways to use that decision, and the first thing to settle is which one fits your setup:
https://api.airouter.io. AI Router selects the model, executes the request on your keys and returns the response, including streaming, tool calling and automatic fallbacks. Routing runs exclusively on your keys: only models of providers you enabled are executed, and without an enabled provider there is no model routing.Both ways can be combined in one team, and both count usage in the same unit (routed tokens). Model costs always stay on your provider bill.
| You want to... | Use |
|---|---|
| Keep using your own model deployments, contracts and gateway | Model selection |
| Keep prompts inside your environment entirely | Model selection with full privacy mode |
| Replace direct OpenAI calls with a drop-in endpoint and no execution logic of your own | Model routing |
| Try AI Router with the least code changes | Model routing |
You will need an account on the AI Router Platform to get started. During onboarding you create a team and choose its routing policy:
auto to let AI Router decide),All of these can be changed later in the dashboard: the routing policy under Settings → Routing, the enabled models under Models. See Default Model, Weighting and Choosing Models.
Open your team in the dashboard, go to Settings → API Keys and create a key. Expanding Router Configuration in the dialog lets you give the key its own model subset or preferences; otherwise the key follows the team's routing policy.

Use the key as a bearer token (Authorization: Bearer <API-KEY>) for every request. Keys are shown once at creation, so store them securely.
get_best_model), or directly through the Decision API, which returns the ranked candidates with predicted quality, cost and latency.For full privacy mode, generate the embedding locally (the Python SDK does this for you) and send only the embedding; see Privacy Modes and the examples for Azure OpenAI and AWS Bedrock.
https://api.airouter.io and use your AI Router API key. This works with the OpenAI package, LangChain, LangChain.js, the Python SDK and any other OpenAI-compatible client.model: "auto" (or your default model) and AI Router selects and calls the model for you. Usage is measured automatically; no reporting needed.All request parameters, including the routing-specific ones, are listed in the chat completions reference.