Transform images with AI-powered editing
You have a batch of images that need AI-powered transformations—like turning photos into paintings, adding stylistic effects, or modifying content based on text prompts.
Automatically create descriptive captions for images using AI vision models.
Images · Notebook · Updated
Colab runs it in your browser. If it calls a model provider, it asks for that provider's API key in a cell.
You add a computed column that sends each image to a vision model with a captioning prompt. New images are captioned automatically on insert.
pip install pixeltable openai
OPENAI_API_KEYopenai.chat_completions()pxt.create_table()insert()add_computed_column()# Add caption using OpenAI visionmessages = [{'role': 'user','content': [{'type': 'text','text': 'Write a concise, descriptive caption for this image in one sentence.',},{'type': 'image_url', 'image_url': images.image},],}]images.add_computed_column(caption=chat_completions(messages, model='gpt-4o-mini'))
One cell of the notebook, copied as it is. Open it in Colab for the rest.
You have a batch of images that need AI-powered transformations—like turning photos into paintings, adding stylistic effects, or modifying content based on text prompts.
Run the same AI prompt against multiple images automatically, without writing loops or managing API calls.
Use AI vision to extract JSON data from receipts, forms, documents, and other images.
You need to add watermarks to hundreds of different images to protect copyright, add branding, or mark drafts.