
Plan reference uploads and generation submissions together because they share Imagild's current ten-write-per-minute account budget. Uploading four photos and then requesting two images from each means twelve writes, not eight. Split the work into durable phases and dispatch ready items gradually rather than uploading the entire set in one uncontrolled burst.
Key Takeaways
POST /filesand image or video generation both consume the write allowance.- A known, usable owned reference can be reused without uploading it for every variation.
- Generation idempotency does not imply an idempotency contract for uploads.
Count the dependency graph in requests
A reference-based generation has at least two conceptual stages: establish an owned reference and submit a generation using that reference. The Imagild API guide documents multipart upload followed by JSON generation.
For four separate product photos with two 1K variants each:
| Stage | Requests | Planned generation points |
|---|---|---|
| Upload four photos | 4 writes | Not an image-generation task |
| Generate eight 1K variants | 8 writes | 80 |
| Total | 12 writes | 80 generation points |
This plan exceeds one current sixty-second write allowance. The arithmetic is not a promise that the batch finishes after a specific number of minutes. Upload duration, throttling, generation time and other account traffic remain separate.
Check the model hub for current point costs. Membership eligibility and the points budget must be approved independently of the request count.
Save each upload before unlocking dependents
For each photo, keep its local application identity, original filename, returned data.file_id and dependent generation items. The ID belongs to that account; do not copy an ID from another customer's record.
Use a small application checklist rather than a fictional batch endpoint:
- Claim one pending upload and acquire a write slot.
- Upload the file using multipart field
photo. - Persist the returned file ID against that source.
- Mark only that source's dependent generations ready.
- Submit those generations through the same write scheduler.
A generation must not bind “the most recently uploaded photo” from a shared variable. With concurrent work, that can silently attach a different product. Use the reference attachment audit to inspect the actual mapping.
Reuse a reference when the creative input is unchanged
If six intended variants all use the same available owned photo, one upload followed by six submissions makes seven writes. Re-uploading the same source before each variant would make twelve. This is a client workflow improvement, not a way to evade the account allowance.
Keep the source identity and approval stable. If the user replaces the photo, create a new source record instead of relabeling existing generations. If an old reference is unavailable, repair that dependency explicitly; a cached filename alone does not prove that the server still has a usable asset.
A completed owned image task can alternatively supply image_task_id. Do not send both reference selectors, and do not confuse accepted image work with a completed source.
Handle upload and generation retries differently
Generation requests require Idempotency-Key, which should remain stable for an identical retry. The upload endpoint does not expose the same operation-reuse contract. Do not claim that adding that header makes a lost upload response resolve to a guaranteed single asset.
If an upload outcome is unclear, preserve the source record and classify the situation before releasing dependent work. If a generation task already exists, keep its task ID. Avoid generating again merely because an upload-stage UI was reset.
Let your multipart client construct its boundary; MDN's FormData guide explains why manually copying a JSON content-type header is inappropriate for that request.
Test mixed traffic rather than renders alone
Use local fixtures for four uploads and eight generations. Inspect one combined dispatch log to confirm that both phases acquire the same account write gate. Add a 429, a failed source upload and a process restart.
Only dependents of a failed source should remain blocked. Successfully accepted generations should retain their IDs and continue to completion checks. Use the failed-job guide for targeted diagnosis. Pass the workflow when every result traces to its intended reference and no recovery restarts the entire twelve-write plan.
Related tasks
- After Reordering References, Does “Image 1” Still Point to the Right File?
- What Should You Check Before Retrying a Failed Image or Video Job?
Sources and scope
- Imagild API console: Current request limits, retry handling, authentication and asynchronous task lifecycle.
- Imagild model hub: Current model options and media-generation point costs, separate from request-rate budgets.
- MDN Using FormData Objects: Multipart boundary construction belongs to the multipart client rather than a copied JSON content-type header.
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.