> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Groq

> Use Groq's fast inference API with Agno agents.

Groq provides fast inference endpoints for large language models.

See all Groq-supported models [here](https://console.groq.com/docs/models).

* We recommend using `llama-3.3-70b-versatile` for general use.
* We recommend using `llama-3.1-8b-instant` for faster results.
* We recommend using `meta-llama/llama-4-scout-17b-16e-instruct` for image understanding.

## Multimodal Support

With Groq we support `Image` as input.

## Authentication

Set your `GROQ_API_KEY` environment variable. Get your key from [here](https://console.groq.com/keys).

```bash Mac theme={null}
export GROQ_API_KEY=***
```

```bash Windows theme={null}
setx GROQ_API_KEY ***
```

## Example

Install the `groq` package:

```shell theme={null}
uv pip install -U agno groq
```

Use `Groq` with your `Agent`:

```python agent.py theme={null}
from agno.agent import Agent
from agno.models.groq import Groq

agent = Agent(
    model=Groq(id="llama-3.3-70b-versatile"),
    markdown=True
)

# Print the response in the terminal
agent.print_response("Share a 2 sentence horror story.")

```

> [!NOTE]
>
> View more examples [here](https://agno-v2.mintlify.site/models/providers/gateways/groq/usage/basic-stream.md).

## Parameters

| Parameter | Type | Default | Description |
| - | - | - | - |
| `id` | `str` | `"llama-3.3-70b-versatile"` | The id of the Groq model to use |
| `name` | `str` | `"Groq"` | The name of the model |
| `provider` | `str` | `"Groq"` | The provider of the model |
| `api_key` | `Optional[str]` | `None` | The API key for Groq (defaults to GROQ\_API\_KEY env var) |
| `base_url` | `Optional[Union[str, httpx.URL]]` | `None` | The base URL for the Groq API (uses the Groq SDK default when unset) |
| `timeout` | `Optional[int]` | `None` | Request timeout in seconds |

`Groq` uses the `groq` Python SDK. It is a subclass of the [Model](https://agno-v2.mintlify.site/reference/models/model.md) class and has access to the same params. See the [Groq reference](https://agno-v2.mintlify.site/reference/models/groq.md) for all parameters.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.