generate_image
Generate a 2D image from a text prompt asynchronously. Returns an asset ID to retrieve the completed image via polling or the wait_for_asset function.
Instructions
Generate a 2D image from a text prompt (async). Returns an asset { id }; then call wait_for_asset (or poll get_asset) until taskStatus=2 and read files.image (PNG URL). Costs credits — see list_models(category='image'). Omit model for the default. Up to 4 reference image URLs can guide the result (best with nano-banana).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | engine name from list_models(category='image') | |
| prompt | Yes | ||
| aspect_ratio | No | e.g. "1:1", "16:9", "9:16" | |
| reference_image_urls | No |