Wan 2.6 — Text to video API
Text to video with Wan 2.6: request parameters, examples and response handling.
Endpoint: POST https://api.higgsfield.ai/wan/v2.6/text-to-video
Endpoint ID: wan/v2.6/text-to-video
#Usage notes
- Setting multi_shots=true also enables prompt_extend, even if prompt_extend was false.
#Quick start
curl --request POST \
--url https://api.higgsfield.ai/wan/v2.6/text-to-video \
--header "Authorization: Key ${HF_API_KEY_ID}:${HF_API_KEY_SECRET}" \
--header "Content-Type: application/json" \
--header "Idempotency-Key: ${IDEMPOTENCY_KEY}" \
--data '{
"prompt": "A cinematic wide shot of ocean waves at sunset, with gentle camera movement."
}'
import higgsfield_client
arguments = (
{'prompt': 'A cinematic wide shot of ocean waves at sunset, with gentle camera '
'movement.'}
)
result = higgsfield_client.subscribe(
"wan/v2.6/text-to-video",
arguments=arguments,
)
print(result["video"]["url"])
import { config, higgsfield } from "@higgsfield/client/v2";
config({ credentials: process.env.HF_CREDENTIALS });
const result = await higgsfield.subscribe("wan/v2.6/text-to-video", {
input:
{
"prompt": "A cinematic wide shot of ocean waves at sunset, with gentle camera movement."
},
withPolling: true,
});
if (result.status === "completed") {
console.log(result.video?.url);
}
#Input schema
seed integer
Seed used to control generation randomness.
Minimum: -1.
Maximum: 10000000.
prompt string required
Write your prompt here
duration integer (default: 5)
Requested output duration in seconds.
Allowed values: 5, 10, 15.
audio_url string
Public URL of the audio reference.
Format: uri.
resolution string (default: 720p)
Output resolution tier.
Allowed values: "720p", "1080p".
multi_shots boolean (default: false)
See the complete JSON schema below.
prompt_extend boolean (default: false)
Enable prompt expansion.
Complete JSON schema
{
"type": "object",
"title": "Wan 2.6 Playground",
"required": [
"prompt"
],
"properties": {
"seed": {
"type": "integer",
"maximum": 10000000,
"minimum": -1
},
"prompt": {
"type": "string",
"title": "Prompt",
"description": "Write your prompt here"
},
"duration": {
"enum": [
5,
10,
15
],
"type": "integer",
"title": "Duration",
"default": 5
},
"audio_url": {
"type": "string",
"title": "Audio URL",
"format": "uri"
},
"resolution": {
"enum": [
"720p",
"1080p"
],
"type": "string",
"default": "720p"
},
"multi_shots": {
"type": "boolean",
"default": false
},
"prompt_extend": {
"type": "boolean",
"default": false
}
}
}
#Response
Submission returns a request handle. Poll status_url until status is completed, or use webhooks.
{
"status": "queued",
"request_id": "REQUEST_ID",
"status_url": "https://api.higgsfield.ai/requests/REQUEST_ID/status",
"cancel_url": "https://api.higgsfield.ai/requests/REQUEST_ID/cancel"
}
A completed response includes the following output fields:
{
"status": "completed",
"request_id": "REQUEST_ID",
"video": {
"url": "https://example.com/output.mp4"
}
}
See idempotent requests, polling, request errors and authentication for shared request handling.