Generate videos
Submit a video task and get a task_id right away. MiniMax H3 and Seedance both produce sound, from text, first/last frames or reference media.
https://api.jiufeng.ai/v1/videos/generations- Asynchronous, like images: submitting returns a
task_id; the video is indata.result.videos[0].urlof the task result - API default resolutions differ from the web app: MiniMax H3 defaults to
2K, Seedance to720P— passresolutionexplicitly for the cheaper tiers - First/last frames use different fields: MiniMax H3 takes
first_frame_image/last_frame_image, Seedance takesimage_with_roles
Videos usually take tens of seconds to a few minutes: poll Query tasks every 5–30 s, or wait for a Webhook callback.
MiniMax H3
Every MiniMax H3 clip comes with stereo sound at 24 fps.
MiniMax H3's API default resolution is 2K (1.56 credits per second), while the Jiufeng web app defaults to 768P (0.75 credits per second). Send "resolution": "768P" explicitly if you want the cheaper tier.
Three ways to drive a video
The mode is decided by which media fields you send — there is no mode parameter.
| Mode | Send | Notes |
|---|---|---|
| Text to video | prompt (+ size) | size picks the aspect ratio; default 16:9 |
| First / last frame | first_frame_image (+ last_frame_image) | The aspect ratio follows the first frame; size is ignored. A last frame needs a first frame |
| Multimodal reference | image_urls / video_urls / audio_urls | Use subjects, motion or sound from your media. Audio must come with at least one image or video |
Request parameters
modelstringrequiredMiniMax-H3 — spell it exactly as shownpromptstringrequiredresolutionstringoptional768P or 2K. Default 2Kdurationintegeroptionalsizestringoptional21:9, 16:9, 4:3, 1:1, 3:4, 9:16. Default 16:9; any other value is treated as 16:9 without an errorfirst_frame_imagestringoptionallast_frame_imagestringoptionalfirst_frame_imageimage_urlsstring[]optionalvideo_urlsstring[]optionalaudio_urlsstring[]optionalwebhookstringoptionalAll media must be publicly reachable https:// URLs.
Example cost (768P): 5 s × 0.75 = 3.75 credits (see the “H3 text” example).
Full example: submit and wait
Video usually takes from tens of seconds to a few minutes — poll every 5–30 s, or use a Webhook.
Seedance
Three Seedance models share this endpoint. Each clip comes with sound by default.
model | resolution | Best for |
|---|---|---|
seedance-2.5 | 480P, 720P, 1080P | Highest quality; billed by the amount actually generated |
seedance-2.0 | 480P, 720P, 1080P, 4K | Stable quality, the only Seedance with 4K (slow: a 5 s 4K clip takes about 5–6 minutes) |
seedance-2.0-fast | 480P, 720P | Faster and cheapest |
The doubao-seedance-* spellings (for example doubao-seedance-2.0) are also accepted and land on the same model and price. Prices: Pricing.
Seedance's API default resolution is 720P, while the Jiufeng web app defaults to 480P. Send "resolution": "480P" explicitly if you want the cheaper tier.
Seedance request parameters
modelstringrequiredseedance-2.5, seedance-2.0 or seedance-2.0-fastpromptstringrequiredresolutionstringoptional720P. 1080P on seedance-2.0-fast is rejected with 400; 4K is not supported on seedance-2.5 — don't send itdurationintegeroptionalsizestringoptional16:9, 4:3, 1:1, 3:4, 9:16, 21:9 or adaptive. With a first / last frame, leave it out or send adaptive (seedance-2.5 rejects other values with 400)image_with_rolesobject[]optional[{"url": "…", "role": "first_frame"}]. role is first_frame, last_frame or reference_image. First and last frames must be sent hereimage_urlsstring[]optionalimage_with_rolesvideo_urlsstring[]optionalseedance-2.5: up to 30 s each and in total). Their length is billed too (see Pricing)audio_urlsstring[]optionalseedance-2.5: up to 30 s each and in total). Longer media is rejected with 400generate_audiobooleanoptionaltruewebhookstringoptionalDon’t mix first / last frames with reference media: together with reference images (image_urls) it is not supported; together with reference videos or audio, the frames are no longer used as frames and are treated as reference_image. All media must be publicly reachable https:// URLs.
Example cost (seedance-2.0-fast, 480P): 5 s × 0.491 = 2.455 credits (see the “Seedance text” example).
Response fields
Submitting returns a task_id. Once done, Query tasks puts the video URL at data.result.videos[0].url[0]; expires_at is when it expires (result files are kept for 30 days) and credits_cost is what was charged. Query result once complete (GET /v1/tasks/{task_id}):
Common errors
| HTTP | When | What to do |
|---|---|---|
400 | Invalid parameters (e.g. 1080P on seedance-2.0-fast, reference media too long); or model misspelled / not enabled for your key (model_not_available) | Update the request as the error message says; GET /v1/models lists usable models |
401 | Missing key (missing_api_key) or invalid key | Check Authorization: Bearer sk-… |
402 | Insufficient credits, key quota exhausted, or key expired | Top up, raise the cap, or create a new key |
429 | Rate limited | Back off per the Retry-After header and retry |
Full list: Errors.