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.

AI CLI·25 commands·Last updated 2026-08-23

Install 5

uv tool install 'litellm[proxy]'
Recommended: install proxy build via uv
pip install "litellm[proxy]"
Alternative: pip install proxy build
litellm --version
Show installed version
litellm --help
Show all subcommands
python -c "import litellm; print(litellm.__version__)"
Confirm the Python package loads

Start Proxy (one-liner) 5

litellm --model gpt-3.5-turbo
OpenAI-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-v2
bedrock/ prefix uses AWS Bedrock
litellm --model vllm/<model>
vllm/ prefix uses local vLLM

Config-driven (prod) 5

litellm --config config.yaml
Launch from a config (model list/keys/routing)
litellm --config config.yaml --detailed_debug
Verbose debug logging for troubleshooting
litellm --test
Self-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:4000
Point clients at the LiteLLM proxy
curl http://0.0.0.0:4000/v1/models
List models exposed by the proxy
litellm --model <provider>/ --api_base <url>
Point at a custom OpenAI-compatible endpoint
litellm --drop_params
Drop unsupported params to improve compatibility
litellm --telemetry False
Disable telemetry (privacy/offline)

Tips 5

One-liner suits local validation
Quickly try different providers
Use --config in prod, not one-liners
Centralize keys/routing/budgets
provider/ prefix is the key
openai/ anthropic/ ollama/ decide routing
--test after config changes
Avoid discovering breakage in prod
Proxy unifies the OpenAI protocol
Old 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 Us

Edit this page on GitHub

Edit the source file directly and open a PR to improve this cheatsheet.