Generate video

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

POSThttps://your-instance.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.

  • promptstringrequired

    Description of the video to generate.

  • secondsinteger

    Requested duration. Supported lengths vary by model.

  • sizestring

    Output resolution, e.g. 1280x720.

curl
curl https://your-instance.com/v1/videos \
  -H "Authorization: Bearer $CLAWROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "sora-2",
    "prompt": "A paper boat drifting down a rain gutter"
  }'

Poll the task

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

Download the result

GEThttps://your-instance.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://your-instance.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.