Back to Docs
Recipe
Recipe: Bulk image captioner
Pipe a folder of screenshots through a vision model and get back a CSV with filenames and AI-generated captions — no manual labeling.
Ingredients
- A folder of PNG or JPEG images (screenshots, product photos, diagrams)
- OpenAI API key with GPT-4V access
- Python 3.11+ with
openaiandpillow - Meridian CLI installed and authenticated
Steps
- Drop images into a single directory. Supported:
.png,.jpg,.jpeg. - Set your OpenAI key:
export OPENAI_API_KEY=sk-... - Run the captioner:
meridian caption --input ./screenshots --output captions.csv - Review the CSV. Columns:
filename,caption,confidence.
Flags
| Flag | Default | Description |
|---|---|---|
| --model | gpt-4o | Vision model to use |
| --max-tokens | 300 | Max caption length |
| --concurrency | 4 | Parallel API calls |
Pro tip
Pipe the CSV straight into a fine-tuning job: meridian caption ... | meridian finetune --dataset -