Skip to main content
idapt
HomeCodeAI ModelsPricing
Sign inStart free trial

LiteLLM with idapt

One provider block in LiteLLM routes every catalog model through idapt.

Last reviewed 2026-07-17

Install

bash
pip install litellm

Point it at idapt

python
from litellm import completion

reply = completion(
    model="openai/anthropic/claude-sonnet-5",
    api_base="https://idapt.app/api/openai/v1",
    api_key=os.environ["IDAPT_API_KEY"],
    messages=[{"role": "user", "content": "Three facts about ravens."}],
)

LiteLLM's openai/ prefix selects the OpenAI wire protocol; the rest is the catalog model id.

Going further

yaml
# litellm proxy config.yaml
model_list:
  - model_name: sonnet
    litellm_params:
      model: openai/anthropic/claude-sonnet-5
      api_base: https://idapt.app/api/openai/v1
      api_key: os.environ/IDAPT_API_KEY

Proxy mode: every model_list entry can point at a different catalog model behind one upstream key.

Pitfalls

Double prefix is intentional

openai/anthropic/claude-sonnet-5 reads as wire-protocol openai + catalog id anthropic/claude-sonnet-5. Dropping the first segment makes LiteLLM guess the provider.

References

  • API keys and scopes
  • OpenAI-compatible API reference
  • Rate limits and errors

More quickstarts

OpenAI SDK (Python)curl
  • Home
  • Pricing
  • AI Models
  • Image models
  • Voice models
  • Video models
  • Rankings
  • New models
  • Model status
  • Multi-Model Chat
  • Agents
  • Computers
  • Drive
  • Automations
  • AI Gateway
  • All features →
  • LLM cost calculator
  • Token counter
  • All free tools →
  • Blog
  • Use cases
  • Comparisons
  • Best of
  • Benchmarks
  • Demos
  • Changelog
  • Help center
  • FAQ
  • Privacy
  • Compare all models
  • Support
  • idapt Code
  • Developers
  • Quickstarts
  • API reference
  • API pricing
  • CLI
  • MCP
  • Downloads
  • Desktop
  • Badges and embeds
© idapt[email protected]TermsPrivacy PolicyLegal noticeReport content
X (Twitter)