Skip to main content
Generates images from a text prompt. With reference_images attached it edits/composes from them (put a product on a model, restyle a photo, keep a face consistent); without references it generates purely from text.

Routing

The default model: "auto" routes by whether references are attached:
  • With reference_imagesnano-banana-2 (reference-driven editing/composition).
  • Withoutgpt-image-2 (text-to-image).
You can pin model explicitly, with one hard rule: nano-banana-2 requires at least one reference image — it is an edit model and a ref-less request to it is rejected with a 400.

Arguments

Example — text-to-image

Example — reference-driven edit

Response

202 with run_id and credits_charged; poll GET /api/v1/runs/{run_id}. On completed, output is an array of durable image URLs — one per count. On failed, credits are refunded instantly.