Skip to main content
Pixeltable Logo

License tests status nightly status stress-tests status PyPI Package Python

Quick Start | Documentation | CLI | Dashboard | llms-full.txt | Starter Kit | AI Coding Skill | Discord

Make Building Multimodal AI Data Apps Dead Simple

Pixeltable is the unified multimodal backend for AI data apps. One Python API: store media, run models, index embeddings, serve endpoints, and version everything in a single system instead of gluing together blob storage, a vector DB, an orchestrator, and edge functions. Chunking, embeddings, agents, and serving run from computed columns on insert, not glue scripts you maintain separately. Transactions, caching, retries, and observability are built in. Extend with @pxt.udf, @pxt.uda, and @pxt.query.

Core Capabilities

Expand any row for what Pixeltable replaces, a quick example, and doc links. Examples assume import pixeltable as pxt.

Store: unified multimodal interface

pxt.Image, pxt.Video, pxt.Audio, pxt.Document, pxt.Json: one table for structured and media data with destination= for S3, GCS, Azure, R2, and more. Not S3 + Postgres + boto3 sync.

t = pxt.create_table(
    'media',
    {
        'img': pxt.Image,
        'video': pxt.Video,
        'audio': pxt.Audio,
        'document': pxt.Document,
        'metadata': pxt.Json,
    },
)

Type system · Tables & data · Cloud storage

Import / export: I/O without glue scripts

create_table(source=...), path/URL insert(), Hugging Face, export_parquet(), PyTorch, COCO, and more. Not per-format ETL scripts.

# Create a table from a file, URL, or Hugging Face dataset
pxt.create_table('app/data', source='data.csv')
pxt.create_table('app/reviews', source=hf_dataset)

# Append rows into an existing table from a path or URL
t.insert('s3://my-bucket/new_rows.parquet')

# Export to analytics/ML formats
pxt.io.export_parquet(t, 'data.parquet')
pytorch_ds = t.to_pytorch_dataset('pt')  # PyTorch DataLoader ready
coco_path = t.to_coco_dataset()  # COCO annotations

CSV import · Hugging Face · PyTorch export · Media processing

Iterate: explode media into rows

create_view() with iterators splits documents into chunks, video into frames, audio into segments, and typed JSON lists into rows. Not FFmpeg/spaCy pipelines with child tables and foreign keys. For custom explode logic, use @pxt.iterator.

from pixeltable.functions.document import document_splitter
from pixeltable.functions.json import list_iterator
from pixeltable.functions.video import frame_iterator

# Document chunking with overlap
chunks = pxt.create_view(
    'chunks',
    docs,
    iterator=document_splitter(
        document=docs.doc,
        separators='sentence,token_limit',
        overlap=50,
        limit=500,
    ),
)

# Video frame extraction
frames = pxt.create_view(
    'frames',
    videos,
    iterator=frame_iterator(video=videos.video, fps=0.5),
)

# JSON list column: one row per element (typed pxt.Json column required)
items = pxt.create_view('items', t, iterator=list_iterator(t.tags))

Views · Iterators · Custom iterators · RAG pipeline

Orchestrate: declarative computed columns

add_computed_column() runs incrementally on new or stale rows only. Built-ins cover media processing, embeddings, and 30+ providers. Not Airflow, full reprocesses, or custom retry glue.

# LLM provider
t.add_computed_column(
    summary=openai.chat_completions(
        messages=[{'role': 'user', 'content': t.text}],
        model='gpt-4o-mini',
    ),
)

# Local model inference
t.add_computed_column(
    classification=huggingface.vit_for_image_classification(t.image),
)

# Multimodal vision
t.add_computed_column(
    description=openai.chat_completions(
        messages=[
            {
                'role': 'user',
                'content': [
                    {'type': 'text', 'text': 'Describe this image'},
                    {'type': 'image_url', 'image_url': t.image},
                ],
            },
        ],
        model='gpt-4o-mini',
    ),
)

Computed columns · Built-ins · AI integrations

Extend: your code, with cache and retry

@pxt.udf and @pxt.query with parallelize, cache, and retry. Not one-off handlers with no cache or retry.

@pxt.udf
def format_prompt(context: list, question: str) -> str:
    return f'Context: {context}\nQuestion: {question}'


@pxt.query
def search_by_topic(topic: str):
    return t.where(t.category == topic).select(t.title, t.summary)

UDFs · Custom aggregates

Index: built-in vector search

add_embedding_index() stays in sync with table data. Combine .similarity() with .where() on metadata in one query — not a separate vector DB plus filter pipeline.

t.add_embedding_index(
    'img',
    embedding=clip.using(model_id='openai/clip-vit-base-patch32'),
)

sim = t.img.similarity(string='cat playing with yarn')
results = (
    t.where(t.category == 'pets')       # metadata filter in the same query
    .order_by(sim, asc=False)
    .select(t.img, t.category, score=sim)
    .limit(10)
    .collect()
)

Embedding indexes · Semantic search · Image search app

Query & experiment: prototype to production in one line

.select() and .sample() to test UDFs ephemerally; same expression becomes add_computed_column() when ready. Not notebook experiments rewritten for production.

# Explore: filter, sample, apply UDFs ephemerally
results = (
    t.where(t.score > 0.8)
    .order_by(t.timestamp)
    .select(t.image, score=t.score)
    .limit(10)
    .collect()
)

# Test on a sample (nothing stored, parallelized and cached)
t.sample(5).select(t.text, summary=summarize(t.text)).collect()

# Commit: same expression, full dataset, skips cached rows
t.add_computed_column(summary=summarize(t.text))

Queries & expressions · Iterative workflow

Agents & tools: tool calling and MCP

pxt.tools(), invoke_tools(), and MCP: LLMs choose what to invoke and Pixeltable stores results. Not LangChain loops and manual tool wiring.

mcp_tools = pxt.mcp_udfs('http://localhost:8000/mcp')
tools = pxt.tools(get_weather_udf, search_context_query, *mcp_tools)

t.add_computed_column(
    tool_output=invoke_tools(tools, t.llm_tool_choice),
)

Tool calling · Agentic workflows

Serve: HTTP from schema

pxt service over an application file, or FastAPIRouter routes on your own app. Not hand-written FastAPI endpoints for every table operation.

# app.py
class Docs(TableModel, name='docs'):
    document: pxt.Document
    summary = summarize(document)


api = FastAPIRouter(name='my-service')
api.add_insert_route(Docs, path='/ingest', inputs=[Docs.document], outputs=[Docs.summary])
pxt schema update app.py myapp    # create the tables the models declare
pxt service update app.py myapp   # serve them
from pixeltable.serving import FastAPIRouter

router = FastAPIRouter(prefix='/api', tags=['data'])
router.add_query_route(path='/search', query=search_documents)
router.add_insert_route(table, path='/upload', uploadfile_inputs=['image'])

CLI serving · Deployment overview

Inspect & visualize: errors, tables, and pipelines

pxt errors and queryable errormsg per cell; pxt dashboard opens a local UI to browse tables, preview media, and trace column lineage. Not log scraping or opaque per-row failures.

pxt errors my_table          # rows where a computed column failed
pxt dashboard                # browse tables, preview media, pipeline graph

Table browser · media lightbox · column lineage · per-column errors · CSV export

CLI · Dashboard

Version: time travel

history(), revert(), and snapshot queries for time travel on every insert and schema change. Not DVC, MLflow, and backfill scripts.

t = pxt.get_table('my_table')
t.revert()  # undo last modification
t.history()  # list all versions
snapshot = pxt.get_table('my_table:472')  # query a snapshot

Version control


Three deployment patterns (docs / starter kit):

Pattern What it is You write
Full Backend FastAPI + React web app Python schema + endpoints + frontend
Batch Processing Cron / queue / Cloud Run Job Python script: ingest, compute, export_sql, exit
Declarative API REST API from one application file models + FastAPIRouter routes + pxt service

Installation

pip install pixeltable  # SDK + CLI (pxt ls, rows, errors, …)

AI Agent Skill

Teach AI coding assistants (Cursor, Claude Code, Copilot, etc.). Learn more →

npx skills add pixeltable/pixeltable-skill

Start from a Template

Head start on a production-ready app: scaffold schema, routes, and deployment pattern in one command.

uvx pixeltable-new myapp

Default: declarative serving (one app.py -> pxt service). --backend for FastAPI + React; --batch for cron/queue scripts. Templates from the Starter Kit.

Quick Start

Tables, views and routes in one file: a pxt.Video table, a frame view, one computed column on the frame view, and a single insert endpoint.

# app.py
from __future__ import annotations

import pixeltable as pxt
from pixeltable.functions.video import frame_iterator
from pixeltable.serving import FastAPIRouter

TableModel = pxt.model_base()


class Videos(TableModel, name='videos'):
    video: pxt.Video
    title: pxt.String


class Frames(TableModel, name='frames', base=Videos, iterator=frame_iterator(video=Videos.video, fps=1)):
    thumb = frame.thumbnail((320, 320))  # noqa: F821  (an iterator column, declared by the view)


api = FastAPIRouter(name='video-api')
api.add_insert_route(Videos, path='/videos', inputs=[Videos.video, Videos.title], outputs=[Videos.title])
pxt schema update app.py ''   # create the tables, views and computed columns
pxt service update app.py ''  # start the REST API in the background (POST /videos insert route)
pxt service list              # video-api  http://127.0.0.1:49213  pid 8123  app.py
curl -X POST http://127.0.0.1:49213/videos -H 'Content-Type: application/json' \
  -d '{"video": "https://raw.githubusercontent.com/pixeltable/pixeltable/release/docs/resources/bangkok.mp4", "title": "Bangkok"}'   # insert video; triggers frame extraction + thumb
pxt rows frames -n 1 --cols pos,thumb   # one frame row + computed thumbnail

See CLI serving.

Demo

See Pixeltable in action: table creation, computed columns, multimodal processing, and querying in a single workflow.

https://github.com/user-attachments/assets/b50fd6df-5169-4881-9dbe-1b6e5d06cede

Documentation

One schema for storage, orchestration, and retrieval. What is Pixeltable? · Deployment overview

Topic Guides
Schema & orchestration Type system · Tables & data · Computed columns · Views · Iterators · Embedding indexes · Queries & expressions · Iterative workflow · Version control
Agents & serving Agentic workflows · Tool calling · RAG pipeline · CLI & dashboard · UDFs · Built-ins · 30+ providers
Cloud & storage Cloud storage (S3, GCS, Azure, R2, B2, Tigris) · Configuration · External files · Get started · Cloud services · Public datasets
Local & I/O Storage architecture · CSV import · Hugging Face · PyTorch export · Media processing · Sample apps · Colab tour

Contributing

We love contributions! Whether it's reporting bugs, suggesting features, improving documentation, or submitting code changes, please check out our Contributing Guide and join our Discord Server.

License

Pixeltable is licensed under the Apache 2.0 License.

Release files for pixeltable 0.7.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for pixeltable 0.7.4
File Interpreter ABI Platform
pixeltable-0.7.4-py3-none-any.whl Python 3 none any Details

Release files / pixeltable-0.7.4-py3-none-any.whl

Download URL pixeltable-0.7.4-py3-none-any.whl
Size 1.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
479fb570f78f271270b78ee2fe503b78f501d4b877af54efad94d7a4e1dde66d
BLAKE2b-256 checksum
How to use checksums
b207e64714316e5877e47fdbdb9096eb1f273f7b1fdf32fd93897ce066f84c73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

0.7.10

1 release file

0.7.9

1 release file

0.7.8

1 release file

0.7.7

1 release file

0.7.6

1 release file

0.7.5

1 release file

This release

0.7.4 This release

1 release file

0.7.3

1 release file

0.7.2

1 release file

0.7.1

1 release file

0.7.0

1 release file

0.6.8

1 release file

0.6.7

1 release file

0.6.6

1 release file

0.6.5

1 release file

0.6.4

1 release file

0.6.3

1 release file

0.6.2

1 release file

0.6.1

1 release file

0.6.0

1 release file

0.5.28

1 release file

0.5.27

1 release file

0.5.26

1 release file

0.5.25

1 release file

0.5.24

1 release file

0.5.23

1 release file

0.5.22

1 release file

0.5.21

1 release file

0.5.20

1 release file

0.5.19

1 release file

0.5.18

1 release file

0.5.17

1 release file

0.5.16

1 release file

0.5.15

1 release file

0.5.14

1 release file

0.5.13

1 release file

0.5.12

1 release file

0.5.11

1 release file

0.5.10

1 release file

0.5.9

1 release file

0.5.8

1 release file

0.5.7

1 release file

0.5.6

1 release file

0.5.5

1 release file

0.5.4

1 release file

0.5.3

1 release file

0.5.2

1 release file

0.5.1

1 release file

0.5.0

1 release file

0.4.24

1 release file

0.4.23

1 release file

0.4.22

1 release file

0.4.21

1 release file

0.4.20

1 release file

0.4.19

1 release file

0.4.18

1 release file

0.4.17

1 release file

0.4.16

1 release file

0.4.15

1 release file

0.4.14

1 release file

0.4.13

1 release file

0.4.12

1 release file

0.4.11

1 release file

0.4.10

1 release file

0.4.9

1 release file

0.4.8

1 release file

0.4.7

1 release file

0.4.6

1 release file

0.4.5

2 release files

0.4.4

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.15

2 release files

0.3.14

2 release files

0.3.12

2 release files

0.3.11

2 release files

0.3.9

2 release files

0.3.8

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.30

2 release files

0.2.29

2 release files

0.2.28

2 release files

0.2.26

2 release files

0.2.25

2 release files

0.2.24

2 release files

0.2.23

2 release files

0.2.21

2 release files

0.2.19

2 release files

0.2.18

2 release files

0.2.15

2 release files

0.2.14

2 release files

0.2.12

2 release files

0.2.10

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page