Skip to content

Video Generation ​

Video generation is asynchronous: you submit a job, get a task id back, then poll until it's done and fetch the result. Submitted jobs appear in Console → Task Logs — see Task Logs.

Create a video ​

POST https://router.accels.tech/v1/videos

Body is application/json. All fields are optional, but model and prompt are the core inputs.

FieldTypeNotes
modelstringModel / style id, e.g. kling-v1, sora-2
promptstringText prompt describing the video
imagestringImage input — URL or Base64 (for image-to-video)
durationnumberVideo length in seconds
widthintegerVideo width
heightintegerVideo height
fpsintegerFrame rate
seedintegerRandom seed
nintegerNumber of videos to generate
response_formatstringe.g. url
userstringEnd-user identifier
metadataobjectVendor-specific extras (e.g. negative_prompt, style, quality_level)

The submit response returns a task id:

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

A legacy alias POST /v1/video/generations accepts the same body.

Poll task status ​

GET https://router.accels.tech/v1/videos/{task_id}
json
{
  "task_id": "abcd1234efgh",
  "status": "succeeded",
  "url": "https://.../out.mp4",
  "format": "mp4",
  "metadata": { "duration": 5.0, "fps": 30, "width": 512, "height": 512, "seed": 20231234 },
  "error": null
}

status is queued / running / succeeded / failed; on failure, error holds { code, message }. Legacy alias: GET /v1/video/generations/{task_id}.

Fetch the result ​

GET https://router.accels.tech/v1/videos/{task_id}/content

Example ​

bash
# 1. Submit
curl https://router.accels.tech/v1/videos \
  -H "Authorization: Bearer $ACCELSROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "model": "sora-2", "prompt": "A red kite over a green valley at sunrise", "duration": 8 }'

# 2. Poll, then 3. download
curl https://router.accels.tech/v1/videos/{task_id} \
  -H "Authorization: Bearer $ACCELSROUTER_API_KEY"
curl https://router.accels.tech/v1/videos/{task_id}/content \
  -H "Authorization: Bearer $ACCELSROUTER_API_KEY" -o out.mp4

Vendor-native formats ​

Some video models are reached through their vendor's own protocol instead of the unified body above:

Notes ​

  • Available video models and their duration/resolution limits are listed in the model marketplace.
  • Every format returns a task id; track all jobs under Task Logs.