
A 30-second request is rejected because the current Imagild video API accepts an integer seconds value from 4 through 15 for each generation. A larger number does not turn the request into a multi-shot film. To target a longer sequence, plan separate valid clips and assemble approved outputs in your own editing workflow.
Key takeaways
- Send a JSON number such as
10; strings, fractions and values outside 4–15 are invalid. - Do not silently shorten the user's 30-second request to 15 seconds.
- Separate clip generation, usable-footage review and external timeline assembly.
Check the duration field before submission
The field is named seconds, not duration, and its value belongs to the video request body. Check the current model entry in the Imagild model hub and the request structure in the API integration guide.
A frontend can prevent an avoidable rejection with an explicit validator. This example intentionally rejects unsupported input rather than coercing it or silently clamping it:
function videoSeconds(value) {
if (!Number.isInteger(value) || value < 4 || value > 15) {
throw new Error("Choose a whole number of seconds from 4 through 15.");
}
return value;
}
videoSeconds(10); // accepted
// videoSeconds(30), videoSeconds(4.5), videoSeconds("10"): rejected
Show the error beside the control before the user confirms spending. Accepting numeric text from a form requires a deliberate conversion and validation step; the API itself expects a JSON number.
Keep the creative request visible
A user asking for 30 seconds may mean one continuous action, a three-shot sequence or a finished advertisement with titles. Those are different production requirements. Ask the user to choose a shot plan instead of pretending that a shorter clip fulfills the original instruction.
Three ten-second requests are valid duration choices, but they remain three independent generations. Each needs a prompt, a supported ratio and resolution, an operation identity and a task record. Continuous characters and motion across those clips require review and may need additional work.
The reference-video intent guide helps separate creative objectives. It does not add reference-video input or recreation endpoints to this API.
Quote the plan before starting it
At 768P, three ten-second clips total 450 points with enhancement disabled: three multiplied by ten seconds multiplied by 15 points. If enhancement is enabled for all three, the plan adds 15 points, reaching 465. At 2K, the same base duration totals 900 points before optional enhancement.
Those figures cover requested generation duration. They do not promise 30 usable edited seconds, and a separately generated image reference adds its own cost. Active membership is required in addition to enough points. The points guide provides account-budget context.
Require a fresh confirmation if the user changes the number of clips, resolution or duration. A failure correction should not quietly become a larger paid batch.
Separate validation from asynchronous completion
Fixing seconds only gets the request past this particular boundary. A submitted task still has to complete. HTTP 202 indicates acceptance rather than completion, as documented by MDN.
Store each returned task ID and poll its status. Download only successful outputs, then inspect their media and playback. A task response can carry an error even when the status lookup itself succeeds over HTTP.
If you change an invalid planned request into a different valid generation, use a new operation identity for the new body. If an already submitted request merely loses its network response, retry with its original key and parameters. An unknown outcome needs reconciliation, not a replacement request with a fresh key.
Approve usable footage before assembling
Review each clip for complete action, usable beginnings and endings, correct framing and unwanted audio. A requested ten-second duration does not establish that every second is suitable for the final cut. Record any trim separately from the generation request.
Pass this workflow when the application rejects invalid values clearly, valid clips finish and download, and the final external edit satisfies the intended sequence. If a join stutters or continuity fails, revise the shot or edit the join; neither a valid duration nor enhancement guarantees a seamless film.
Related tasks
- Why Did My Reference-Video Request Generate a New Scene Instead of Editing the Clip?
- Imagild Points, Resolution and Jobs: Plan a Creation Before You Spend
Sources and scope
- Imagild API integration guide: Actual request contract, supported references, asynchronous tasks and active-membership access.
- Imagild model hub: Current H3 duration, resolution and ratio choices, video point rates and optional enhancement surcharge.
- MDN HTTP 202 Accepted: Asynchronous HTTP acceptance is not evidence of completed generation.
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.