> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zeroruntime.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Groq

> Use the Groq LLM plugin in a Zero Runtime pipeline for low-latency inference. Setup, options, and usage in Python.

Groq is an **LLM** plugin built for low-latency inference. It takes the transcribed
conversation and generates the reply, running open models such as Llama on Groq's LPU
hardware.

## Setup

Set your Groq API key in the worker environment. Generate a key from the [Groq console](https://console.groq.com/keys):

```bash theme={null}
export GROQ_API_KEY=<key>
```

## Usage

Import the plugin and pass it to the pipeline's `llm` slot.

<CodeGroup>
  ```python Python theme={null}
  from zeroruntime.plugins import GroqLLM

  llm = GroqLLM(
      model="llama-3.3-70b-versatile",
      temperature=0.7,
  )

  # Pipeline(llm=llm, ...)
  ```
</CodeGroup>

<Note>
  `GroqLLM` ships in the Python SDK only. On Node JS, use [another LLM plugin](/runtime-sdk/plugins/llm/openai) instead.
</Note>

## Configuration Options

*Constructor parameters for `GroqLLM`. The Python and Node JS SDKs share these field names.*

| Parameter | Type | Default | Description |
| - | - | - | - |
| `api_key` | `str` | `None` | Groq API key. Falls back to the `GROQ_API_KEY` environment variable when unset. |
| `model` | `str` | `"llama-3.3-70b-versatile"` | Groq model used to generate replies (e.g. `llama-3.1-8b-instant`, `openai/gpt-oss-20b`, `openai/gpt-oss-120b`, `groq/compound`, `groq/compound-mini`). |
| `temperature` | `float` | `0.7` | Sampling randomness; lower is more deterministic. |
| `max_output_tokens` | `int` | `1024` | Maximum tokens to generate per response. |
| `top_p` | `float` | `None` | Nucleus-sampling probability cutoff. |
| `frequency_penalty` | `float` | `None` | Penalises tokens by how often they appear, reducing repetition. |
| `presence_penalty` | `float` | `None` | Penalises tokens that have already appeared, encouraging topic diversity. |
| `seed` | `int` | `None` | Seed for reproducible sampling. |
| `stop` | `str` | `None` | Stop sequence that halts generation. |
| `user` | `str` | `None` | End-user identifier passed to the API. |
| `tool_choice` | `str` | `None` | How the model decides when to call tools (`"auto"`, `"none"`, `"required"`, or a specific tool name). |
| `parallel_tool_calls` | `bool` | `None` | When `True`, the model may emit multiple tool calls in a single turn. |
| `response_format` | `dict` | `None` | Structured output format descriptor (e.g. `{"type": "json_object"}`). |
| `reasoning_effort` | `str` | `None` | Reasoning token budget hint for supported reasoning models (`"low"`, `"medium"`, `"high"`). |
| `reasoning_format` | `str` | `None` | Controls how the reasoning chain is surfaced (`"parsed"`, `"raw"`, `"hidden"`). |
| `service_tier` | `str` | `None` | Groq service tier (`"on_demand"`, `"flex"`, `"performance"`, `"auto"`). |

## Import paths

| SDK | Import | Constructor |
| - | - | - |
| Python | `from zeroruntime.plugins import GroqLLM` | `GroqLLM(...)` |

The reply is streamed to the [text-to-speech](/runtime-sdk/plugins/tts/cartesia) plugin, which
synthesizes the agent's voice.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.