> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agno.com/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).

<CodeGroup>
  ```bash Mac theme={null}
  export GROQ_API_KEY=***
  ```

  ```bash Windows theme={null}
  setx GROQ_API_KEY ***
  ```
</CodeGroup>

## Example

Install the `groq` package:

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

Use `Groq` with your `Agent`:

<CodeGroup>
  ```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.")

  ```
</CodeGroup>

<Note> View more examples [here](/models/providers/gateways/groq/usage/basic-stream). </Note>

## 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](/reference/models/model) class and has access to the same params. See the [Groq reference](/reference/models/groq) for all parameters.
