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/videosBody is application/json. All fields are optional, but model and prompt are the core inputs.
| Field | Type | Notes |
|---|---|---|
model | string | Model / style id, e.g. kling-v1, sora-2 |
prompt | string | Text prompt describing the video |
image | string | Image input — URL or Base64 (for image-to-video) |
duration | number | Video length in seconds |
width | integer | Video width |
height | integer | Video height |
fps | integer | Frame rate |
seed | integer | Random seed |
n | integer | Number of videos to generate |
response_format | string | e.g. url |
user | string | End-user identifier |
metadata | object | Vendor-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}/contentExample
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.mp4Vendor-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.