Migrate from LiteLLM
LiteLLM is a self-hosted proxy; Curate-Me is the managed equivalent with governance, PII scanning, HITL approvals, and a 229-page ops dashboard built in. If you’re moving off self-hosted infra to reduce ops burden — this is the guide.
Migration time: 15–30 minutes. Zero downtime if you do a blue/green swap.
Environment variable mapping
| LiteLLM env var | Curate-Me equivalent | Notes |
|---|---|---|
LITELLM_MASTER_KEY | — | Replaced by CM_API_KEY |
OPENAI_API_KEY | Store in Secrets → set OPENAI_API_KEY=stored | Store in dashboard once; gateway injects it |
ANTHROPIC_API_KEY | Store in Secrets → set ANTHROPIC_API_KEY=stored | Same pattern |
LITELLM_API_BASE / OPENAI_BASE_URL | OPENAI_BASE_URL=https://api.curate-me.ai/v1/openai | Per-provider path |
LITELLM_LOG | — | Replaced by CM dashboard traces |
LITELLM_MAX_BUDGET | CM_DAILY_BUDGET_USD (per-key or per-org) | Set in dashboard or via API |
LITELLM_BUDGET_DURATION | — | CM budgets are per-day; monthly budgets via API |
LITELLM_DROP_PARAMS | — | Not needed; CM passes params through |
REDIS_URL | REDIS_URL | If you’re running CM gateway self-hosted |
Before / after code diff
Python
-import litellm
-litellm.api_key = os.environ["LITELLM_MASTER_KEY"]
-litellm.api_base = "http://localhost:4000"
-
-response = litellm.completion(
- model="gpt-4o",
- messages=[{"role": "user", "content": "Hello"}],
-)
+from openai import OpenAI
+
+client = OpenAI(
+ base_url="https://api.curate-me.ai/v1/openai",
+ api_key="cm_sk_your_gateway_key", # or set OPENAI_API_KEY env var
+)
+
+response = client.chat.completions.create(
+ model="gpt-4o",
+ messages=[{"role": "user", "content": "Hello"}],
+)
print(response.choices[0].message.content)Or using the Curate-Me Python SDK for tighter integration:
from curate_me.gateway import CurateGateway
gw = CurateGateway(api_key="cm_sk_your_gateway_key")
client = gw.openai() # uses stored secret; no provider key needed
response = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)Step-by-step migration
Create a Curate-Me account and get your gateway key
Sign up at dashboard.curate-me.ai/signup .
Go to Settings → API Keys → New Key. Copy the cm_sk_... value.
Store your provider secrets
Your upstream keys (OpenAI, Anthropic, etc.) must be stored in Curate-Me — the gateway injects them on each request so they never appear in client code.
# Store your OpenAI key
curl -X POST https://api.curate-me.ai/gateway/admin/secrets \
-H "X-CM-API-Key: cm_sk_your_gateway_key" \
-H "Content-Type: application/json" \
-d '{"provider": "openai", "plaintext_key": "sk-your-openai-key", "label": "production"}'
# Store your Anthropic key
curl -X POST https://api.curate-me.ai/gateway/admin/secrets \
-H "X-CM-API-Key: cm_sk_your_gateway_key" \
-H "Content-Type: application/json" \
-d '{"provider": "anthropic", "plaintext_key": "sk-ant-your-key", "label": "production"}'Set a daily budget (recommended)
Prevent bill surprises from day one:
curl -X POST https://api.curate-me.ai/gateway/admin/budgets/nodes \
-H "X-CM-API-Key: cm_sk_your_gateway_key" \
-H "Content-Type: application/json" \
-d '{"name": "Org daily cap", "level": "org", "budget_limit": 25.0, "reset_period": "daily"}'Or in the dashboard: Costs → Budgets → Set Daily Cap.
Update your environment variables
# Remove LiteLLM vars
unset LITELLM_MASTER_KEY
unset LITELLM_API_BASE
# Add Curate-Me vars
export CM_API_KEY=cm_sk_your_gateway_key
export OPENAI_BASE_URL=https://api.curate-me.ai/v1/openai
export OPENAI_API_KEY=cm_sk_your_gateway_key # gateway key doubles as the "API key"
# For Anthropic
export ANTHROPIC_BASE_URL=https://api.curate-me.ai/v1/anthropicVerify your first request
curl https://api.curate-me.ai/v1/openai/chat/completions \
-H "X-CM-API-Key: $CM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o",
"messages": [{"role": "user", "content": "Migration test — what is 2+2?"}]
}'You should see the X-CM-Request-Id header in the response and a new trace appear in Dashboard → Traces within a few seconds.
Shut down LiteLLM
Once you’ve verified traffic is flowing through Curate-Me, stop the LiteLLM proxy:
# If running via Docker
docker stop litellm
# If running via systemd
sudo systemctl stop litellmVerify with the CLI
Once your environment variables are set, the curate CLI can confirm the gateway is reachable and that proxy traffic is flowing:
# Smoke-test connectivity and run a governed proxy request
curate gateway test
# Show gateway status, latency, and connection-pool info
curate gateway statusLiteLLM feature equivalents
| LiteLLM feature | Curate-Me equivalent |
|---|---|
max_budget per key | Per-key daily budget in dashboard |
router_strategy: least-busy | Multi-key load balancing (roadmap) |
| Prompt logging to Langfuse | Built-in traces dashboard + Langfuse integration (roadmap) |
| Fallback models | Provider failover (roadmap) |
| Redis caching | Response caching (roadmap) |
drop_params | Not needed — CM passes params through |
| Virtual keys | API keys in dashboard Settings → API Keys |
| Team spend tracking | Per-team budgets in Costs → Teams |
What LiteLLM does that Curate-Me doesn’t (yet)
- 100+ provider integrations — Curate-Me has 50+ supported providers (plus 200+ models via OpenRouter and any OpenAI-compatible endpoint)
- Semantic caching — CM does not cache responses today
- Model fallback routing — configurable fallback chains are on the roadmap
- Self-hosted option — CM is managed SaaS only
Rollback
If you need to revert:
# Restore LiteLLM env vars
export LITELLM_MASTER_KEY=your-old-key
export OPENAI_BASE_URL=http://localhost:4000
# Restart LiteLLM
docker start litellm # or: sudo systemctl start litellm
# Remove CM vars
unset CM_API_KEYNo data is lost — CM stores your traces and costs even after you stop routing through it.