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.

OpenRouterExperiential
Base URLhttps://openrouter.ai/api/v1https://api.experientiallabs.ai/api/v1 (or /v1; Anthropic SDKs: the bare origin)
AuthOPENROUTER_API_KEY (sk-or-v1-...)Authorization: Bearer YOUR_API_KEY (the only header needed)
Model idsvendor/modelcanonical_slug from GET /api/v1/models; vendor/slug and :free also work when listed
Suffixes:nitro, :floor, :thinking, :exactoStrip them; only :free and :online exist
usage: {"include": true}Usage on requestRemove it; usage is always returned. On a stream send stream_options.include_usage for the final usage chunk
provider objectProvider routingonly, 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, modelsSupportedRemove (use the first model of models)
pluginsMany idsOnly web
reasoning: {effort}SupportedTranslated to reasoning_effort (disclosed)
HTTP-Referer, X-TitleApp attributionAccepted, not shown; use safety_identifier
GET/api/v1/modelsPOST/v1/chat/completions
from 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.

OpenRouterExperiential
GET /generation?id=GET /api/v1/generation?id=<x-request-id>
GET /creditsGET /api/v1/credits
GET /auth/keyGET /api/v1/key
GET /activityGET /api/v1/activity (per-day org rollup)
per-request exportGET /api/v1/usage (50 rows plus next_cursor, org-wide; filter api_key_id)
GET /models/usernone; use /api/v1/models
GET /endpoints/zdrGET /api/v1/endpoints/zdr (public)
GET/api/v1/generationGET/api/v1/credits
curl "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.

GET/api/orgs/{org_id}/telemetry-settings
curl 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.

FromTodayMap model ids
LiteLLMproxy URL, sk- virtual keysstrip provider/; or keep the proxy with model: openai/<slug>
Portkeyapi.portkey.ai/v1, x-portkey-* headersmatch the model part
Vercel AI Gatewayai-gateway.vercel.sh/v1creator/model: part after the slash
Cloudflare AI Gatewaygateway.ai.cloudflare.com/...map each provider id through the catalog
Heliconeai-gateway.helicone.aimatch the model part
Kongyour route with ai-proxymap config.model.name, or repoint upstream_url
Requestyrouter.requesty.ai/v1part after the slash
Azure API Management<apim>.azure-api.netmap 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)"'