跳转到主要内容
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.2-kf2v-flash",
  "images": [
    "https://example.com/first-frame.png",
    "https://example.com/last-frame.png"
  ],
  "prompt": "写实风格,一只黑色小猫好奇地看向天空,镜头从平视逐渐上升,最后俯拍它的好奇的眼神。",
  "seconds": "5",
  "size": "720P",
  "prompt_extend": true
}
'
{
  "id": "<string>",
  "task_id": "<string>",
  "object": "video",
  "model": "<string>",
  "status": "pending",
  "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>
必填

万相首尾帧图生视频模型。

可用选项:
wan2.2-kf2v-flash,
wan2.1-kf2v-plus
images
string[]
必填

首尾帧图像 URL 数组,必须按顺序传入 2 张图:images[0] 为首帧,images[1] 为尾帧。输出视频的宽高比与首帧图像保持一致,尾帧会被裁剪适配为首帧的宽高比。

Required array length: 2 elements
prompt
string

文本提示词,描述首帧到尾帧的变化过程。支持中英文,长度不超过 800 个字符。

seconds
string
默认值:5

视频生成时长(秒)的字符串形式。当前固定为 "5"

size
enum<string>
默认值:720P

生成视频的分辨率档位。wan2.2-kf2v-flash 支持 480P/720P/1080P,wan2.1-kf2v-plus 支持 720P。

可用选项:
480P,
720P,
1080P
prompt_extend
boolean
默认值:true

是否开启提示词智能改写。

watermark
boolean
默认值:false

是否在视频中添加水印。

seed
integer

随机数种子,取值范围 [0, 2147483647]。

negative_prompt
string

反向提示词,描述不希望在视频中看到的内容。长度不超过 500 个字符。

响应

提交成功,返回视频任务对象。

id
string
task_id
string
object
string
示例:

"video"

model
string
status
enum<string>
可用选项:
pending,
queued,
running,
succeeded,
failed,
cancelled
progress
integer
created_at
integer<int64>