Back to Templates
This n8n workflow submits an image generation job to Havis AI Nano Banana 2, waits for processing, polls task status, and returns result data when the job completes.
https://havis.ai/api/nano-banana-2.https://havis.ai/api/task/{task_id}.api_key. Use only the key value; the workflow adds Bearer automatically.For production, store the API key in n8n credentials or environment variables instead of typing it into a public form.
prompt (Required) - stringmode (Optional) - stringaspect_ratio (Optional) - stringresolution (Optional) - stringoutput_format (Optional) - stringimages - collected from form URL fields{
"prompt": "A cyberpunk cityscape at night, ultra detailed",
"mode": "text-to-image",
"aspect_ratio": "16:9",
"resolution": "2K",
"output_format": "png"
}
POST https://havis.ai/api/nano-banana-2GET https://havis.ai/api/task/{task_id}task_id - The generation task ID returned by Havis AI.status - Usually completed, processing, or failed.model - The public model slug.result_urls - JSON string containing final R2/CDN result URLs.credits_used - Credits deducted for the submitted task when returned by the API.submitted_payload - The exact JSON payload sent to Havis AI.Return Result to expose this as your own mini API.Return Result to keep a generation log.401 or 403: check your API key.402: the account does not have enough credits or model pricing is missing.422: required fields are missing or a field value is invalid.https://havis.ai; use an API key created for Havis AI.