LiteLLM with idapt
The openrouter/ prefix plus an api_base override routes LiteLLM through idapt's whole catalog.
- 1
Install
bashpip install "litellm" - 2
Point it at idapt
pythonimport 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