7 models 廊 gallery 订 pricing API docs
Guide

n8n image generation workflow: Nano Banana & GPT Image

Import a ready-made n8n workflow that creates a VELIN task, polls it and returns the image URL. About $0.037 per image, failed generations not charged.

Import the workflow

The VELIN GitHub kit ships an importable workflow, n8n-velin-image-workflow.json. It creates a task, waits, polls, and returns the image URL. Price: ¥0.25 (about $0.037) per image, failed generations not charged (pricing).

  1. Get an API key: sign in at 72agi.com, copy it from My account, and top up on the billing page (USDT; card payments coming soon) or ask for a free test.
  2. In n8n go to Credentials → New → Header Auth. Set Name to Authorization and Value to Bearer YOUR_VELIN_KEY. Save it as VELIN API Key.
  3. Import the workflow: in a new workflow use the top-right menu, Import from URL, and paste https://raw.githubusercontent.com/velin-api/velin-image-api/main/n8n-velin-image-workflow.json (or download the file and use Import from File).
  4. Open the Create Task and Get Task nodes and select your VELIN API Key credential. The file contains no real credential, so n8n flags these nodes until you do.
  5. Run it with the Manual Trigger (edit the defaults in Set Params), or send a JSON POST to the Webhook URL.

What the nodes do

NodeWhat it does
Manual Trigger / WebhookTwo ways in. The webhook path is velin-image and accepts JSON.
Set ParamsReads prompt, model, size, resolution from the request body, with defaults (gpt-image-2.5-flare, 1:1, 1K).
Create TaskHTTP Request, POST https://72agi.com/api/generate, multipart form, Header Auth credential. Returns the task id.
Wait 10s → Get TaskWaits 10 seconds, then GET https://72agi.com/api/task/{id}.
Succeeded? / Failed? / Timed Out?Loops until status is succeeded. Stops with an error on failed (not charged) or after about 15 minutes.
Image URLOutputs imageUrl (https://72agi.com + the returned url), taskId and priceCny.

Call it by webhook

Use the production URL n8n shows on the Webhook node (activate the workflow first):

curl -X POST https://YOUR-N8N-HOST/webhook/velin-image \
  -H "Content-Type: application/json" \
  -d '{"prompt": "a red fox in fresh snow, golden hour", "model": "nano-banana-pro", "size": "3:2", "resolution": "2K"}'

The request returns after the image is ready (about 1 to 2 minutes) with imageUrl, taskId and priceCny. Model ids: nano-banana-pro, nano-banana-2, gpt-image-2, gpt-image-2.5-flare, gpt-image-2.5-sunburst. See GPT Image 2 / 2.5 API.

Build it by hand

Prefer your own nodes? Two HTTP Request nodes are enough.

Create Task: method POST, URL https://72agi.com/api/generate, Authentication: Generic Credential Type → Header Auth (the credential above), Send Body on, Body Content Type Form-Data, with fields:

prompt      = {{ $json.prompt }}
model       = nano-banana-pro
size        = 16:9
resolution  = 1K
# optional, up to 14 times: refs = <binary file field>

The response is {"id": "...", "status": "queued"}. Then a Wait node (10 s) and Get Task: method GET, URL:

https://72agi.com/api/task/{{ $('Create Task').item.json.id }}

Branch on {{ $json.status }}: loop back to Wait while it is queued or processing; on succeeded the image is at https://72agi.com{{ $json.url }}; on failed read $json.error (the task is not charged). Add a counter (for example $runIndex above 90) to give up after about 15 minutes. Add another HTTP Request node with the image URL and Response Format: File if you want the binary in the workflow.

FAQ

Do I need a community node?

No. The workflow uses only core n8n nodes: Webhook or Manual Trigger, Set, HTTP Request, Wait and IF.

Why does the workflow poll?

Image generation takes about 45 to 100 seconds. VELIN is asynchronous: you create a task and poll it, so a dropped connection never loses the image.

What does the webhook return?

The Webhook node responds when the last node finishes, so it answers only once the image is ready (about 1 to 2 minutes). Make sure your caller's HTTP timeout allows that. The output item contains imageUrl, taskId and priceCny.

Do I pay for failed generations?

No. Credits are reserved when you submit a task and refunded automatically if it fails.

How do I pay?

Top up with USDT on the billing page; the balance is credited automatically. Card payments are coming soon.

Can I get a free test?

Free tests are available on request: message @ayan8866e on Telegram. There are no automatic free credits.

What are the rate limits?

By default 8 single-image generations per minute per account (HTTP 429 above that). Ask on Telegram for higher limits.

Get started

  1. Sign in at 72agi.com and copy your API key from My account.
  2. Top up with USDT on the billing page (card payments are coming soon).
  3. Call the API. Full reference: API docs. Ready-made examples: GitHub kit.

Want a free test, higher rate limits or volume pricing? Message @ayan8866e on Telegram. Free tests are on request; there are no automatic free credits.

Ask for a free test on Telegram→ Read the API docs→

More guides

Nano Banana and Gemini are trademarks of Google. GPT Image is a trademark of OpenAI. VELIN is an independent service and is not affiliated with or endorsed by either company. Competitor prices are quoted from the linked public pages on the date shown and may change.