跳转到主要内容
POST
/
v1
/
videos
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
}

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

请求体

application/json
model
enum<string>
必填

Ali wan2.7-i2v 模型。

可用选项:
wan2.7-i2v
image
string
必填

单首帧兼容字段。项目会将其映射为上游 media: [{type: first_frame, url: ...}]

prompt
string

可选文本提示词。未提供时,生成过程将主要依赖输入媒体素材。

images
string[]

首帧 + 尾帧兼容字段。必须恰好包含 2 个元素,顺序为 [首帧, 尾帧]

Required array length: 2 elements
media
object[]

新版多模态输入字段。当前用于承接 wan2.7-i2v 官方新版协议,例如首帧 + 音频、首段视频续写等。

seconds
string
默认值:5

视频时长的字符串形式。当前支持 215 的整数字符串。

size
enum<string>
默认值:1080P

当前项目实现支持的输出分辨率档位。

可用选项:
720P,
1080P

响应

提交成功,返回统一的 OpenAI 风格视频任务对象。

id
string

公开任务 ID。

task_id
string

公开任务 ID 的兼容别名。

object
string
示例:

"video"

model
string

模型名称。

status
enum<string>

统一的视频任务状态。

可用选项:
queued,
in_progress,
completed,
failed,
unknown
progress
integer

任务进度百分比。

created_at
integer<int64>

Unix 秒级时间戳。