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
🔗

LiteLLM with idapt

Found this helpful? Share it:

Set up LiteLLM against idapt's compatible APIs with the steps below. This article and the AI Gateway quickstarts lander render the same shared steps, so they never drift.

LiteLLM with idapt

The openrouter/ prefix plus an api_base override routes LiteLLM through idapt's whole catalog.

  1. 1

    Install

    bash
    pip install "litellm"
  2. 2

    Point it at idapt

    python
    import os
    from litellm import completion
    
    resp = completion(
        model="openrouter/anthropic/claude-sonnet-5",
        api_base="https://idapt.app/api/openrouter/v1",
        api_key=os.environ["IDAPT_API_KEY"],
    )

    litellm treats the openrouter/ prefix as the provider marker; what follows is the catalog id. The OPENROUTER_API_KEY environment variable works in place of api_key. For the proxy, pass --api_base and --model on the command line.

GOOD TO KNOW

API keys and scopesOpenAI-compatible API referenceOpenRouter-compatible API referenceRate limits and errors

MORE QUICKSTARTS

LLM CLI

Vercel AI SDK

Vercel AI SDK

n8n

n8n

Related articles

🔑

API keys and scopes

Create a key, choose its scopes, pin it to an API version, rotate it, and cap what it can spend.

🚦

Rate limits and errors

Every error shape the API returns, what each rate limit is, and how to handle a wall in code.

🛡️

Cap what an API key spends

Give every Gateway API key a lifetime, monthly, or daily USD cap, and what a capped-out key returns.

🔗

OpenAI-compatible API

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

🔗

OpenAI SDK (Python) with idapt

Point the official OpenAI Python SDK at idapt's compatible API with base_url and run any catalog model unchanged.

⚡

curl with idapt

curl examples for idapt's three compatible APIs: OpenAI chat completions, Anthropic messages, and OpenRouter completions with one key.

Up next

Claude Code with idapt

Point Claude Code at idapt's Anthropic-compatible API with ANTHROPIC_BASE_URL and an idapt key; add MCP for workspace access.

Was this helpful?