
Add a daily spending cap in your own application by reserving a local budget allowance before submitting each Imagild operation. Make that allowance transactional and keep unresolved work in the commitment total. The public API does not expose a built-in daily-cap field that you can add to a generation request.
The Imagild API console defines the allowed request body. Your cap is an application control layered around that contract, and it does not replace account membership or the provider's point reservation.
Key Takeaways
- Include both completed spending and outstanding commitments when checking a cap.
- Claim the allowance once per logical operation, even when a worker is retried.
- Keep unknown outcomes committed until their actual billing outcome is reconciled.
Define exactly what the cap limits
Choose a budget owner, such as one customer or one internal campaign, and state the reset timezone. Decide whether the limit is in points or an explicitly documented currency allocation.
Points are usually easier for a first implementation because the task reports points directly. A USD allocation also needs a pack-unit method and a decision about whether membership belongs in that reporting view. Do not silently mix those bases.
A cap enforced by one application cannot stop someone spending from the same Imagild account through the website or another integration. It controls the work that passes through your own submission path.
Calculate headroom with pending work included
Suppose today's application cap is 300 points. Completed operations have consumed 120, and an unresolved task holds another 60. A proposed four-second 768P video without enhancement needs 60.
committed after approval = 120 consumed + 60 held + 60 proposed
= 240 points
remaining cap headroom = 300 - 240 = 60 points
Ignoring the unresolved task would overstate headroom. Likewise, a browser timeout is not evidence that its sixty-point commitment vanished.
The model hub supplies current model settings and rates. The points planning guide explains the shared account wallet outside your application's cap.
Make approval atomic in your database
Use a transaction around the local budget decision, not around an external network call. An illustrative sequence is:
BEGIN
lock the applicable budget row
if operation already exists: return its existing allowance
reject if consumed + held + proposed exceeds cap
insert operation and allowance with a unique operation identity
insert a durable submission/outbox event
COMMIT
worker submits the saved request using its saved Idempotency-Key
These are design steps, not SQL for a particular database and not new Imagild endpoints. Use uniqueness and appropriate locking in your actual database. A process-level JavaScript counter is not sufficient across multiple servers.
Stripe's idempotency reference documents stable identity as a retry-safety principle. Its specific replay rules do not apply here; preserve Imagild's original operation key and parsed parameters when recovering that operation.
Reconcile allowance without double counting
After a task succeeds, move its local commitment from held to consumed once. After a confirmed failed reservation is released, remove the held allowance once. Save the observed task usage as evidence for either transition.
An unknown task stays unresolved. Do not free its allowance merely because the day rolled over. State whether outstanding commitments carry into the next day's headroom, and implement that rule explicitly.
A cap rejection should prevent submission, not silently choose another model or a shorter video. An expanded campaign needs its own approval, rather than an automatic cap increase.
Test simultaneous approvals and restart recovery
With 60 points of headroom, send two simultaneous local requests for sixty-point videos using fixtures. Only one new allowance should be approved. Deliver its outbox event twice and confirm both deliveries retain one logical operation identity.
Restart the worker while a task is unresolved and verify that its local commitment survives. Test a later release and ensure the allowance is restored only once. The failed-job checklist helps distinguish an actual failure from uncertain waiting.
This creates an inspectable application budget. It does not promise a provider-enforced cap, a distributed exactly-once system or automatic compensation for work outside your integration.
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: Current active-member access, generation contract and per-task usage fields, independently cross-checked in lib/relay and claims.json dated 2026-10-28.
- Imagild model hub: Current image 10/15/20-point tiers, H3 duration/resolution rates and five-point enhancement option; not a quality or comparative availability benchmark.
- Stripe Idempotent Requests: Stable logical request identity as a general retry-safety design principle. Stripe-specific replay, key lengths, expiration and payment guarantees are not applied 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.