> ## Documentation Index
> Fetch the complete documentation index at: https://phidatainc-agui.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 offers blazing-fast API endpoints for large language models.

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

* We recommend using `llama-3.3-70b-versatile` for general use
* We recommend `llama-3.1-8b-instant` for a faster result.
* We recommend using `llama-3.2-90b-vision-preview` 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

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` | `str`           | `"https://api.groq.com/openai/v1"` | The base URL for the Groq API                             |
| `timeout`  | `Optional[int]` | `None`                             | Request timeout in seconds                                |

`Groq` extends the OpenAI-compatible interface and supports most parameters from the [OpenAI model](/models/providers/native/openai/completion/overview).
