
After a network disconnect during an Imagild submission, retry the same operation with its saved idempotency key and unchanged request. A missing HTTP response does not prove that the server rejected the job. If you already saved a task ID, read that task instead of resubmitting generation.
Key Takeaways
- Persist the request and operation key before the first network call.
- A transport timeout ends your wait; it does not establish server-side cancellation.
- A deliberately different prompt, model, or resolution belongs to a new approved operation.
Locate the last confirmed checkpoint
First ask what your application actually knows:
| Last evidence | Appropriate next action |
|---|---|
| Request never left your application | Send the saved operation when access is ready |
| Request sent; acknowledgment missing | Recover using the original key and request |
| HTTP 202 and task ID saved | Poll the saved task |
| Task reports success | Download and inspect the existing output |
| Task reports unknown outcome | Reconcile that operation; do not manufacture a replacement |
Do not display “generation failed” solely because a client socket closed. A more accurate message is “Connection interrupted; checking the existing request.”
AWS's safe-retry article describes uncertain outcomes after network failures. That is a general distributed-systems problem, not evidence of an Imagild outage or a competitor's current failure rate.
Replay the saved files rather than rebuilding the request
Suppose your private working directory already contains operation-id.txt and request.json from the original submission. This POSIX shell example performs one bounded recovery attempt. It does not create a fresh operation key.
test -s operation-id.txt && test -s request.json || exit 1
OPERATION_ID=$(cat operation-id.txt)
HTTP_STATUS=$(curl --silent --show-error \
--connect-timeout 10 --max-time 30 \
--output recovery.json --dump-header recovery.headers \
--write-out '%{http_code}' \
'https://imagild.com/api/relay/v1/images/generations' \
-H "Authorization: Bearer $IMAGILD_API_KEY" \
-H 'Content-Type: application/json' \
-H "Idempotency-Key: $OPERATION_ID" \
--data-binary @request.json) || exit 2
test "$HTTP_STATUS" = '202' || exit 3
jq -er '.data.id' recovery.json > task-id.txt
The example assumes curl, jq, and a backend-loaded credential. Thirty seconds is a local transfer budget, not a promised generation time. A timeout leaves the operation unresolved; retain the saved files and inspect or recover again under a bounded application policy.
Check that the returned task ID is durably stored before resuming the user interface. For an existing accepted operation, same parsed parameters reuse its task. Changed parameters with the same key return a conflict.
Interpret HTTP errors separately from disconnection
A confirmed validation response, an authentication denial, and no response at all are different conditions. Stripe's advanced error-handling documentation separates request-content, network, and server failures. Its payment-specific replay rules do not define Imagild behavior.
In Imagild, inspect the response status, sanitized error.code, and any request_id. Respect retry guidance when rate limited. Restore valid credentials or membership when required; repeatedly changing the image prompt cannot repair an access problem.
Keep the original valid payload. Strict image JSON accepts the published model, prompt, resolution, and optional reference selector fields; do not insert a diagnostic flag into that body.
Avoid turning recovery into an accidental retake
The current image schedule is 1K for 10 points, 2K for 15, and 4K for 20. Creating a new key to escape uncertainty can authorize a second paid task while the first still exists. Review the model market and points planning guide before offering another candidate.
The API console describes access and task polling. Active membership remains required even during recovery; a points purchase alone does not restore eligibility.
If the provider outcome is unknown, preserve the operation and seek reconciliation using sanitized identifiers. The failed-job next-action guide helps distinguish that state from confirmed failure. Stable replay protects against duplicate submissions; it is not a global exactly-once promise or a guarantee that every interruption resolves immediately.
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: Same parsed parameter reuse, task polling, access eligibility and authentication.
- Imagild model market: Current point prices for image tiers.
- AWS safe retries: A missing acknowledgment can leave an uncertain outcome after a network failure.
- Stripe advanced error handling: Distinguishing content, network and server failure classes before deciding a retry action.
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.