·n8n Integration
n8n Integration
Generate AI images inside your n8n workflows using HTTP Request nodes. The API responds synchronously — no polling needed.
How it works
- Node 1 — POST to generate endpoint → response has
image_urlimmediately - Node 2 — Use
image_urlto download, send via email, upload to S3, etc.
1
Submit the image generation
Add an HTTP Request node with the configuration below.
FieldValue
Method
POSTURL
https://api.apinanobanana.com/v1/images/generateAuth
Header → Authorization: Bearer nb_sk_...Body
JSON (see code panel →)The response comes back immediately with image_url and image_base64.
2
Use the image URL
Use {{ $json.image_url }} in subsequent nodes to:
- →Download and save to disk or cloud storage
- →Send as an email attachment
- →Post to Slack, Discord, or Telegram
- →Store URL in a database or Airtable
Image-to-image
To edit an existing image, add image_url pointing to your source image in the request body. The URL must be publicly accessible.
Check credit balance
Add a GET node before your generation to verify sufficient credits:
FieldValue
Method
GETURL
https://api.apinanobanana.com/v1/account/creditsAuth
Header → Authorization: Bearer nb_sk_...Related pages