---
title: "Working with Gemini in Pixeltable"
description: "Use Google Gemini from Pixeltable with a Google AI Studio API key or Vertex AI: generate content, images with Nano Banana and Imagen, and video with Veo."
url: "https://www.pixeltable.com/notebooks/working-with-gemini"
updated: "2026-10-23"
---

# Working with Gemini in Pixeltable

Use Google Gemini from Pixeltable with a Google AI Studio API key or Vertex AI: generate content, images with Nano Banana and Imagen, and video with Veo.

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

## What it covers

- Generate content
- Generate images with Nano Banana
- Generate images with Imagen
- Generate video with Veo
- Generate video from an existing image

## What it uses

- **Install:** `pip install pixeltable google-genai`
- **Environment variables it names:** `GEMINI_API_KEY`, `GOOGLE_API_KEY`
- **Pixeltable calls:** `pxt.create_table()`, `add_computed_column()`, `insert()`

## A look at the code

```python
from google.genai.types import GenerateContentConfigDict

# Create a table in Pixeltable and pick a model hosted on Google AI Studio with some parameters

t = pxt.create_table('gemini_demo/text', {'input': pxt.String})

config = GenerateContentConfigDict(
    max_output_tokens=500, temperature=1.0, top_p=0.95, top_k=40
)
t.add_computed_column(
    output=pxtf.gemini.generate_content(
        t.input, model='gemini-2.5-flash', config=config
    )
)
```

## Open it

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