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.
- We recommend using
openai/gpt-oss-120bfor general use. - We recommend using
openai/gpt-oss-20bfor faster results. - We recommend using
qwen/qwen3.6-27bfor image understanding.
Multimodal Support
With Groq we support Image as input.
Authentication
Set your GROQ_API_KEY environment variable. Get your key from here.
export GROQ_API_KEY=***Example
Install the groq package:
uv pip install -U agno groqUse Groq with your Agent:
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.")
View more examples here.
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 class and has access to the same params. See the Groq reference for all parameters.