Skip to main content
idapt
HomeAI ModelsExploreResourcesPricing
Sign inUse for Free
  • Home
  • Pricing
  • AI Models
  • Skills
  • Image models
  • Voice models
  • Video models
  • Rankings
  • Multi-Model Chat
  • Agents
  • Computers
  • Drive
  • Automations
  • AI Gateway
  • All features →
  • Blog
  • About
  • Comparisons
  • Benchmarks
  • Model Match
  • Demos
  • Help center
  • FAQ
  • Privacy
  • Support
  • Developers
  • Quickstarts
  • API reference
  • API pricing
  • CLI
  • MCP
  • Migrate
  • Downloads
  • Desktop
© idapt[email protected]TermsPrivacy PolicyLegal noticeReport content
X (Twitter)Discord
Help Center
🧭

OpenRouter-compatible API

Found this helpful? Share it:

idapt ships an OpenRouter-compatible API at base URL https://idapt.app/api/openrouter/v1. It speaks both the OpenAI wire shape and the Anthropic Messages shape, so apps and SDKs built for OpenRouter migrate by changing one URL.

OpenAI-compatibleidapt.app/api/openai/v1
Anthropic-compatibleidapt.app/api/anthropic/v1
OpenRouter-compatibleOpenRouter-compatibleidapt.app/api/openrouter/v1
Open the AI Gateway quickstarts

Copy-paste setup for a specific framework lives in the AI Gateway quickstarts: /developers/ai-gateway-quickstarts.

What you need

  1. An API key with the completions scope. See API keys and scopes.

  2. The base URL https://idapt.app/api/openrouter/v1.

  3. A Credit balance, or your own provider key.

Quick start

OpenAI shape

curl https://idapt.app/api/openrouter/v1/chat/completions \
  -H "Authorization: Bearer uk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "z-ai/glm-5.2",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Anthropic shape

curl https://idapt.app/api/openrouter/v1/anthropic/v1/messages \
  -H "x-api-key: uk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "z-ai/glm-5.2",
    "max_tokens": 1024,
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

OpenRouter features honored

  • The provider routing object: order, only, ignore, allow_fallbacks, sort, and max_price.

  • A models array as an ordered fallback list, tried in the order you list them.

  • The reasoning parameter, passed to adapters that support it.

  • Model suffixes like :nitro, :free, and :online.

  • usage.cost in responses, in USD.

  • Key and credits management: GET /key, GET /credits, GET /keys, POST /keys, GET /keys/{hash}, PATCH /keys/{hash}, and DELETE /keys/{hash}.

Unsupported endpoints

Some OpenRouter endpoints are explicit 501 stubs: POST /rerank and the POST /auth/keys OAuth and PKCE key exchange. Streaming Responses is also 501. Each error carries metadata.roadmap_url pointing at the public migration page, so you can see when the feature ships.

Usage and billing

Completions on this gateway bill your Credit balance at the prices shown in the app, with no separate API pricing, or run on your own provider key (BYOK draws no idapt credits). A key with no credits and no BYOK gets a 403 with code insufficient_credits. Completions are limited to 300 requests per minute.

You can cap what a single key spends on the AI Routing page. See per-key spend caps, and read Plans, credits, and the welcome credit for how billing fits together.

FAQs

Related articles

🔗

OpenAI-compatible API

Use idapt's 200+ models from any app that speaks the OpenAI API format.

🤖

Anthropic-compatible API

Use idapt's 200+ models from Claude Code or any app that speaks the Anthropic Messages API.

🔁

Switch from OpenRouter

Swap the OpenRouter base URL for idapt's. Provider routing, model fallbacks, and key management work the same way.

Up next

Vercel AI SDK with idapt

Use the Vercel AI SDK with idapt's OpenAI-compatible API: provider setup, streaming, and tool calls with one base-URL swap.

Was this helpful?

curl https://idapt.app/api/openrouter/v1/chat/completions \
  -H "Authorization: Bearer uk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "z-ai/glm-5.2",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'
curl https://idapt.app/api/openrouter/v1/chat/completions \
  -H "Authorization: Bearer uk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "z-ai/glm-5.2",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'
curl https://idapt.app/api/openrouter/v1/anthropic/v1/messages \
  -H "x-api-key: uk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "z-ai/glm-5.2",
    "max_tokens": 1024,
    "messages": [{"role": "user", "content": "Hello!"}]
  }'
curl https://idapt.app/api/openrouter/v1/anthropic/v1/messages \
  -H "x-api-key: uk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "z-ai/glm-5.2",
    "max_tokens": 1024,
    "messages": [{"role": "user", "content": "Hello!"}]
  }'