POST /v1/data/ai/images/run
Pricing: Metered: you pay exactly each call’s cost at the selected model’s rates (default Google: Nano Banana (Gemini 2.5 Flash Image): the model’s own rate).
Request
Send the inputs underparams. Only the keys below are accepted; any other key returns 422 invalid_params.
What to draw, one prompt per line. Each prompt makes Count images, one call and one row each.
The image model. Pick from the list (popular models first). Each model shows its own rates, per image or per 1M image tokens, and that is exactly what each image costs.67 allowed values, for example
google/gemini-2.5-flash-image (Google: Nano Banana (Gemini 2.5 Flash Image)), google/gemini-nano-banana-2.1 (Google: Nano Banana 2.1), google/gemini-3.1-flash-lite-image (Google: Nano Banana 2 Lite (Gemini 3.1 Flash Lite Image)), google/gemini-3.1-flash-image (Google: Nano Banana 2 (Gemini 3.1 Flash Image)), openai/gpt-image-2.6-sunburst (OpenAI: GPT Image 2.6 Sunburst), openai/gpt-image-2.6-flare (OpenAI: GPT Image 2.6 Flare), openai/gpt-image-2.5-sunburst (OpenAI: GPT Image 2.5 Sunburst), black-forest-labs/flux-3-image-klein (Black Forest Labs: FLUX 3 Image Klein), black-forest-labs/flux-3-image (Black Forest Labs: FLUX 3 Image), bytedance-seed/seedream-5-5 (ByteDance Seed: Seedream 5.5). Fetch the full list with GET /v1/data/ai/images?expand=options.The image shape, e.g. 1:1 or 16:9. Leave blank for the model’s default. Only the ratios the selected model offers are accepted.28 allowed values, for example
1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9. Fetch the full list with GET /v1/data/ai/images?expand=options.The size tier, e.g. 1K, 2K or 4K, on models that offer one. Leave blank for the model’s default.Allowed values:
1K, 1.5K, 2K, 4K, 512, 768.Rendering quality (low, medium, high…) on models that offer it. Leave blank for the model’s default.Allowed values:
auto, low, medium, high, xhigh, max.The file type (png, jpeg, webp…) on models that offer a choice. Leave blank for the model’s default.Allowed values:
png, jpeg, webp, gif, svg.How many images to make for each prompt, 1 to 4. Each image is its own call and its own row.Allowed values:
1, 2, 3, 4.Optional public image URLs to edit or draw from, for models that take reference images. One prompt with several images runs the prompt on each image; several prompts with one image uses that image for each prompt. Several prompts with several images is refused.
Example
Response fields
Each row indata is one image, keyed by these fields.