
Build an n8n Imagild workflow with separate nodes for submission, waiting, status reads, and outcome branches. Use the generic HTTP Request node; there is no requirement for a dedicated Imagild node. Persist the operation key and returned task ID outside a single transient execution so recovery does not submit another paid image.
Key Takeaways
- The submit node runs once per approved operation; polling loops back to status, never to submission.
- Route on task status as well as HTTP errors.
- Keep credentials in n8n's credential handling rather than hardcoding them into exported workflow JSON.
Prepare an approved operation record
Before the HTTP node runs, load or create a durable application record containing the owning account, approved payload, idempotency key, and any existing task ID.
If that record already has a task ID, start at status reading. A new n8n execution ID is not proof of a new creative request. Do not generate another operation key automatically when an execution is retried.
The Imagild API console supplies the Base URL and active-membership requirement. The n8n HTTP Request documentation covers generic REST requests and credential configuration.
Configure one image submission
Use POST with this URL:
https://imagild.com/api/relay/v1/images/generations
Supply Bearer authentication through a protected credential and add the saved Idempotency-Key header. Send a JSON body, not form data:
{
"model": "gpt-image-2.5",
"prompt": "A blue ceramic vase on a pale stone plinth in soft window light",
"resolution": "1K"
}
Require HTTP 202 before saving data.id. This example assumes the HTTP node returns the parsed JSON body directly. If you configure full response details, adapt downstream expressions to that response wrapper rather than assuming the body is still at the root.
Save the task ID immediately. In a body-only response, an expression such as {{$json.data.id}} reads the accepted task identifier. Store it under an explicit workflow field before later nodes replace the current item.
Route status through a Wait loop
Create an HTTP GET node for the saved task ID, using the same authorized account. Inspect data.status and use a Switch node to select the next path.
| Task observation | Workflow branch |
|---|---|
succeeded | Authenticated result download and media validation |
failed | Record error and usage; stop dependent generation |
unknown | Preserve the operation and open reconciliation |
| Recognized nonterminal state | Wait, then read the same task again |
| Unrecognized state | Pause for diagnosis rather than assuming success |
The Wait node supports a time interval. Use the task's poll_after_seconds, currently five seconds. The loop returns to GET status, not the POST generation node.
Set your application's maximum waiting budget or review deadline. When it ends, save the task for resumption instead of treating the deadline as server-side cancellation. Do not assume a Wait node alone is your entire durable operation ledger.
Handle transport failures separately
An HTTP error can interrupt execution before a task-state branch runs. Preserve the original key, request, task ID if known, and sanitized error information.
For a lost submission acknowledgment, recover the same operation with unchanged parsed parameters. For a known task, resume its status path. Respect rate-limit retry guidance and avoid multiple execution copies polling the same task unnecessarily.
No Imagild webhook, streaming, cancellation, or OpenAI SDK contract is created by this workflow. This is an application-owned polling integration.
Verify the useful outcome before expanding the flow
Start with fixtures for accepted, waiting, succeeded, failed, unknown, and access-denied responses. Confirm that refreshing or retrying execution does not re-enter submission under a fresh identity.
A real 1K test uses 10 points under the current model market schedule; active membership is separately required. Use points planning to approve that test and the failed-job guide to choose recovery actions. An explicit state graph makes both spend and failure handling inspectable.
Related tasks
- Imagild Points, Resolution and Jobs: Plan a Creation Before You Spend
- What Should You Check Before Retrying a Failed Image or Video Job?
Sources and scope
- Imagild API console: Async task endpoints, membership, required idempotency header and polling contract.
- Imagild model market: Current1K10-point intentional test budget.
- n8n HTTP Request node: Generic REST methods, body/response settings and credential handling.
- n8n Switch node: Conditional multi-route workflow branches.
- n8n Wait node: Time-interval pause before reading the task again.
Product instructions were checked against the current Imagild API contract and the public model catalog. Code, budgets and acceptance checks are illustrative; this article does not claim a new paid generation test, an uptime measurement, a search-volume study or a ranking of AI citations.
Prepared by Imagild Editorial, the company editorial team responsible for these guides. AI assisted research and drafting. This is documentation-based guidance with proposed examples, not a claim of hands-on testing or an independent product review. Report a correction.
Cover: Original Imagild product screenshot captured on 28 October 2026; model availability and prices may change. This image is not an API response or a performance benchmark.