Wan 3.0 Prime · Reference to Video
Hand it a script, a web page and five clips
- reference_image_urls
- reference_video_urls
- reference_audio_urls
- video
- task id
This is the strangest node in the Wan corner of the pack, in a good way. Most reference-to-video endpoints take a handful of images and hope. This one accepts up to 10 images, 5 short videos and 5 audio files - plus a reference_file_url that can be a PDF, DOCX, TXT or Markdown document, and a reference_link_url pointing at a public web page.
Read that again: you can hand a hosted video model a character document and a URL. That's the whole pitch. For a series with a bible - character descriptions, wardrobe notes, tone - this is a way to stop re-typing the same paragraphs into every prompt and let the model read the source. Whether it uses them well is something you test once before you build a workflow on it, but the shape of the idea is right: references as documents, not vibes.
$0.0612/second, 2 to 30 seconds, 480p to 1080p.
The inputs
prompt describes the subject, action, camera, light, pacing and boundaries. When you're driving it from a document, keep the prompt to the shot and let the document carry continuity.
reference_file_url is a plain string - the file's URL or a name in ComfyUI/input. reference_link_url is one public page that opens without a login. enable_thinking (off by default) lets the model reason over the brief and the references before generating; it helps with complex references and is slower, and the tooltip notes it turns itself on when a reference file or link is given.
reference_image_urls takes up to 10 images, reference_video_urls up to 5 clips capped at 15 seconds in total, and reference_audio_urls up to 5 files, also 15 seconds total. These are growable sockets - connect one and you get one.
duration_seconds defaults to 5 and accepts -1 for smart duration. Read the tooltip carefully here, because it's the one billing trap in the pack: with reference videos attached, the reference length plus the output length must stay under 30 seconds, and the reference video seconds are billed along with your output seconds. Fifteen seconds of reference plus fifteen of output is thirty billed seconds, not fifteen.
aspect_ratio defaults to 16:9 but offers adaptive, which follows the input media and the intent. resolution is 480p, 720p or 1080p. generate_audio is on by default. enable_prompt_expansion is a dropdown left at model default, not a plain on/off switch - the model decides. seed repeats a draw.
Outputs: video → Save Video, and task id as a string.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/spicyapi-ai/comfyui-spicyapi
Restart, then Settings > SpicyAPI with a key from spicyapi.ai/console/keys - or install via ComfyUI Manager by searching "SpicyAPI". There's nothing to compile and no weights to fetch; the pack uses ComfyUI's own aiohttp and nothing else. No GPU needed. Uploads are re-encoded for you: images as PNG when under 10 MiB, otherwise JPEG, and video or audio capped at 90 MiB each, which is why reference clips should be short and trimmed.
The key is stored in the ComfyUI user folder, not as a node widget, so it can't travel inside a workflow file or the metadata of an image ComfyUI writes; SPICY_API_KEY covers servers.
Before you run it
This node can bill for reference seconds you didn't think you were buying, and 30 seconds at this rate is not pocket change. Set Max cost per run in the SpicyAPI settings and sanity-check the quote on your first few runs until the arithmetic is obvious. Seeds default to fixed, so an unchanged graph costs one charge; leave control after generate alone unless you want a fresh draw at full price.
Cancelling in ComfyUI doesn't stop the job - it runs to completion server-side, is charged if it succeeds, and its output stays in your console for up to 14 days. Errors are explicit: 40004 for an option combination nothing serves (change the parameter named in the message), 40310 for an unverified email, 50301 when there's no usable deployment, 50302 when a run failed upstream and was refunded, and No SpicyAPI key is set when the key never made it to the pack.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | Describe the subject, action, camera, light, pacing, and boundaries for the shot. | |
| reference_file_url | STRING | One reference document (PDF, DOCX, TXT, MD and similar) that the model reads for characters, wardrobe, setting and action. | |
| reference_link_url | STRING | One public web page the model reads for reference. It must open without a login. | |
| aspect_ratio | COMBO | 16:9 | Output aspect ratio; adaptive follows the input media and the intent. |
| enable_thinking | BOOLEAN | false | Let the model reason about the brief and the reference material before generating. Helps with complex references; slower. Switches on by itself when a reference file or link is given. |
| resolution | COMBO | 720p | Output resolution. |
| duration_seconds | COMBO | 5 | Requested output length in seconds. Pass -1 for smart duration: the model picks the length from the prompt and any input media instead of a fixed number. With reference videos, their total length plus the output length must not exceed 30 seconds, and the reference video seconds are billed together with the output seconds. |
| generate_audio | BOOLEAN | true | Request generated audio with the video. |
| enable_prompt_expansion | COMBO | model default | Allow the service to expand the submitted creative brief before generation. |
| seed | INT | 00–2147483647 | Same seed and settings, same result. Set 'control after generate' to randomize to get a new result on every run; every run is billed. |
| reference_image_urlsopt | COMFY_AUTOGROW_V3 | Reference images, up to 10 items. | |
| reference_video_urlsopt | COMFY_AUTOGROW_V3 | Reference videos, up to 5 items and 15 seconds in total. | |
| reference_audio_urlsopt | COMFY_AUTOGROW_V3 | Reference audio, up to 5 items and 15 seconds in total. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| video | VIDEO | — |
| task id | STRING | The SpicyAPI task id, for the console logs or support. |