Generate video

Submit a video job, poll it, then fetch the finished file.

POSThttps://clawrouter.com/v1/videos

Video generation is always asynchronous — jobs run for minutes, not seconds. Submitting returns a task ID; you poll that task, and once it succeeds you download the result from the content endpoint.

Submit a job

  • modelstringrequired

    Video model to use, e.g. kling-v3 or viduq2-pro.

  • promptstringrequired

    Description of the video to generate.

  • secondsinteger

    Length in whole seconds; duration works too. Defaults to 5. Supported lengths vary by model.

  • modestring

    Kling: std (720p), pro (1080p) or 4k (kling-v3 and kling-v3-omni only). Defaults to std.

  • metadata.soundstring

    Kling v2.6 and later: "on" for a video with sound, "off" for silent. Defaults to "off".

  • metadata.resolutionstring

    Vidu: 540p, 720p or 1080p. Defaults to 720p. A size such as 1280x720 works too.

  • sizestring

    Kling: aspect ratio, e.g. 1920x1080 or 1080x1920.

  • imagestring

    Image URL for image-to-video. Send two in images for a first and last frame.

  • input_referencestring

    Vidu: reference image URL; makes the job reference-to-video.

curl
curl https://clawrouter.com/v1/videos \
  -H "Authorization: Bearer $CLAWROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kling-v3",
    "prompt": "A paper boat drifting down a rain gutter",
    "mode": "pro",
    "seconds": "10",
    "metadata": { "sound": "on" }
  }'

Poll the task

GEThttps://clawrouter.com/v1/videos/{task_id}
curl
curl https://clawrouter.com/v1/videos/$TASK_ID \
  -H "Authorization: Bearer $CLAWROUTER_API_KEY"

Download the result

GEThttps://clawrouter.com/v1/videos/{task_id}/content

Returns the video bytes once the task has succeeded. Calling it earlier will not wait for the job — poll the task first.

curl
curl https://clawrouter.com/v1/videos/$TASK_ID/content \
  -H "Authorization: Bearer $CLAWROUTER_API_KEY" \
  --output result.mp4

Alternative path

An older pair of routes does the same thing and remains available: POST /v1/video/generations to submit, GET /v1/video/generations/{task_id} to poll. New integrations should use /v1/videos.