
Resume a refreshed page from a task record in your own backend, then read the existing Imagild task using its saved ID. A browser refresh should reconstruct the interface; it should not repeat the generation POST. Keep provider credentials on the server, even when the browser needs live status.
This article covers your application's refresh behavior, rather than claiming that a browser tab itself owns a durable generation queue. Review the actual provider routes in the Imagild API console.
Key Takeaways
- Persist the operation before submission and attach the task ID after acceptance.
- Restore task cards from an authenticated, owner-scoped application record.
- Reloading a view must call status reads, never create another generation automatically.
Separate the browser's draft from the accepted operation
An editable prompt is a draft. Once the user authorizes generation, create a stable operation record on your server. It should identify the application user, chosen model and parameters, idempotency key, and eventual Imagild task ID.
A browser's component state disappears on refresh. Local storage can help restore an unfinished draft, but it should not hold your API secret or become the authoritative record for paid work. Two tabs can disagree about local values; your backend must decide which existing operation each user may access.
The general asynchronous pattern is also described in Runware's task-polling documentation: an acknowledgment precedes result retrieval. Imagild uses its own task routes and does not inherit Runware's webhook or SDK behavior.
Define a small application-side recovery contract
The following routes are examples you implement in your own application. They are not additional Imagild API endpoints.
| Your application route | Browser purpose | Server responsibility |
|---|---|---|
GET /app/media-operations | Restore visible task cards | Return only the signed-in user's permitted records |
GET /app/media-operations/{operationId} | Read an existing card | Resolve its saved task ID and perform an authenticated provider GET |
POST /app/media-operations | Start explicitly approved work | Persist identity, validate budget and submit once |
The browser's hydration can be as small as:
async function restoreMediaCards() {
const response = await fetch("/app/media-operations", {
credentials: "same-origin",
cache: "no-store"
});
if (!response.ok) throw new Error("Cannot restore operations");
const payload = await response.json();
return payload.operations;
}
Your application defines payload.operations; this is not the Imagild response envelope. Its server-side reader uses GET /tasks/{id} on the base URL https://imagild.com/api/relay/v1 with a Bearer key, then maps data.status into the relevant card.
Handle the refresh boundary explicitly
There are three useful refresh checkpoints. Before the generation is submitted, restore the draft and ask for normal confirmation. After acceptance, restore the same task card and resume bounded GET polling. During a lost submission response, locate the existing operation and recover using its original idempotency key with unchanged parameters.
Do not create a new operation merely because the restored record lacks a cached preview. Output availability is a later checkpoint, and downloading successful media requires valid membership and authentication.
Keep the accepted model and resolution on the operation. If a user changes the current dropdown after returning, that selection should apply to a future draft, not rename the historical task. The resolution and points guide helps explain why an intentionally revised image has a separate quote.
Check ownership before checking progress
Do not accept an arbitrary task ID from a browser and read it with a shared account key without verifying the signed-in user's application permissions. Imagild checks account ownership, but your application may have several customers inside one provider account. You remain responsible for separating those customers.
Avoid a public task-list page containing private prompts or download paths. A successful task's output_url is still a private provider route, not a secret-free public asset link.
Run a refresh acceptance test
Use one existing controlled operation. Refresh while it is queued, revisit after completion, and open a second authorized tab. Confirm that all views resolve to the same task ID and that no hydration request reaches a generation POST.
Then sign in as another application user and verify the operation is hidden. Finally, simulate a failed state and ensure the restored card keeps its error instead of showing an endless spinner. Use the failed-job checklist for that message. Refresh recovery passes when identity, ownership, status and spending remain intact.
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 and integration guide: Current Imagild entry point, active-member access, asynchronous task reading and authenticated output contract; implementation facts cross-checked in lib/relay and the 2026-10-28 claims manifest.
- Runware Task Polling: General asynchronous acknowledgment/result separation and spaced polling. Runware-specific task shapes, partial results, SDKs and webhooks are not attributed to Imagild.
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.