Reference to Video
Generate a new video with sound from reference images, videos and audio (Wan 3.0 reference_to_video).
Wan 3.0 puts the people or objects in your reference images into a new video, follows the moves or camera work in reference videos, or uses reference audio as the sound. Send at least one of image_urls, video_urls and audio_urls; reference audio alone is fine.
Reference images (image_urls) | Reference videos (video_urls) | Reference audio (audio_urls) | |
|---|---|---|---|
| Count | Up to 10 | Up to 5 | Up to 5 |
| Length | – | Each 1–15 seconds; together at most 15 seconds (with a duration over 15, at most 30 − duration) | Each, and all together, at most 15 seconds |
With reference videos, duration can be at most 30 − the number of videos. The other requirements are under Media.
Create a task
https://api.nanoapi.ai/v1/tasksUse the shared create endpoint with model: "wan-3.0".
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer <API key>, see Authentication. |
Content-Type | Yes | application/json |
Idempotency-Key | No | A unique string for every new task, ideally a UUID (1–255 characters). See Preventing duplicate tasks. |
Body
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | wan-3.0 |
variant | string | Yes | standard or prime, see Variants. Sets the price. |
mode | string | Yes | reference_to_video |
image_urls | string[] | Conditional | At least one of image_urls, video_urls and audio_urls. Up to 10 reference images. |
video_urls | string[] | Conditional | At least one of image_urls, video_urls and audio_urls. Up to 5 reference videos: each 1–15 seconds, together at most 15 seconds, and together plus duration at most 30 seconds. See Media. |
audio_urls | string[] | Conditional | At least one of image_urls, video_urls and audio_urls. Up to 5 reference audio files (MP3 or WAV): each, and all of them together, at most 15 seconds. |
prompt | string | Yes | What the video shows, at most 8000 characters. Best written in English. Refer to the files as <<<image_1>>>, <<<video_1>>>, <<<audio_1>>>, see Referring to files. |
resolution | string | Yes | 480p, 720p or 1080p. Sets the price. |
aspect_ratio | string | Yes | 16:9, 9:16, 1:1, 4:3, 3:4 or auto, which follows the reference images and videos (with reference audio only, it gives 16:9). |
duration | integer | Yes | Output length in seconds, 2–30. Billed per second, see Pricing. With reference videos, at most 30 − the number of videos. |
generate_audio | boolean | No | Whether the output has sound, default true. Doesn't affect the price. |
enable_thinking | boolean | No | true has the model reason about the prompt before generating: closer to your description, but slower. Default false. |
webhook_url | string | No | Notified when the task succeeds or fails: https, up to 2048 characters, not a private, loopback or reserved address. See Webhooks. |
A reference image, a reference video and background music, 480p, 5 seconds, aspect ratio auto (follows the image and video):
curl https://api.nanoapi.ai/v1/tasks \
-H "Authorization: Bearer $NANOAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan-3.0",
"variant": "standard",
"mode": "reference_to_video",
"image_urls": ["https://example.com/cat.jpg"],
"video_urls": ["https://example.com/camera_move.mp4"],
"audio_urls": ["https://example.com/music.mp3"],
"prompt": "The cat from <<<image_1>>> sits on the car hood, the camera moves like in <<<video_1>>>, with <<<audio_1>>> as the background sound",
"resolution": "480p",
"aspect_ratio": "auto",
"duration": 5
}'Response: 200 OK, the new task (fields). Keep data.id to get the result; the task can still fail, see Errors.
{
"code": 200,
"message": "success",
"data": {
"object": "task",
"id": "tk_01jbq5w8m2c4x7b0n3q6t9e1r5",
"model": "wan-3.0",
"status": "queued",
"error": null,
"created_at": "2026-11-11T08:30:00Z"
}
}Pricing
cost = duration × price per second of the variant and resolutionLoading the current prices…
Billed seconds are the duration you ask for: reference images, videos and audio, sound in the output (generate_audio) and enable_thinking don't change the price. Current prices: GET /v1/products (the prices rows of the variant). The task's billing.frozen is the amount that counts; freezing and charging: Billing. Every variant's prices: Wan 3.0 → Pricing.
Errors
See Wan 3.0 → Errors. This mode's parameter rules are in the table above.