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.
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).
Authorization and Value to Bearer YOUR_VELIN_KEY. Save it as VELIN API Key.https://raw.githubusercontent.com/velin-api/velin-image-api/main/n8n-velin-image-workflow.json (or download the file and use Import from File).VELIN API Key credential. The file contains no real credential, so n8n flags these nodes until you do.| Node | What it does |
|---|---|
| Manual Trigger / Webhook | Two ways in. The webhook path is velin-image and accepts JSON. |
| Set Params | Reads prompt, model, size, resolution from the request body, with defaults (gpt-image-2.5-flare, 1:1, 1K). |
| Create Task | HTTP Request, POST https://72agi.com/api/generate, multipart form, Header Auth credential. Returns the task id. |
| Wait 10s → Get Task | Waits 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 URL | Outputs imageUrl (https://72agi.com + the returned url), taskId and priceCny. |
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.
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.
No. The workflow uses only core n8n nodes: Webhook or Manual Trigger, Set, HTTP Request, Wait and IF.
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.
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.
No. Credits are reserved when you submit a task and refunded automatically if it fails.
Top up with USDT on the billing page; the balance is credited automatically. Card payments are coming soon.
Free tests are available on request: message @ayan8866e on Telegram. There are no automatic free credits.
By default 8 single-image generations per minute per account (HTTP 429 above that). Ask on Telegram for higher limits.
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.
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.