What changes
The base URL does not vary by region or by workspace. Data stored in the Orq.ai platform resides in the European Union, while the region a model is served from depends on the model and is filterable on the Models page. See Sovereign AI.
A private model carries its workspace in the model name as
<workspace>@<provider>/<model> rather than in the URL. See Private Models.
What works immediately
Once those three values are in place, the following need no further code:- Cost per call: every request records input, output, and total cost.
- Traces: every request is recorded with its latency, token counts, and the model that answered.
- Model access: every model enabled on the Models page is reachable from the same client, whichever provider serves it. Browse the catalog in Supported Models.
- Routing Rules: route or restrict traffic from the AI Gateway interface, without touching the application. See Routing Rules.
What does not carry over
Two areas do not transfer.Before starting
Complete the Quick Start first. A migration needs an API key, and every model the application calls has to be enabled on the Models page, not just the one used for the first request. Access to those models comes from Credits or BYOK. Export the key before starting. The steps below read it, and so does the coding agent when it checks model names against the catalog.Migrate with a coding agent
Paste the prompt below into a coding agent such as Claude Code, Cursor, or Codex. The agent finds the LLM calls in the repository and rewrites them. The prompt does the following:- Points every LLM client at
https://api.orq.ai/v3/router. - Replaces the old API key variable with
ORQ_API_KEY, in code and in environment files. - Rewrites model names to the
provider/modelformat. - Converts routing settings from the previous gateway instead of deleting them.
- Checks every model name against the catalog, and leaves a call site untouched rather than substituting a model or half-migrating it.
- Leaves request and response handling untouched.
git diff and revertible with git checkout .. Review the diff before running the application.
Migrating by hand instead? Skip to Migrate from the OpenAI SDK.
Migration prompt
Migrate from the OpenAI SDK
Change the base URL and the API key. Add the provider prefix to the model name. Both/chat/completions and /responses are available, so keep whichever the application already uses.
Before
Migrate from OpenRouter
OpenRouter and the AI Gateway both use theprovider/model naming format, so most model names stay the same. The catalogs differ, so confirm every name against GET /models or the Models page before switching.
Before
Move OpenRouter settings across
Most old OpenRouter fields are ignored rather than rejected, so a partial migration does not fail. The routing they configured no longer applies. Move each one deliberately.plugins is the exception. Both gateways use that field name, and the AI Gateway reads it. A leftover OpenRouter plugins array fails the whole call with a generic Invalid request body that does not name the field.
The remaining
provider sub-options have no per-request equivalent: require_parameters, quantizations, enforce_distillable_text, preferred_min_throughput, preferred_max_latency, and max_price. Applications that depend on any of these need their routing decided ahead of the request, by selecting models explicitly or through Routing Rules.
Migrate from LiteLLM
LiteLLM Proxy is a server run inside the organization’s own infrastructure. Applications call it instead of calling providers directly, and it forwards each request to the real provider. It exposes an OpenAI-compatible endpoint, on port 4000 by default. There are two ways to move off it. Pick one before making any change.
The rest of this section covers the first option.
Find the real model name
LiteLLM Proxy does not use provider model names. It uses nicknames defined in itsconfig.yaml. Each entry pairs the nickname the application calls with the real model behind it:
config.yaml
fast-model. The AI Gateway has no such name, so replace it with the real model, openai/gpt-5.6-sol. Open config.yaml and read the litellm_params.model value for every nickname the application uses.
Change the client
Before, pointing at the proxy and calling it by its nickname:config.yaml, such as fallbacks and retries, moves to the request body. See What Orq.ai adds.
To keep LiteLLM as the caller and send its traces to Orq.ai instead, see LiteLLM observability.
Verify the migration
1
Send one request
200 response confirms that the base URL, the API key, and the model name are correct.For an application that uses chat completions, replace /responses with /chat/completions and send messages instead of input.2
Check the trace
Open Traces in the AI Gateway and open the newest request. Confirm all four:
If no request appears at all, the application is still calling the old endpoint. Search the repository for the previous base URL and the previous key variable.
3
Move the remaining traffic
Repeat for every service that calls an LLM. Filter Traces by model to confirm that every model the application uses now appears, and to find traffic that has not moved yet.
What Orq.ai adds
Once traffic is flowing, these optional fields go on the same request body.
Set in the Orq.ai interface rather than the request body: Budgets for spend limits and alerts, Private Models for self-hosted or fine-tuned models, and Sovereign AI for data residency and zero-retention providers.
Adding a fallback and a cache to an existing call:
Next steps
Fallbacks & Retries
Keep requests flowing when a provider fails.
Supported Models
Browse the model catalog and provider capabilities.
OpenAI-Compatible API
Review the full list of compatible endpoints.
Traces
Inspect cost, latency, and token usage per request.