WAN 3.0
概览
模型标识符: wan-3-0 · 输出: video · 模式: Image to video
认证与接口
所有请求发送到 https://genjutsu.top。请将 Genjutsu API 密钥作为 bearer 令牌发送。 POST https://genjutsu.top/v1/media/generate · Authorization: Bearer $GENJUTSU_API_KEY · 所需权限范围: generate, read, assets
模式与参数
Image to video i2v
| 参数 | 类型 | 是否必填 | 默认值 | 详情 |
|---|---|---|---|---|
prompt | string | 必填 | - | Describe the movement you want to see. |
images_list | image 资源 ID 列表 | 必填 | - | Add 1–10 reference images. |
audios_list | audio 资源 ID 列表 | 可选 | - | Add up to 5 audio clips. |
videos_list | video 资源 ID 列表 | 可选 | - | Optional. Add up to 10 clips, each 15 seconds or less. Add a reference video for a 16-second output. Leave this empty for a 29-second output. |
aspect_ratio | 可选值之一 | 可选 | "16:9" |
|
最小请求
# Media IDs below are placeholders: replace them with your own uploaded assets before running this.
curl -X POST "https://genjutsu.top/v1/media/generate" \
-H "Authorization: Bearer $GENJUTSU_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "wan-3-0",
"mode": "i2v",
"params": {
"prompt": "A lighthouse on a rocky cliff at golden hour, soft clouds, cinematic light",
"images_list": [
"asset:00000000-0000-4000-8000-000000000001"
]
}
}'包含可选参数的请求
# Media IDs below are placeholders: replace them with your own uploaded assets before running this.
curl -X POST "https://genjutsu.top/v1/media/generate" \
-H "Authorization: Bearer $GENJUTSU_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "wan-3-0",
"mode": "i2v",
"params": {
"prompt": "A lighthouse on a rocky cliff at golden hour, soft clouds, cinematic light",
"Duration": 16,
"audios_list": [
"asset:00000000-0000-4000-8000-000000000003",
"asset:00000000-0000-4000-8000-000000000004"
],
"images_list": [
"asset:00000000-0000-4000-8000-000000000001",
"asset:00000000-0000-4000-8000-000000000002"
],
"videos_list": [
"asset:00000000-0000-4000-8000-000000000005",
"asset:00000000-0000-4000-8000-000000000006"
],
"aspect_ratio": "16:9"
}
}'任务生命周期
将请求提交到 POST /v1/media/generate,返回 202 和 task_id。每 5 秒轮询一次 GET /v1/media/tasks/{task_id},直到 is_final 为 true:此时状态为 succeeded、failed 或 cancelled,同一个任务中包含结果(outputs)或错误(error_code 和 error_message)。使用相同的 Idempotency-Key 重复提交会返回原任务。响应中的 ID 和 URL 仅为示例。
# Media IDs below are placeholders: replace them with your own uploaded assets before running this.
# Needs curl and jq.
# 1. Submit. The response is 202 with task_id, state and credits_held.
ID=$(curl -s -X POST "https://genjutsu.top/v1/media/generate" \
-H "Authorization: Bearer $GENJUTSU_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "wan-3-0",
"mode": "i2v",
"params": {
"prompt": "A lighthouse on a rocky cliff at golden hour, soft clouds, cinematic light",
"images_list": [
"asset:00000000-0000-4000-8000-000000000001"
]
}
}' | jq -r .task_id)
echo "task: $ID"
# 2. Poll every 5 seconds until is_final is true (state is then succeeded, failed or cancelled).
while true; do
TASK=$(curl -s "https://genjutsu.top/v1/media/tasks/$ID" -H "Authorization: Bearer $GENJUTSU_API_KEY")
echo "state: $(echo "$TASK" | jq -r .state)"
[ "$(echo "$TASK" | jq -r .is_final)" = "true" ] && break
sleep 5
done
# 3. The final task carries the result: outputs[].url when succeeded, error_code and error_message when failed.
echo "$TASK" | jq '{state, outputs, error_code, error_message, credits}'价格
Image to video
| 选项 | 总价 |
|---|---|
| 所有选项 | 每次请求 12.000000 点数 |
请在 Studio 或通过 POST /v1/quotes 获取准确总价。
版本与说明
文档版本 7,发布于 2026-11-27。