跳转到主要内容
POST
/
v1
/
tasks
curl -X POST https://qingbo.dev/v1/tasks \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "wan2.5-t2v",
    "action": "generate",
    "prompt": "春天的樱花树下,花瓣随风飘落",
    "aspect_ratio": "16:9",
    "duration": 5
  }'
{
  "task_id": "task-wave1775285160b950328499",
  "model": "wan2.5-t2v",
  "action": "generate",
  "status": "queued",
  "created_at": 1775285160040,
  "progress": 0
}
异步处理模式 — 提交请求后返回任务 ID,通过 查询任务状态 接口获取生成结果。视频链接有效期 24 小时。
curl -X POST https://qingbo.dev/v1/tasks \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "wan2.5-t2v",
    "action": "generate",
    "prompt": "春天的樱花树下,花瓣随风飘落",
    "aspect_ratio": "16:9",
    "duration": 5
  }'
{
  "task_id": "task-wave1775285160b950328499",
  "model": "wan2.5-t2v",
  "action": "generate",
  "status": "queued",
  "created_at": 1775285160040,
  "progress": 0
}

可用模型

模型 ID说明
wan2.5-t2v万象 2.5 文生视频
wan2.5-i2v万象 2.5 图生视频
wan2.2-i2v-flash万象 2.2 图生视频快速版
wan2.2-i2v-plus万象 2.2 图生视频增强版

统一参数

model
string
必填
模型 ID
action
string
默认值:"generate"
操作类型
prompt
string
必填
视频描述文本
aspect_ratio
string
默认值:"16:9"
宽高比,后台自动映射为最佳分辨率
duration
integer
默认值:"5"
视频时长(秒)
resolution
string
分辨率:480p720p1080p
seed
integer
随机种子,范围 0-2147483647
watermark
boolean
默认值:"false"
是否添加水印
image_urls
string[]
参考图片 URL(图生视频模型使用)
first_frame
string
首帧图片 URL
last_frame
string
尾帧图片 URL
negative_prompt
string
不希望出现的内容,最多 500 字符
callback_url
string
Webhook 回调地址
extra
object
透传参数

模型特定参数

模型 ID:wan2.5-t2v
extra.prompt_extend
boolean
默认值:"true"
是否启用提示词优化扩展
extra.audio
boolean
默认值:"false"
是否生成音频

生成模式

模式模型参数
文生视频wan2.5-t2vprompt
图生视频wan2.5-i2v / wan2.2-i2v-*prompt + image_urls
首尾帧wan2.5-i2vfirst_frame + last_frame

响应

task_id
string
任务 ID
model
string
使用的模型 ID
action
string
操作类型
status
string
任务状态:queued
created_at
integer
创建时间(Unix 毫秒时间戳)
progress
integer
进度,初始为 0