> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2-himanshu-v3-tools-models-docs.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 `openai/gpt-oss-120b` for general use.
* We recommend using `openai/gpt-oss-20b` for faster results.
* For image understanding, Groq's current options are Preview-tier only — see [Multimodal Support](#multimodal-support) below.

<Warning>
  Groq shut down `llama-3.3-70b-versatile` and `llama-3.1-8b-instant` on 2026-08-16 for free and developer-tier keys (enterprise customers with a committed-spend contract are unaffected — see [Groq's deprecations page](https://console.groq.com/docs/deprecations)). Agno v3.0 defaults to `openai/gpt-oss-120b`; the old ids return a 404 from Groq.
</Warning>

## Multimodal Support

With Groq we support `Image` as input, on vision-capable models.

Groq's [vision docs](https://console.groq.com/docs/vision) list the current image-capable models — `qwen/qwen3.6-27b` and `qwen/qwen3.8-27b`. Groq classes both as Preview models, which it describes as suitable for evaluation rather than production and subject to discontinuation at short notice. Groq names `qwen/qwen3.6-27b` as the replacement for the retired `meta-llama/llama-4-scout-17b-16e-instruct`. The default `openai/gpt-oss-120b` does not accept images.

## 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="openai/gpt-oss-120b"),
      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`                             | `"openai/gpt-oss-120b"` | 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.
