litellm.completionOPENROUTER_API_KEYconfig.yaml (proxy)beginner15 min
OpenRouter + LiteLLM model routing
Unified OpenAI-compatible access to 400+ models on OpenRouter within LiteLLM agents/workflows, with routing/fallbacks/cost tracking.
Prerequisites
- →OpenRouter account & API key (sk-or-...)
- →pip install litellm. For proxy: Docker or Python env with litellm[proxy].
Further reading