Generate image
generate_imageCreate or edit images from a text prompt, using reference image URLs for edits and variations. Returns a hosted image URL for download or reuse.
Instructions
Generate or edit an image from a text prompt. Defaults to Google Nano Banana Pro. Pass image_urls to edit or use reference images. Returns the image URL. (To upscale an existing image, use upscale_media instead.)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | Optional seed for reproducible output. Same seed + same input gives the same result on supported models. | |
| wait | No | Default true: wait for the job and return the finished result. Set false to get the task_id back immediately and poll with get_task — use for long jobs (high-quality video, full songs) or when the connection might time out. | |
| model | No | Model, as a short alias or full id. Aliases: 'nano-banana-pro' (default), 'nano-banana', 'nano-banana-2', 'nano-banana-2-lite', 'flux', 'gpt-image', 'qwen', 'kling-image', 'grok-image', 'seedream'. Full ids also work. See list_models. (Upscaling lives in upscale_media, not here.) | |
| prompt | Yes | Text prompt describing the image (or the edit to apply to image_urls). | |
| image_url | No | Convenience: a single reference/source image (same as image_urls with one entry). | |
| image_urls | No | Reference/source images for editing and multi-reference generation — each must be a public https URL. Upload a local file first and pass the returned file_url; never a local path, and never inline base64. The max count is per-model. | |
| resolution | No | Output resolution; omit for the model's default. Per-model: some take sizes like '2k', some megapixels, some have no resolution field. | |
| aspect_ratio | No | Output aspect ratio, e.g. '1:1'. Per-model: some accept different sets, some have none. | |
| callback_url | No | Optional webhook URL. When set, the tool returns immediately with the task_id and UnificAlly POSTs the result to this URL when the task finishes. Webhook body: { task_id, status: 'completed'|'failed', data: { video_url | image_url | audio_url | ... }, error_message? } — note the media arrives under 'data', not 'output'. Use for long jobs instead of waiting. | |
| confirm_cost | No | Only relevant if the operator enabled a spend guard. When a call exceeds the configured confirm threshold it returns a quote; retry with confirm_cost: true to proceed. Safe to ignore otherwise. | |
| negative_prompt | No | Optional description of what to avoid in the output (supported by Qwen, Wan and some others). | |
| provider_options | No | Escape hatch for model-specific fields not exposed as named parameters (e.g. Kling multi_shots, Flux steps). Merged into the API 'input' payload. Rejected: fields the tool already manages (prompt, media URLs, task_id, ...) and reserved routing/billing/auth keys (model, callback_url, dry_run, api_key, authorization) — switch models with the 'model' parameter, not here. See https://docs.unifically.com for per-model fields. |