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

# Working with Replicate in Pixeltable

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

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

## What it uses

- **Install:** `pip install pixeltable replicate`
- **Environment variables it names:** `REPLICATE_API_TOKEN`
- **Pixeltable calls:** `replicate.run()`, `pxt.create_table()`, `add_computed_column()`, `join()`, `insert()`

## A look at the code

```python
from pixeltable.functions.replicate import run

# Create a table in Pixeltable and pick a model hosted on Replicate with some parameters

t = pxt.create_table('replicate_demo/chat', {'prompt': pxt.String})

input = {
    'system_prompt': 'You are a helpful assistant.',
    'prompt': t.prompt,
    # These parameters are optional and can be used to tune model behavior:
    'max_tokens': 300,
    'top_p': 0.9,
    'temperature': 0.8,
}
t.add_computed_column(
    output=run(input, ref='meta/meta-llama-3-8b-instruct')
)
```

## Open it

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