LiteLLM CLI Cheatsheet - Unified LLM Gateway & Proxy Server
All LiteLLM unified-gateway commands in one place — from one-line proxy to config-driven mode, multi-provider routing, cost/rate-limit — organized by scenario. Copy and go.
Install 5
uv tool install 'litellm[proxy]'Recommended: install proxy build via uv
pip install "litellm[proxy]"Alternative: pip install proxy build
litellm --versionShow installed version
litellm --helpShow all subcommands
python -c "import litellm; print(litellm.__version__)"Confirm the Python package loads
Start Proxy (one-liner) 5
litellm --model gpt-3.5-turboOpenAI-compatible proxy (default :4000)
litellm --model anthropic/claude-...anthropic/ prefix routes to Claude
litellm --model ollama/ ollama/ prefix uses local Ollama
litellm --model bedrock/anthropic.claude-v2bedrock/ prefix uses AWS Bedrock
litellm --model vllm/<model>vllm/ prefix uses local vLLM
Config-driven (prod) 5
litellm --config config.yamlLaunch from a config (model list/keys/routing)
litellm --config config.yaml --detailed_debugVerbose debug logging for troubleshooting
litellm --testSelf-test: send one request to the proxy
litellm --test <model>Connectivity test for a specific model
export OPENAI_API_KEY=...Set the backend provider key
Routing & Ops 5
openai_api_base=http://0.0.0.0:4000Point clients at the LiteLLM proxy
curl http://0.0.0.0:4000/v1/modelsList models exposed by the proxy
litellm --model <provider>/ --api_base <url>Point at a custom OpenAI-compatible endpoint
litellm --drop_paramsDrop unsupported params to improve compatibility
litellm --telemetry FalseDisable telemetry (privacy/offline)
Tips 5
One-liner suits local validationQuickly try different providers
Use --config in prod, not one-linersCentralize keys/routing/budgets
provider/ prefix is the keyopenai/ anthropic/ ollama/ decide routing
--test after config changesAvoid discovering breakage in prod
Proxy unifies the OpenAI protocolOld OpenAI clients just change base_url
Tips
- LiteLLM uses the `provider/` prefix to route 100+ models to one OpenAI-compatible interface — the de-facto gateway for multi-provider fallback, cost, and rate-limiting.
- For quick local validation use a one-liner `litellm --model <provider/model>`; in production always use `--config config.yaml` to centralize keys, routing, and budgets.
- The proxy listens on :4000 by default; legacy OpenAI clients switch providers by just changing `base_url` — near-zero migration cost.
- After config changes, run `litellm --test` to self-check connectivity before shipping.
Official References
Commands are compiled from the official docs below. Click to verify the latest usage.
Maintained by LaoHand
Publicly updated on Aug 23, 2026, continuously proofread against official docs.
Contact Us
Wrong command or description? Send us corrections, business inquiries or product feedback by email.
Contact UsEdit this page on GitHub
Edit the source file directly and open a PR to improve this cheatsheet.