
A finished Imagild API result can return a membership-related 403 because downloads and task reads require active membership at the time of the request. Earlier payment for generation does not turn the content route into a public or permanently authorized URL. First inspect the JSON error code; a 403 alone is not evidence that the generated file was deleted.
Key Takeaways
- Completion and current download authorization are separate conditions.
- Check key validity, membership, and account ownership before resubmitting a finished task.
- Restore authorized access and download the existing result; do not pay for another generation to repair an access problem.
Start with the status response
Suppose your application recorded succeeded on Monday but downloads fail on Friday. Begin by reading the saved task ID with the currently deployed credential:
curl --silent --show-error --dump-header task.headers \
--output task-status.json --write-out '%{http_code}\n' \
"https://imagild.com/api/relay/v1/tasks/$TASK_ID" \
-H "Authorization: Bearer $IMAGILD_API_KEY"
Inspect the HTTP status, then the JSON error.code and error.request_id if present. An invalid, expired, or revoked key can return 401. A valid key whose account lacks active membership can return 403 with RELAY_MEMBERSHIP_REQUIRED.
Do not diagnose every 403 as the same problem. Record the actual code and confirm the account state in the API console.
Keep the access and media questions separate
| Observation | What to investigate next |
|---|---|
| 401 with invalid-key error | Selected secret, expiry, revocation, and Authorization header |
| 403 with membership-required error | Current membership of the key's owning account |
| Task not found under a valid account | Task ID and account ownership, without guessing another user's identifiers |
| Successful task read, non-successful task state | The task's outcome and error, not only HTTP transport |
Successful task read and succeeded | Authenticated content request and downloaded file validation |
Membership is checked before the protected task resource is served. A membership denial therefore cannot tell you whether the media file currently exists. The OWASP authorization guidance describes the broader principle: authorization is evaluated for protected operations, not granted forever by a previous successful request.
Check which account owns the operation
A task belongs to its account. Rotating to a new key on the same authorized account is different from replacing the deployment with a key from another account. The second change does not transfer task ownership.
Review your own saved operation record and credential inventory. You should be able to identify the original account, task ID, request date, and operation identifier without printing a secret. Avoid probing nearby task IDs or asking a customer to send an entire API key for troubleshooting.
Buying points alone does not resolve expired membership. Equally, a membership restoration does not guarantee that every old media link is a lifetime archive. Check current availability after authorized access is restored.
Download the existing result after access is restored
Once the task can be read and still reports succeeded, retrieve its content using an authenticated request:
curl --silent --show-error --fail-with-body \
--dump-header result.headers --output result.bin \
"https://imagild.com/api/relay/v1/tasks/$TASK_ID/content" \
-H "Authorization: Bearer $IMAGILD_API_KEY"
The returned output_url is a private API route. An ordinary browser image or video element cannot invent the required Authorization header. Serve approved media through a suitably authenticated application layer; never add the key to a query string to make a player work.
If the saved file is actually an HTML document, use the download-format diagnostic instead of treating the extension as proof of successful delivery.
Add an archive checkpoint to the workflow
Store approved media and its task metadata in storage you control, subject to the rights and privacy requirements of the project. Verify the stored copy before considering the delivery complete. The Imagild archive guide provides a practical backup checklist.
This prevents a later membership, credential, or temporary-link change from becoming a surprise in your own application. It also keeps costs understandable: the fix for an access failure is to resolve access, while a new 1K, 2K, or 4K image is a new operation costing 10, 15, or 20 points.
Related tasks
- Why Does My Downloaded Image Open as a Web Page?
- How to Archive Imagild Assets Before the 90-Day Storage Window Ends
Sources and scope
- Imagild API console and integration guide: Product entry point and current API access, credential and task integration instructions; detailed facts also cross-checked against the 2026-10-28 repository contract.
- OWASP REST Security Cheat Sheet: General REST security principles: endpoint authorization, secure handling of credentials, input validation and response content-type checks. Does not define Imagild product behavior.
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.