Skip to main content

Overview

Groq provides blazing-fast LLM inference with support for popular open-source models. LiteLLM provides seamless integration with Groq’s API, supporting all major features including streaming, function calling, and reasoning models.

Quick Start

1

Install LiteLLM

2

Set API Key

3

Make Your First Call

Supported Models

Meta’s Llama family on Groq’s infrastructure.

Authentication

Streaming

Groq excels at fast streaming responses.

Function Calling

Groq supports OpenAI-compatible function calling.

JSON Mode

Reasoning Models

Groq supports reasoning effort for compatible models.

Audio Transcription

Groq supports Whisper for audio transcription.

Configuration

Supported Parameters

Error Handling

LiteLLM Proxy

Best Practices

  • Groq is optimized for speed - use streaming for best UX
  • Use smaller models (8B) for simple tasks
  • Use larger models (70B+) for complex reasoning
  • llama-3.3-70b-versatile for best overall performance
  • llama-3.1-8b-instant for fast, simple tasks
  • mixtral-8x7b-32768 for large context windows
  • Groq has generous rate limits but monitor usage
  • Implement exponential backoff for retries
  • Use LiteLLM’s built-in retry logic