curl --request POST \
--url https://api.powertokens.ai/v1/videos \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "wan2.7-i2v",
"prompt": "人物从静态肖像逐渐开始自然开口说话。",
"media": [
{
"type": "first_frame",
"url": "https://example.com/assets/portrait.png"
},
{
"type": "driving_audio",
"url": "https://example.com/assets/voice.mp3"
}
],
"seconds": "8",
"size": "720P"
}
'{
"id": "<string>",
"task_id": "<string>",
"object": "video",
"model": "<string>",
"status": "queued",
"progress": 123,
"created_at": 123
}提交一个异步的 Ali wan2.7-i2v 生成任务。
项目当前支持两种输入风格:
image 表示单首帧输入,或使用 images 且长度必须为 2,表示首帧 + 尾帧。media 数组,对应上游新版 input.media 协议。当前项目已实现的官方 media.type 包括 first_frame、last_frame、driving_audio、first_clip。
当前项目支持的 media 组合为:
first_framefirst_frame + driving_audiofirst_frame + last_framefirst_frame + last_frame + driving_audiofirst_clipfirst_clip + last_frame本能力下 prompt 为可选字段。size 仅支持 720P 与 1080P。seconds 仅支持 2 到 15 的整数字符串。
curl --request POST \
--url https://api.powertokens.ai/v1/videos \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "wan2.7-i2v",
"prompt": "人物从静态肖像逐渐开始自然开口说话。",
"media": [
{
"type": "first_frame",
"url": "https://example.com/assets/portrait.png"
},
{
"type": "driving_audio",
"url": "https://example.com/assets/voice.mp3"
}
],
"seconds": "8",
"size": "720P"
}
'{
"id": "<string>",
"task_id": "<string>",
"object": "video",
"model": "<string>",
"status": "queued",
"progress": 123,
"created_at": 123
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Ali wan2.7-i2v 模型。
wan2.7-i2v 单首帧兼容字段。项目会将其映射为上游 media: [{type: first_frame, url: ...}]。
可选文本提示词。未提供时,生成过程将主要依赖输入媒体素材。
首帧 + 尾帧兼容字段。必须恰好包含 2 个元素,顺序为 [首帧, 尾帧]。
2 elements新版多模态输入字段。当前用于承接 wan2.7-i2v 官方新版协议,例如首帧 + 音频、首段视频续写等。
Show child attributes
视频时长的字符串形式。当前支持 2 到 15 的整数字符串。
当前项目实现支持的输出分辨率档位。
720P, 1080P