Skip to content

Create Video Generation Task

A generic endpoint for submitting text-to-video / image-to-video jobs. Returns a task ID; poll Get generation task status for results. For OpenAI Sora-compatible format, see Sora Format; for vendor-specific formats, see Kling Format and Jimeng Format.

Endpoint

POST /v1/video/generations

Request parameters

ParameterTypeRequiredDescription
modelstringYesModel / style ID
promptstringNoText prompt
imagestringNoImage input for image-to-video (URL or Base64)
durationnumberNoVideo duration (seconds)
width / heightintegerNoVideo width / height
fpsintegerNoFrame rate
seedintegerNoRandom seed
nintegerNoNumber to generate
response_formatstringNoResponse format, e.g. url
metadataobjectNoExtra parameters (e.g. negative_prompt, style, quality_level)

Request example

bash
curl https://ai.youqi.tech/v1/video/generations \
  -H "Authorization: Bearer sk-YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "seedance-1.0",
    "prompt": "An astronaut stands up and walks away",
    "duration": 5,
    "width": 1280,
    "height": 720
  }'

Response example

json
{ "task_id": "abcd1234efgh", "status": "queued" }

TIP

Supported resolutions, durations, and image-to-video capabilities vary by model — check the selected model's actual capabilities. Video generation jobs usually take a while; poll for status rather than waiting synchronously.