Documentation

🚅 LiteLLM + Groq for Production Deployments

LiteLLM provides a simple framework with features to help productionize your application infrastructure, including:

  • Cost Management: Track spending, set budgets, and implement rate limiting for optimal resource utilization
  • Smart Caching: Cache frequent responses to reduce API calls while maintaining Groq's speed advantage
  • Spend Tracking: Track spend for individual API keys, users, and teams

Quick Start (2 minutes to hello world)

1. Install the package:

pip install litellm

2. Set up your API key:

export GROQ_API_KEY="your-groq-api-key"

3. Send your first request:

import os
import litellm

api_key = os.environ.get('GROQ_API_KEY')


response = litellm.completion(
    model="groq/llama-3.3-70b-versatile", 
    messages=[
       {"role": "user", "content": "hello from litellm"}
   ],
)
print(response)

Next Steps

For detailed setup of advanced features:

For more information on building production-ready applications with LiteLLM and Groq, see: