# Wan 3.0 Video Prime API

> Wan 3.0 Video Prime — high-quality AI video generation.

- **Provider**: Wan
- **Model id**: `wan-3-0-video-prime`
- **Modality**: video
- **Price**: 6.66–27.44 credits /sec

## Overview

Wan 3.0 Video Prime is called in two steps: create a generation task, then poll the task until the result is ready.

## Authentication

All requests require a Bearer Token in the request header:

```
Authorization: Bearer YOUR_API_KEY
```

## Create Task

`POST https://you.bot/api/v1/generate`

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| modelId | string | Yes | Model id: `wan-3-0-video-prime` |
| input | object | Yes | Input parameters object (see below) |
| callbackUrl | string | No | https URL we POST the finished task to. Signed with `X-Webhook-Signature` once you create a webhook signing key in Dashboard → Settings |

### input object parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| first_frame_url | string | Yes | Image URL |
| last_frame_url | string | No | Image URL |
| prompt | string | Yes | Text prompt used to describe the desired video content. Supports both Chinese and English, with a maximum length of 20,000 characters. Max 20000 characters. (example: Create a 24-second cinematic international hip-hop music video with photorealistic visuals, premium street-fashion aesthetics, confident energy, and fast… — full value in the request example) |
| reference_image_urls | string[] | No | Maximum 10 images. Mapped in array order to Image1, Image2, ... in the prompt. Specifications are the same as first_frame_url. Cannot be used together with first frame / last frame. (image URL) |
| reference_video_urls | string[] | No | Maximum 5 clips. Each clip: 1–15s; total combined duration ≤ 15s. Mapped in array order to Video1, Video2, ... in the prompt. Formats: mp4, mov. Single side: [240, 4096] px; aspect ratio ≤ 8:1; file size per clip ≤ 100MB. Additionally, on the output side: total input video duration + output duration (duration parameter) must not exceed 30 seconds. (image URL) |
| reference_audio_urls | string[] | No | Maximum 5 clips. Each clip: 1–15s; total combined duration ≤ 15s. Mapped in array order to Audio1, Audio2, ... in the prompt. Formats: wav, mp3; file size ≤ 15MB per clip. When not used as the sole media input, it is still recommended to pair with images or videos. (image URL) |
| reference_link_urls | string | No | Maximum 1 publicly accessible webpage (no login required). Cannot be used together with reference_file_urls, nor with first frame / last frame. |
| reference_file_urls | string | No | Maximum 1 file. Cannot be used together with reference_link_urls, nor with first frame / last frame. Supported formats: docx, doc, xlsx, xls, pptx, ppt, pdf, txt, key, pages, numbers, md. File size ≤ 100MB. For file types such as pdf, docx, ppt, key, pages, etc., page count ≤ 50 pages. |
| resolution | string | No | Preset resolution levels for video generation. (options: 480P \| 720P \| 1080P) (default: 1080P) |
| aspect_ratio | string | Yes | Aspect ratio for generated video. "Adaptive" auto-recommends a ratio based on input media proportions and intent. (options: adaptive \| 16:9 \| 4:3 \| 1:1 \| 3:4 \| 9:16) (default: 16:9) |
| duration | number | No | Duration of the generated video, in seconds (2-30). With a reference video attached, the input video duration plus this duration must not exceed 30 seconds. (range 2-30) (default: 5) |
| audio | boolean | No | Whether the output video includes audio. true (default): Includes audio; false: No audio track. (true/false) (default: true) |

### Request example

```json
{
  "modelId": "wan-3-0-video-prime",
  "input": {
    "prompt": "Create a 24-second cinematic international hip-hop music video with photorealistic visuals, premium street-fashion aesthetics, confident energy, and fast pacing.\n\nReferences:\nImage 1 defines the fixed four-person group: female lead singer front-center, male DJ rear-center, two hype performers left/right. Image 2 defines the singer’s face, hair, makeup, silver-black techwear outfit, and microphone. Image 3 defines the rooftop stage. Keep all characters, outfits, identities, and location consistent throughout.\n\nMusic:\nOriginal international hip-hop anthem, ~106 BPM. Start with a strong groove immediately: punchy kick, crisp snare, syncopated bass, catchy synth/brass hook. Eight languages flow naturally as one rap performance. Beat drop at 21s.\n\nShots:\n0–3s: Aerial city → descend to rooftop → low-angle push-in. “One beat.”\n3–6s: Front close-up. “同一个节拍。”\n6–9s: DJ controls → tilt up to singer. “ひとつのリズム。”\n9–12s: 3/4 singer shot, smooth lateral move. “하나의 리듬.”\n12–15s: Low-angle tracking as singer walks forward. “Um só ritmo.”\n15–18s: Singer + right performer turn toward camera. “จังหวะเดียวกัน.”\n18–21s: Strong frontal push-in. “Un mismo ritmo.”\n21–24s: Side-lit close-up. “إيقاع واحد.” Beat drops, pull back to heroic group wide shot. Singer: “Different voices, one beat.” Group: “One beat.”\n\nPrecise multilingual lip-sync with the same singer and voice throughout. Keep singer front-center, DJ behind, performers left/right. Use smooth pushes, pullbacks, lateral moves, hard cuts, and natural wipes. Deep blue, silver, warm gold, subtle magenta neon; cinematic 24/35/50mm lenses, shallow DOF, film grain, realistic skin.\n\nNo subtitles, text, logos, UI, or watermark. No character duplication, identity changes, distorted hands, floating objects, or unstable equipment.",
    "resolution": "720P",
    "aspect_ratio": "16:9",
    "duration": 5,
    "audio": true
  }
}
```

### Response example

```json
{
  "taskId": "281e5b0…f39b9",
  "creditsCharged": 68.60000000000001
}
```

## Query Task

`GET https://you.bot/api/v1/task/{taskId}?model=wan-3-0-video-prime`

When `state` is `success`, the output is in `resultUrls`: `{ "state": "success", "resultUrls": [ ... ] }`. (Text models return inline in the create response.)

## Error Codes

| Code | Description |
|------|-------------|
| 200 | Request successful |
| 400 | Invalid request parameters |
| 401 | Authentication failed — check API Key |
| 402 | Insufficient account balance |
| 403 | IP not allowed for this key, or the key is restricted to other models |
| 404 | Task not found, or it has expired |
| 409 | Duplicate request — an identical submit arrived moments ago. Nothing was charged; retry is safe |
| 413 | Payload too large — see the character and file-size limits for this model |
| 429 | Rate limit exceeded — retry after the Retry-After header |
| 500 | Internal server error |
| 504 | Upstream timed out — nothing was delivered; retry is safe |
