Create a video
Create a video generation job. Before submitting, read the video generation settings and get a video quote, then pass the quote's quote_id and rate_version as quote_id and quote_version. Mode, duration, aspect ratio, resolution and reference counts must match the selected model's settings.
Authentication
Credentials in the examples are placeholders. Replace them and run the examples on your server.
Code examples
curl -X POST 'https://shixux.com/api/v1/video/generate' \ -H 'X-API-Key: yb_xxx_yyy' \ -H 'Content-Type: application/json' \ -H 'Idempotency-Key: your-unique-business-action-id' \ -d '{"model":"seedance-2.5-flash","mode":"t2va","prompt":"A lighthouse by the sea, a slow camera move, waves and wind.","duration":5,"ratio":"16:9","resolution":"720p","seed":42,"references":[],"quote_id":"quote_xxx","quote_version":1}'{ "id": "job_xxx", "type": "tts", "status": "queued", "reserved_credits": 1, "estimate_detail": {}}Idempotency-Key?|Idempotency key of up to 128 characters. Reuse the same value when retrying the same request; using it for a different request returns 409.
application/json- body
mode*stringGeneration mode. Video supports t2va, fl2va and ref2va; images support text-to-image and image-to-image. The modes each model supports are given by the corresponding settings endpoint.
"t2va""fl2va""ref2va"prompt*stringVideo prompt. It can use markers that refer to the images, videos and audio provided in references.
1 <= length <= 20000duration*integerVideo duration in seconds. The minimum and maximum for the selected model are given in models[] from GET /v1/video/config.
1 <= value <= 305ratio*stringVideo aspect ratio. Some models require adaptive for first/last-frame requests; follow the selected model's settings.
"16:9""9:16""1:1""4:3""3:4""21:9""adaptive"seed?integerOptional deterministic seed from 0 to 2147483647. Omit it when the selected model does not support seeds.
0 <= value <= 2147483647references*array<>Video reference media. kind is image, video or audio, and role is reference, first or last. First/last-frame mode uses at most one first-frame image and one last-frame image.
items <= 50resolution*ResolutionVideo resolution. minmax-h3-flash and minmax-h3-pro accept 768p or 2k (2k output is automatically enhanced). For other models, use the resolutions returned by GET /v1/video/config.
"768p""768p""2k""480p""720p""1080p""4k"model?stringModel ID. For image and video models, use the corresponding settings endpoint for current availability, resolutions and rates. Speech synthesis and audio composition accept indextts-2 (default) or indextts-2.5.
"minmax-h3-flash""minmax-h3-pro""wan3.0-video""seedance-2.0""seedance-2.5""seedance-2.5-flash""kling-4.0""seedance-2.0-mini""seedance-2.0-fast"quote_version?integerThe rate_version from the quote response. If the rate has changed, the submission is rejected and a new quote is required.
1 <= valuestyle_preset?stringStyle preset. Only send a value from style_presets returned for the selected model by GET /v1/video/config.
voice_bindings?array<>Binds a person in a reference image to an audio asset to set that person's voice. Each person image can be bound to at most one audio asset; for unbound people, describe the voice in the prompt.
items <= 30generate_audio?booleanWhether to generate audio with the video. Defaults to true.
quote_id?stringQuote ID returned by POST /v1/video/quote, bound to the model, media, duration and other parameters of the quoted request. Get a new quote whenever the request changes.
Request succeeded
application/json- response
estimate_detail*id*Idreserved_credits*Reserved Creditsstatus*JobStatus"queued""processing""succeeded""failed""cancelled"type*JobType"tts""avatar""video""video_analysis""image""voice_design""audio_composition"