> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pipecat.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Groq

> LLM service implementation using Groq's API with OpenAI-compatible interface

## Overview

`GroqLLMService` provides access to Groq's language models through an OpenAI-compatible interface. It inherits from `OpenAILLMService` and supports streaming responses, function calling, and context management with ultra-fast inference speeds.

<CardGroup cols={2}>
  <Card title="Groq LLM API Reference" icon="code" href="https://reference-server.pipecat.ai/en/latest/api/pipecat.services.groq.llm.html">
    Pipecat's API methods for Groq integration
  </Card>

  <Card title="Example Implementation" icon="play" href="https://github.com/pipecat-ai/pipecat/blob/main/examples/function-calling/function-calling-groq.py">
    Complete example with function calling
  </Card>

  <Card title="Groq Documentation" icon="book" href="https://console.groq.com/docs/api-reference#chat-create">
    Official Groq API documentation and features
  </Card>

  <Card title="Groq Console" icon="microphone" href="https://console.groq.com/">
    Access models and manage API keys
  </Card>
</CardGroup>

## Installation

To use Groq services, install the required dependency:

```bash theme={null}
uv add "pipecat-ai[groq]"
```

## Prerequisites

### Groq Account Setup

Before using Groq LLM services, you need:

1. **Groq Account**: Sign up at [Groq Console](https://console.groq.com/)
2. **API Key**: Generate an API key from your console dashboard
3. **Model Selection**: Choose from available models with ultra-fast inference

### Required Environment Variables

* `GROQ_API_KEY`: Your Groq API key for authentication

## Configuration

<ParamField path="api_key" type="str" required>
  Groq API key for authentication.
</ParamField>

<ParamField path="base_url" type="str" default="https://api.groq.com/openai/v1">
  Base URL for Groq API endpoint.
</ParamField>

<ParamField path="model" type="str" default="None" deprecated>
  Model identifier to use.

  *Deprecated in v0.0.105. Use `settings=GroqLLMService.Settings(model=...)` instead.*
</ParamField>

<ParamField path="settings" type="GroqLLMService.Settings" default="None">
  Runtime-configurable settings. See [Settings](#settings) below.
</ParamField>

### Settings

Runtime-configurable settings passed via the `settings` constructor argument using `GroqLLMService.Settings(...)`. These can be updated mid-conversation with `LLMUpdateSettingsFrame`. See [Service Settings](/pipecat/fundamentals/service-settings) for details.

This service uses the same settings as `OpenAILLMService`. See [OpenAI LLM Settings](/api-reference/server/services/llm/openai#settings) for the full parameter reference.

## Usage

### Basic Setup

```python theme={null}
import os
from pipecat.services.groq import GroqLLMService

llm = GroqLLMService(
    api_key=os.getenv("GROQ_API_KEY"),
    model="llama-3.3-70b-versatile",
)
```

### With Custom Settings

```python theme={null}
from pipecat.services.groq import GroqLLMService

llm = GroqLLMService(
    api_key=os.getenv("GROQ_API_KEY"),
    settings=GroqLLMService.Settings(
        model="llama-3.3-70b-versatile",
        temperature=0.7,
        top_p=0.9,
        max_completion_tokens=1024,
    ),
)
```

## Notes

* Groq provides ultra-fast inference using custom LPU (Language Processing Unit) hardware.
* Groq fully supports the OpenAI-compatible parameter set inherited from `OpenAILLMService`.

<Tip>
  The `InputParams` / `params=` pattern is deprecated as of v0.0.105. Use
  `Settings` / `settings=` instead. See the [Service Settings
  guide](/pipecat/fundamentals/service-settings) for migration details.
</Tip>
