Overview
Instead of manually constructingPhotoVariation JSON, you can describe what you want in plain English. The text_to_variation() function uses Gemini 2.5 Flash to convert your description into a valid config.
Usage
- Python
- CLI (via API)
- MCP
Example Descriptions
| Description | Key Config Generated |
|---|---|
| ”perfect scan-like photo” | angle: "straight", motion_blur: false, glare: "none" |
| ”quick photo taken in a hurry by a warehouse worker” | motion_blur: true, skew: "moderate", hand_visible: true, glove: "warehouse glove" |
| ”document with grease stains, folded, old phone” | stain.type: "grease", folds: "multiple", camera: "budget Android" |
| ”cropped photo missing the header” | cropped_header: true, missing_area: "top 10-15%" |
| ”stapled multi-page document on a desk” | stapled: true, stacked_sheets_behind: 2, hand_visible: false |
The generated config follows the exact
PhotoVariation schema. You can use it directly or modify specific fields before generating photos.