---
title: "Working with Groq in Pixeltable"
description: "Pixeltable's Groq integration enables you to access Groq models via the Groq API."
url: "https://www.pixeltable.com/notebooks/working-with-groq"
updated: "2026-08-19"
---

# Working with Groq in Pixeltable

Pixeltable's Groq integration enables you to access Groq models via the Groq API.

- **Type:** Notebook
- **Group:** Providers

## What it uses

- **Install:** `pip install pixeltable groq`
- **Environment variables it names:** `GROQ_API_KEY`
- **Pixeltable calls:** `groq.chat_completions()`, `pxt.create_table()`, `add_computed_column()`, `insert()`

## A look at the code

```python
from pixeltable.functions import groq

# Create a table in Pixeltable and add a computed column that calls OpenAI

t = pxt.create_table('groq_demo/chat', {'input': pxt.String})

messages = [{'role': 'user', 'content': t.input}]
t.add_computed_column(
    output=groq.chat_completions(
        messages=messages,
        model='openai/gpt-oss-20b',
        model_kwargs={
            # Optional dict with parameters for the Groq API
            'max_tokens': 300,
            'top_p': 0.9,
            'temperature': 0.7,
        },
    )
)
```

## Open it

- **Open in Colab:** https://colab.research.google.com/github/pixeltable/pixeltable/blob/release/docs/release/howto/providers/working-with-groq.ipynb
- **Docs page:** https://docs.pixeltable.com/howto/providers/working-with-groq
- **Source on GitHub:** https://github.com/pixeltable/pixeltable/blob/release/docs/release/howto/providers/working-with-groq.ipynb
