Skip to main content
POST

授权

Authorization
string
header
必填

所有接口均需要使用Bearer Token进行认证

使用时在请求头中添加:

Authorization: Bearer YOUR_API_KEY

请求体

application/json
model
string
默认值:wan-2.7-image-to-video
必填

wan-2.7-image-to-video:单图生视频、首尾帧过渡、视频续写

示例:

"wan-2.7-image-to-video"

generation_type
enum<string> | null

生成模式

可选值:

  • image-to-video — 单图生视频,image_urls 恰好 1 张
  • first-last-frame — 首尾帧过渡,image_urls 恰好 2 张
  • video-continuation — 基于 video_url 做视频续写
可用选项:
image-to-video,
first-last-frame,
video-continuation
示例:

"image-to-video"

image_urls
string[] | null

图片 URL 列表

说明:

  • 单图生视频:传 1 张
  • 首尾帧过渡:传 2 张,顺序为首帧、尾帧
  • 每张图片支持 JPEG / JPG / PNG / BMP / WEBP
  • 每张图片大小上限 20MB
示例:
video_url
string | null

输入视频的公开 URL

说明:

  • 用于视频续写模式
  • 支持 MP4 / MOV
  • 输入视频时长需在 2 - 10 秒之间
  • 文件大小上限 100MB
  • 不能与 image_urls 同时传入
示例:

"https://example.com/clip.mp4"

prompt
string | null

可选提示词,用于补充描述期望的镜头运动、主体动作或场景变化

说明:

  • 最多 5000 个字符
Maximum string length: 5000
示例:

"The camera slowly pushes in as the subject smiles"

audio_url
string | null

驱动音频的公开 URL

说明:

  • 支持 WAV / MP3
  • 音频时长需在 2 - 30 秒之间
  • 文件大小上限 15MB
示例:

"https://example.com/music.mp3"

duration
integer
默认值:5

输出视频时长(秒),支持 2-15 的整数秒

必填范围: 2 <= x <= 15
示例:

2

resolution
enum<string>
默认值:1080p

输出视频分辨率,可选 720p1080p

可用选项:
720p,
1080p
示例:

"720p"

negative_prompt
string | null

负向提示词,用于描述希望避免出现的内容

Maximum string length: 500
示例:

"blurry, jitter"

seed
integer | null

随机种子,用于提升结果复现性

必填范围: 0 <= x <= 2147483647
示例:

123

enable_prompt_expansion
boolean | null

是否启用提示词扩展,不传则使用模型默认行为

非必须不要传这个参数。

示例:

true

enable_safety_checker
boolean | null

是否启用安全检查,不传则使用模型默认行为

非必须不要传这个参数。

示例:

true

响应

任务创建成功

created
integer

任务创建时间戳

示例:

1757165031

id
string

任务ID

示例:

"task-unified-1757165031-uyujaw3d"

model
string

实际使用的模型名称

object
enum<string>

任务的具体类型

可用选项:
video.generation.task
progress
integer

任务进度百分比 (0-100)

必填范围: 0 <= x <= 100
示例:

0

status
enum<string>

任务状态

可用选项:
pending,
processing,
completed,
failed
示例:

"pending"

task_info
object

异步任务信息

type
enum<string>

任务的输出类型

可用选项:
video
示例:

"video"