Switch from OpenRouter
The exact diff when moving from OpenRouter or another AI gateway, and the prompt that does it.
What changes
The gateway keeps OpenRouter's paths under /api/v1, so most code changes two strings. How we compare overall: Gateway comparison.
| OpenRouter | Experiential | |
|---|---|---|
| Base URL | https://openrouter.ai/api/v1 | https://api.experientiallabs.ai/api/v1 (or /v1; Anthropic SDKs: the bare origin) |
| Auth | OPENROUTER_API_KEY (sk-or-v1-...) | Authorization: Bearer YOUR_API_KEY (the only header needed) |
| Model ids | vendor/model | canonical_slug from GET /api/v1/models; vendor/slug and :free also work when listed |
| Suffixes | :nitro, :floor, :thinking, :exacto | Strip them; only :free and :online exist |
usage: {"include": true} | Usage on request | Remove it; usage is always returned. On a stream send stream_options.include_usage for the final usage chunk |
provider object | Provider routing | only, ignore, order, allow_fallbacks and zdr are honored against the model's own routes; sort, quantizations, max_price and the rest are ignored with disclosure |
transforms, route, models | Supported | Remove (use the first model of models) |
plugins | Many ids | Only web |
reasoning: {effort} | Supported | Translated to reasoning_effort (disclosed) |
HTTP-Referer, X-Title | App attribution | Accepted, not shown; use safety_identifier |
/api/v1/modelsPOST/v1/chat/completionsfrom openai import OpenAI
# client = OpenAI(base_url="https://openrouter.ai/api/v1", api_key=os.environ["OPENROUTER_API_KEY"])
client = OpenAI(base_url="https://api.experientiallabs.ai/api/v1", api_key="YOUR_API_KEY")
r = client.chat.completions.create(
model="openai/gpt-6-luna", # or the canonical slug "gpt-6-luna"
messages=[{"role": "user", "content": "Hello"}],
stream=True,
stream_options={"include_usage": True}, # replaces usage: {include: true}
)Cost and account reads
Same key, same paths under /api/v1. Every completion carries usage.cost (USD) and usage.is_byok. Details on Usage and spend.
| OpenRouter | Experiential |
|---|---|
GET /generation?id= | GET /api/v1/generation?id=<x-request-id> |
GET /credits | GET /api/v1/credits |
GET /auth/key | GET /api/v1/key |
GET /activity | GET /api/v1/activity (per-day org rollup) |
| per-request export | GET /api/v1/usage (50 rows plus next_cursor, org-wide; filter api_key_id) |
GET /models/user | none; use /api/v1/models |
GET /endpoints/zdr | GET /api/v1/endpoints/zdr (public) |
/api/v1/generationGET/api/v1/creditscurl "https://api.experientiallabs.ai/api/v1/generation?id=REQUEST_ID" \
-H "Authorization: Bearer YOUR_API_KEY"Continuations and your provider keys
If the project chains Responses turns with previous_response_id, continuation needs prompt capture on (GET /api/orgs/{org_id}/telemetry-settings); otherwise resend the full conversation. Provider keys you routed through OpenRouter can be connected directly, no markup (BYOK). Keep the OpenRouter key in place until the move is verified, then revoke it at openrouter.ai.
/api/orgs/{org_id}/telemetry-settingscurl https://api.experientiallabs.ai/api/orgs/ORG_ID/telemetry-settings \
-H "Authorization: Bearer YOUR_API_KEY"
# {"capture_prompt_content": true}Other gateways
Same three swaps: base URL, Authorization: Bearer, and model ids mapped through the catalog (never by stripping a prefix blindly). The generic prompt is on Setup prompts.
| From | Today | Map model ids |
|---|---|---|
| LiteLLM | proxy URL, sk- virtual keys | strip provider/; or keep the proxy with model: openai/<slug> |
| Portkey | api.portkey.ai/v1, x-portkey-* headers | match the model part |
| Vercel AI Gateway | ai-gateway.vercel.sh/v1 | creator/model: part after the slash |
| Cloudflare AI Gateway | gateway.ai.cloudflare.com/... | map each provider id through the catalog |
| Helicone | ai-gateway.helicone.ai | match the model part |
| Kong | your route with ai-proxy | map config.model.name, or repoint upstream_url |
| Requesty | router.requesty.ai/v1 | part after the slash |
| Azure API Management | <apim>.azure-api.net | map the model behind each deployment |
curl -s https://api.experientiallabs.ai/api/v1/models \
-H "Authorization: Bearer YOUR_API_KEY" \
| jq -r '.data[] | select(.id | test("claude-sonnet")) | "\(.id) -> \(.canonical_slug)"'