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-120b for general use.
  • We recommend using openai/gpt-oss-20b for faster results.
  • We recommend using qwen/qwen3.6-27b 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.

export GROQ_API_KEY=***

Example

Install the groq package:

uv pip install -U agno groq

Use 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

ParameterTypeDefaultDescription
idstr"openai/gpt-oss-120b"The id of the Groq model to use
namestr"Groq"The name of the model
providerstr"Groq"The provider of the model
api_keyOptional[str]NoneThe API key for Groq (defaults to GROQ_API_KEY env var)
base_urlOptional[Union[str, httpx.URL]]NoneThe base URL for the Groq API (uses the Groq SDK default when unset)
timeoutOptional[int]NoneRequest 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.