Skip to content

Video

Video models take the same task request as image models. The difference is the input (a clip length and an aspect ratio), the price (per second of video) and the output (an MP4).

Model Clips Price
Wan 2.2 5B (wan-2.2) 720p at 24 fps, 1 to 5 seconds, from text or a first frame $0.06 per second of video

GET /v1/models?modality=video lists every video model with its input schema.

Terminal window
curl https://api.velvetapi.dev/v1/tasks \
-H "Authorization: Bearer $VELVET_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: clip-001" \
-d '{
"model": "wan-2.2",
"user": "user-123",
"input": {
"prompt": "A slow dolly shot through a candlelit jazz lounge at night. A woman in a plum velvet evening dress turns from the bar toward the camera and smiles, warm bokeh lights behind her, cinematic 35mm look.",
"duration_s": 5,
"aspect_ratio": "16:9"
}
}'

Describe the motion as well as the scene: who moves and how, what the camera does (a slow push-in, a pan, handheld), and the light. Wan reads the first ~512 tokens of the prompt.

Pass one image in reference_images and the clip starts from it. It’s cropped to the aspect ratio you ask for, so frame the subject in the middle. The image can be one of your outputs, an upload, or any HTTPS image URL, which is imported and screened first.

{
"model": "wan-2.2",
"user": "user-123",
"input": {
"prompt": "She turns her head toward the window as the curtains move in a light breeze, slow push-in.",
"reference_images": ["https://api.velvetapi.dev/v1/uploads/9309bf14-9c4d-4a0a-b72c-84d9105269a5"],
"duration_s": 5,
"aspect_ratio": "9:16"
}
}
Field Default Description
prompt Required. What happens in the clip.
duration_s 5 1 to 5 seconds.
aspect_ratio 16:9 16:9 (1280 × 704), 9:16 (704 × 1280) or 1:1 (960 × 960).
resolution 720p 720p is the only resolution today.
reference_images [] At most one image, used as the first frame.
seed The same seed and input give the same clip.

A clip costs its model’s per-second price for the length you ask for: a 5-second Wan 2.2 5B clip is $0.30, and a 2-second one is $0.12. Like every task, the price is held when the task is accepted and charged only if it succeeds. POST /v1/quotes prices a request without running it.

Video takes minutes, not seconds. On an RTX 5090, a 5-second 720p clip took about four minutes of generation, plus up to 45 seconds when a worker had to start first. If every video worker is busy, the task waits in the queue; meta.queue_ms shows how long it waited.

So don’t poll every second: use a webhook, or poll every five to ten seconds. The SDKs’ wait() gives up after ten minutes by default.

A succeeded video task has one output:

{
"id": "5b693b2d-5542-445a-a710-d16407ef51f6",
"object": "task",
"model": "wan-2.2",
"state": "succeeded",
"price_usd": 0.3,
"outputs": [
{
"url": "https://cdn.velvetapi.dev/o/…/5b693b2d-5542-445a-a710-d16407ef51f6/0.mp4",
"content_type": "video/mp4",
"width": 1280,
"height": 704,
"duration_s": 5.042
}
],
"meta": { "seed": 7, "steps": 30, "fps": 24, "num_frames": 121, "mode": "text-to-video", "queue_ms": 900, "run_ms": 249800 }
}

Clips are H.264 MP4s. Their length is rounded to the model’s frame steps, so a 5-second request gives 121 frames (5.04 s). Like images, video URLs are deleted after 14 days, so copy the ones you want to keep.

Prompts are screened the same way as for images. Before a clip is delivered, frames sampled across it go through the same output check as images: if a frame is explicit and a person in it looks under 18, the clip is withheld, the task fails with meta.withheld: true, you aren’t charged, and the end user gets a strike. See Content policy and safety.