Skip to main content
Open in Kaggle  Open in Colab  Download Notebook
This documentation page is also available as an interactive notebook. You can launch the notebook in Kaggle or Colab, or download it for use with an IDE or local Jupyter installation, by clicking one of the above links.
Pixeltable’s VLM Run integration lets you use VLM Run’s multimodal AI capabilities directly from tables: chat completions, image generation, image editing, annotation, and video generation, without leaving your data workflows.

What is VLM Run?

VLM Run is a multimodal AI platform with an OpenAI-compatible chat completions API and specialized toolsets for:
  • Understanding: Analyze images, documents, and video with natural language
  • Image generation: Create new images from text prompts
  • Image editing: Edit existing images with natural language instructions
  • Visualization: Annotate images with bounding boxes, keypoints, and segmentation masks
  • Video generation: Create videos from text prompts

Documentation

Prerequisites

Important: VLM Run API calls consume credits based on your plan, so monitor your usage to avoid unexpected charges.
To read more about working with API keys in Pixeltable, see Configuration.

Setup

Chat completions

The vlmrun.chat_completions UDF provides direct access to VLM Run’s chat completions API. It accepts an OpenAI-compatible messages list and returns the raw API response as a dictionary.

Text-only messages

Created table ‘text_chat’.
Added 0 column values with 0 errors in 0.01 s
Added 0 column values with 0 errors in 0.01 s
Inserted 1 row with 0 errors in 17.14 s (0.06 rows/s)
                                prompt  
0  What is structured data extraction?   
                                              answer   0  \n\nStructured data extraction is the proc…  

Image understanding

Reference image columns directly in message content. Referenced media is uploaded to VLM Run automatically before each API call.
Created table ‘image_chat’.
Added 0 column values with 0 errors in 0.01 s
Added 0 column values with 0 errors in 0.01 s
Inserted 1 row with 0 errors in 15.18 s (0.07 rows/s)

Document understanding

Process PDFs and other documents by referencing a document column via file_url, combined with the document toolset.
Created table ‘doc_chat’.
Added 0 column values with 0 errors in 0.01 s
Added 0 column values with 0 errors in 0.01 s
Inserted 1 row with 0 errors in 18.07 s (0.06 rows/s)

Models

VLM Run offers three Orion 2 tiers:
See the VLM Run documentation for the full list of models.

Image generation

Use vlmrun.generate_image to create images from text prompts. It returns a PIL.Image.Image that Pixeltable stores as a native pxt.Image column.
Created table ‘image_gen’.
Added 0 column values with 0 errors in 0.01 s
Inserted 1 row with 0 errors in 138.98 s (0.01 rows/s)

Image editing

Pass an image column via the image parameter to generate_image to edit an existing image according to your prompt.
Created table ‘image_edit’.
Added 0 column values with 0 errors in 0.01 s
Inserted 1 row with 0 errors in 86.00 s (0.01 rows/s)

Image annotation (visualization)

Use vlmrun.annotate_image to overlay bounding boxes, keypoints, or segmentation masks on an image using VLM Run’s viz toolset. Unlike generate_image, the input image is required, since you always need an image to annotate.
Created table ‘annotation’.
Added 0 column values with 0 errors in 0.01 s
Inserted 1 row with 0 errors in 368.13 s (0.00 rows/s)

Video generation

Use vlmrun.generate_video to create videos from text prompts. It returns a pxt.Video stored natively in Pixeltable. Note: Video generation can take a minute or more, and document generation over ten minutes. Each VLM Run call waits up to 1800 seconds; to change that, set VLMRUN_TIMEOUT, or timeout in the vlmrun section of the config file.

Document transformation (redaction)

Use vlmrun.generate_document to transform a document and get the edited PDF back as a pxt.Document, for example, redacting PII at scale. Being explicit that you want the rendered PDF (not a text summary) produces the best results. Note: very long documents can exceed the model’s input-token limit; for multi-page PDFs, consider splitting into pages first.

UDF reference

All UDFs require model and accept model_kwargs for additional API parameters.

Learn more

If you build something with VLM Run, let us know!
Last modified on November 7, 2026