Skip to main content

Migrating from LiteLLM

This guide helps migrate from LiteLLM proxy to AI Stats Gateway.

Overview

Both provide unified API access. Migration involves:
  • Changing base URL
  • Updating API key
  • Adjusting model names

Prerequisites

  • AI Stats account
  • LiteLLM setup

Migration Steps

1. Update Configuration

Replace LiteLLM URL with AI Stats.
# Before (LiteLLM proxy)
curl http://localhost:8000/v1/chat/completions \
  -H "Authorization: Bearer your-litellm-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

# After (AI Stats)

curl https://api.phaseo.app/v1/chat/completions \
 -H "Authorization: Bearer your-ai-stats-key" \
 -H "Content-Type: application/json" \
 -d '{
"model": "gpt-4",
"messages": [{"role": "user", "content": "Hello!"}]
}'

2. Model Names

LiteLLM uses provider/model format. AI Stats may use different names. Check /models for available models.

3. Test

Run your code to ensure compatibility.

Common Issues

  • Model support: Not all LiteLLM models may be in AI Stats.
  • Features: Some LiteLLM features may differ.

Next Steps

  • Use AI Stats’ built-in analytics.
Last modified on February 11, 2026