PlatformAPI documentation

Developer docs

9. Video generation API

Version 1.0 · 2026-10-20

← Back to the API reference

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 idInputOutputLength
wan2.2-ti2v-5b-720pText, or text plus one imageMP4, 1280×704, 24 fps1–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

  1. POST /v1/videos: submit the job. Returns 202 with the job id (status queued).
  2. GET /v1/videos/{id}: poll the status, about every 5 seconds, until it is succeeded, failed, cancelled or expired.
  3. GET /v1/videos/{id}/content: once succeeded, download the MP4.

Request parameters

ParameterTypeRequiredDescription
modelstringYeswan2.2-ti2v-5b-720p
promptstringYesDescription of the video; non-empty, up to 2000 characters
negative_promptstringNoUp to 500 characters. The backend does not apply this field yet (accepted but ignored)
imagestringNoStarting 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
secondsintegerNoA JSON integer from 1 to 10, default 5. 5.0, "5" and true are rejected
seedintegerNo0–4294967295; random if omitted

Example

bash
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:

json
{
  "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):

bash
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/content

Checking a job and job statuses

json
{
  "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
}
statusMeaning
queuedAccepted and waiting (the brief stage in which the balance is still being reserved also shows as queued)
processingGenerating; progress runs from 0 to 1
succeededFinished and ready to download; content_url is set. cost_usd is null until settlement completes (usually within seconds), then holds the settled amount
failedFailed or timed out (a single job is limited to 30 minutes); error gives the reason, the reservation is released, and nothing is charged
cancelledCancelled; nothing is charged
expiredThe 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_usd after completion; the estimated_cost_usd returned at submission is requested seconds × the unit price.

Download and cancel

  • GET /v1/videos/{id}/content returns 200 with Content-Type: video/mp4, streamed. HTTP Range is supported: Range: bytes=… returns 206 (an invalid range returns 416), 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 only queued jobs, with no charge, and returns {"id": "…", "status": "cancelled"}. A job that is processing or 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

StatusCase
400Field 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
401Missing or invalid key
402Prepaid balance cannot cover the worst-case reservation (requested seconds × 1.1), or the balance is exhausted; top up
404The 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
409The state does not allow the operation: downloading an unfinished job, or cancelling a job that is not queued
410The video has expired
413image is larger than 6,000,000 bytes after decoding
429Capacity 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
502The backend responded abnormally during a download or cancel; retry later
503The 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.