Developer docs
9. Video generation API
Version 1.0 · 2026-10-20
POST /v1/videos generates an MP4 video from text, or from text plus one image. Video generation takes time, so it is an asynchronous job: submit the job, poll its status, then download the result. Authentication is the same as for every other endpoint: one key.
Available model
| Model id | Input | Output | Length |
|---|---|---|---|
wan2.2-ti2v-5b-720p | Text, or text plus one image | MP4, 1280×704, 24 fps | 1–10 seconds |
Whether the model is listed is defined by GET /v1/models (output_modalities contains video). Resolution and frame rate are fixed and cannot be set in the request; a request that includes a field not in the table below (for example resolution) returns 400.
Flow
POST /v1/videos: submit the job. Returns202with the jobid(statusqueued).GET /v1/videos/{id}: poll the status, about every 5 seconds, until it issucceeded,failed,cancelledorexpired.GET /v1/videos/{id}/content: oncesucceeded, download the MP4.
Request parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | wan2.2-ti2v-5b-720p |
prompt | string | Yes | Description of the video; non-empty, up to 2000 characters |
negative_prompt | string | No | Up to 500 characters. The backend does not apply this field yet (accepted but ignored) |
image | string | No | Starting frame as base64; a data URL prefix such as data:image/png;base64, is allowed. At most 6,000,000 bytes after decoding, otherwise 413. With an image the job is image-to-video; without one it is text-to-video |
seconds | integer | No | A JSON integer from 1 to 10, default 5. 5.0, "5" and true are rejected |
seed | integer | No | 0–4294967295; random if omitted |
Example
curl https://b300.powerchampion.ai/v1/videos \
-H "Authorization: Bearer $PC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan2.2-ti2v-5b-720p",
"prompt": "A red fox walks through fresh snow at dawn",
"seconds": 5
}'Success returns 202:
{
"id": "0f3c…",
"object": "video.job",
"status": "queued",
"model": "wan2.2-ti2v-5b-720p",
"mode": "t2v",
"seconds": 5,
"estimated_cost_usd": "0.25",
"expires_at": null,
"created_at": 1760000000.0
}The complete flow (submit, poll, download):
JOB=$(curl -s https://b300.powerchampion.ai/v1/videos \
-H "Authorization: Bearer $PC_API_KEY" -H "Content-Type: application/json" \
-d '{"model":"wan2.2-ti2v-5b-720p","prompt":"A red fox walks through fresh snow at dawn","seconds":5}' \
| python3 -c 'import json,sys; print(json.load(sys.stdin)["id"])')
while :; do
S=$(curl -s -H "Authorization: Bearer $PC_API_KEY" https://b300.powerchampion.ai/v1/videos/$JOB \
| python3 -c 'import json,sys; print(json.load(sys.stdin)["status"])')
echo "$S"; case "$S" in succeeded|failed|cancelled|expired) break;; esac; sleep 5
done
curl -s -o out.mp4 -H "Authorization: Bearer $PC_API_KEY" https://b300.powerchampion.ai/v1/videos/$JOB/contentChecking a job and job statuses
{
"id": "0f3c…",
"object": "video.job",
"model": "wan2.2-ti2v-5b-720p",
"status": "succeeded",
"progress": 1.0,
"mode": "t2v",
"seconds": 5,
"output_seconds": 5.041667,
"cost_usd": "0.252090",
"error": null,
"content_url": "/v1/videos/0f3c…/content",
"expires_at": 1760086400.0,
"created_at": 1760000000.0,
"finished_at": 1760000300.0
}| status | Meaning |
|---|---|
queued | Accepted and waiting (the brief stage in which the balance is still being reserved also shows as queued) |
processing | Generating; progress runs from 0 to 1 |
succeeded | Finished and ready to download; content_url is set. cost_usd is null until settlement completes (usually within seconds), then holds the settled amount |
failed | Failed or timed out (a single job is limited to 30 minutes); error gives the reason, the reservation is released, and nothing is charged |
cancelled | Cancelled; nothing is charged |
expired | The retention period has passed; downloading returns 410 |
expires_at and finished_at are Unix timestamps in seconds. About 7 days after a job expires its record is deleted and lookups return 404; until then the expired status can still be read.
Pricing and settlement
- US$0.05 per second of output video.
- Billed on the actual output length, capped at 1.1 times the requested seconds. The actual length can be slightly longer than requested (frames = seconds × fps + 1, so 5 seconds → 121 frames ≈ 5.04 seconds, about US$0.252).
- At submission, balance for the requested seconds × 1.1 is reserved (for example 5 seconds → 5.5 seconds = US$0.275). On completion the job is settled on the actual length and the difference is refunded.
- If a job fails, times out, or is cancelled while queued, the whole reservation is released and nothing is charged.
- The settled amount appears in
cost_usdafter completion; theestimated_cost_usdreturned at submission is requested seconds × the unit price.
Download and cancel
GET /v1/videos/{id}/contentreturns200withContent-Type: video/mp4, streamed. HTTPRangeis supported:Range: bytes=…returns206(an invalid range returns416), so downloads can resume.- A finished video can be downloaded for at least 24 hours; the exact deadline is the job's
expires_at. An unfinished job returns 409; an expired one returns 410 (404 once the record is deleted about 7 days later). DELETE /v1/videos/{id}cancels onlyqueuedjobs, with no charge, and returns{"id": "…", "status": "cancelled"}. A job that isprocessingor already finished returns 409; a job that has only just been submitted and is still being accepted can also return 409, so retry shortly. If the video backend is temporarily unreachable it returns 502 and the job is unchanged, so you can retry the cancel.
Errors on the video endpoints
| Status | Case |
|---|---|
| 400 | Field validation failed: an unknown field, an empty or over-long prompt, seconds that is not an integer from 1 to 10, seed out of range, image that is not valid base64, or a model that does not accept images |
| 401 | Missing or invalid key |
| 402 | Prepaid balance cannot cover the worst-case reservation (requested seconds × 1.1), or the balance is exhausted; top up |
| 404 | The model does not exist, is not listed, or is not a video model; the job ID does not exist (another key's job also returns 404), or the job expired more than about 7 days ago and its record is deleted |
| 409 | The state does not allow the operation: downloading an unfinished job, or cancelling a job that is not queued |
| 410 | The video has expired |
| 413 | image is larger than 6,000,000 bytes after decoding |
| 429 | Capacity is full (code is capacity, with Retry-After: 15), the key already has 4 video jobs in progress, the per-minute request limit was exceeded, or the daily quota is used up. When Retry-After is present, retry after that time; the daily-quota 429 has no such header and resets at 00:00 UTC |
| 502 | The backend responded abnormally during a download or cancel; retry later |
| 503 | The backend cannot accept jobs right now (nothing was charged), the model is under maintenance, or the video backend is temporarily unreachable; retry later |
When a submission gets 429 or 503, no balance was deducted and you can simply submit again.