Video modelsAPI referenceCreate a video

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

API Key: X-API-Key: <API Key> or Authorization: Bearer <API Key>.

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": {}}

Header Parameters

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.

Request Body

application/json
  1. body
mode*string

Generation 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.

Value in"t2va""fl2va""ref2va"
prompt*string

Video prompt. It can use markers that refer to the images, videos and audio provided in references.

Length1 <= length <= 20000
duration*integer

Video duration in seconds. The minimum and maximum for the selected model are given in models[] from GET /v1/video/config.

Range1 <= value <= 30
Default5
ratio*string

Video aspect ratio. Some models require adaptive for first/last-frame requests; follow the selected model's settings.

Value in"16:9""9:16""1:1""4:3""3:4""21:9""adaptive"
seed?integer

Optional deterministic seed from 0 to 2147483647. Omit it when the selected model does not support seeds.

Range0 <= value <= 2147483647
references*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.

Itemsitems <= 50
resolution*Resolution

Video 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.

Default"768p"
Value in"768p""2k""480p""720p""1080p""4k"
model?string

Model 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.

Value in"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?integer

The rate_version from the quote response. If the rate has changed, the submission is rejected and a new quote is required.

Range1 <= value
style_preset?string

Style 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.

Itemsitems <= 30
generate_audio?boolean

Whether to generate audio with the video. Defaults to true.

quote_id?string

Quote 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.

Response Body

Request succeeded

application/json
  1. response
estimate_detail*
id*Id
reserved_credits*Reserved Credits
status*JobStatus
Value in"queued""processing""succeeded""failed""cancelled"
type*JobType
Value in"tts""avatar""video""video_analysis""image""voice_design""audio_composition"

On this page