Wan 3.0 Reference to Video uses the model ID alibaba/wan-3.0/reference-to-video. Generate videos guided by reference images with Wan 3.0.
1. Calling the API
Send requests to https://api.higgsfield.ai/alibaba/wan-3.0/reference-to-video with a JSON body matching the parameters below.
Install
Install an official server-side SDK. cURL needs no package.
npm install @higgsfield/clientSetup
Keep credentials in server-side environment variables. The SDKs accept the same KEY_ID:KEY_SECRET value under their documented variable names.
export HF_CREDENTIALS="YOUR_KEY_ID:YOUR_KEY_SECRET" # TypeScript
export HF_KEY="YOUR_KEY_ID:YOUR_KEY_SECRET" # Python and cURLRequest parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
seed | integer | No | — | Seed. Minimum: 0. Maximum: 2147483647. |
prompt | string | Yes | — | Prompt. |
duration | integer | No | 5 | 2-30 seconds. Minimum: 2. Maximum: 30. |
file_url | string | No | — | One document (docx/xlsx/pptx/pdf/md). Forces deep thinking. |
link_url | string | No | — | One public page. Forces deep thinking. Not combinable with file_url. |
audio_urls | array[string] | No | — | Up to 5 files, 30s total. WAV or MP3. |
image_urls | array[string] | No | — | Reference Images. |
resolution | string | No | "1080p" | Resolution. Options: 480p, 720p, 1080p. |
video_urls | array[string] | No | — | Up to 5 clips, 30s total, each 1-30s. |
aspect_ratio | string | No | "adaptive" | Aspect Ratio. Options: 16:9, 4:3, 1:1, 3:4, 9:16, adaptive. |
generate_audio | boolean | No | true | Sound. |
enable_thinking | boolean | No | false | Deep Thinking. |
2. Authentication
The official SDKs read credentials from the server environment and send the required Authorization: Key KEY_ID:KEY_SECRET header.
API Key
Never expose the secret in browser-side code or commit it to source control. The TypeScript SDK is server-side only. For direct HTTP calls, use:
Authorization: Key $HF_KEY3. Queue
subscribe submits the asynchronous request and waits for a terminal result. The TypeScript SDK polls automatically when withPolling: true; the Python SDK's synchronous subscribe call also waits. A completed request returns the generated file in the video field.
Submit and wait
import { config, higgsfield } from "@higgsfield/client/v2";
config({
credentials: process.env.HF_CREDENTIALS,
});
const result = await higgsfield.subscribe(
"alibaba/wan-3.0/reference-to-video",
{
input: {
"prompt": "A cinematic scene at sunset",
"duration": 5,
"resolution": "1080p",
"aspect_ratio": "adaptive",
"generate_audio": true,
"enable_thinking": false
},
withPolling: true,
},
);
console.log(result);Explicit lifecycle control
Use the Python SDK when a worker needs explicit status, result, or cancellation control for an existing request. The TypeScript v2 client currently exposes automatic polling through subscribe.
import higgsfield_client
request_id = "{request_id}"
status = higgsfield_client.status(request_id=request_id)
result = higgsfield_client.result(request_id=request_id)
higgsfield_client.cancel(request_id=request_id)