---
title: "Working with BFL FLUX in Pixeltable"
description: "This notebook demonstrates how to use Black Forest Labs (BFL) FLUX models for image generation and editing through Pixeltable."
url: "https://www.pixeltable.com/notebooks/working-with-bfl"
updated: "2026-04-10"
---

# Working with BFL FLUX in Pixeltable

This notebook demonstrates how to use Black Forest Labs (BFL) FLUX models for image generation and editing through Pixeltable.

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

## What it covers

- Text-to-Image Generation
- Image Editing
- Using Seeds for Reproducibility
- Image Expansion (Outpainting)
- Inpainting with Fill
- Best Practices
- Learn More

## What it uses

- **Install:** `pip install pixeltable`
- **Environment variables it names:** `BFL_API_KEY`
- **Pixeltable calls:** `bfl.generate()`, `bfl.edit()`, `bfl.expand()`, `bfl.fill()`, `pxt.create_table()`, `add_computed_column()`, `insert()`

## A look at the code

```python
# Create a table for image generation
prompts_t = pxt.create_table(
    'bfl_demo.prompts',
    {'prompt': pxt.String, 'style': pxt.String},
    if_exists='replace',
)

# Add a computed column that generates images from prompts
prompts_t.add_computed_column(
    image=bfl.generate(
        prompts_t.prompt, model='flux-pro-1.1', width=1024, height=1024
    )
)
```

## Open it

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