

POST https://wanqing.streamlakeapi.com/api/gateway/v1/videos/generations
Authorization: Bearer YOUR_API_KEY
X-Ks-Wq-Async: enable
Content-Type: application/json
字段 | 类型 | 必填 | 默认值 | 描述 |
model | string | 必填 | 无 | 推理点 ID |
first_frame | string | 必填 | 无 | 首帧图片的url |
last_frame | string | 可选 | 无 | 尾帧图片的url |
prompt | string | 必填 | 无 | 正向文本提示词 |
negative_prompt | string | 可选 | 无 | 负向文本提示词;支持 wan2.2 系列模型,minimax-h3 系列模型不支持 |
resolution | string | 可选 | 480P | 生成视频的分辨率。wan2.2-i2v-a14b 的枚举值:480P、720P;minimax-h3 模型枚举值:768P |
ratio | string | 可选 | adaptive | 生成视频的宽高比;minimax-h3、minimax-h3-fl2va 模型枚举值:9:16、16:9、4:3、3:4、1:1、adaptive,默认为 adaptive(自适应首尾帧图片比例) |
duration | int | 可选 | 3 | 视频时长;wan2.2 模型取值范围:[3, 10],minimax-h3 模型取值范围:[1, 15] |
fps | int | 可选 | 20 | 每秒帧数;wan2.2 模型取值范围:[4, 32],wan2.2-i2v-a14b 要求总帧数(fps × duration)是 4 的倍数;minimax-h3 模型仅支持 fps=24 |
num_inference_steps | int | 可选 | 模型默认值 | 去噪步数,越大效果越好,延迟线性增长;wan2.2 模型取值范围:[1, 100],minimax-h3 模型取值范围:[1, 50],默认值为 50 |
seed | int | 可选 | 随机 | 随机数种子,使用相同的seed,生成结果会更加接近或者一致 |
guidance_scale | float | 可选 | 模型默认值 | 控制 prompt 的强度,数值越大,越贴近 prompt;支持 wan2.2 系列模型,minimax-h3 系列模型不支持 |
curl 'https://wanqing.streamlakeapi.com/api/gateway/v1/videos/generations' \
-H "Authorization: Bearer $WQ_API_KEY" \
-H "X-Ks-Wq-Async: enable" \
-H 'Content-Type: application/json' \
-d '{
"model": "ep-xxx",
"first_frame": "https://h2.static.yximgs.com/kcdn/cdn-kcdn112682/coffee.png",
"last_frame": "https://h2.static.yximgs.com/kcdn/cdn-kcdn112682/coffee.png",
"prompt": "咖啡杯中冒出袅袅的热气,缓缓上升并消散在空气中,咖啡液面有轻微的波光"
}'
{
"data": {
"task_status": "PENDING",
"task_id": "0385dc79-5ff8-4d82-bcb6-xxxxxx"
},
"request_id": "xxx"
}
status 枚举值定义:
GET https://wanqing.streamlakeapi.com/api/gateway/v1/endpoints/{endpointId}/tasks/{taskId}
Authorization: Bearer YOUR_API_KEY
curl 'https://wanqing.streamlakeapi.com/api/gateway/v1/endpoints/{endpointId}/tasks/{taskId}' \
-H "Authorization: Bearer $WQ_API_KEY"
{
"request_id": "req-xxx",
"data": {
"task_id": "task-g2pyu3-1759150148",
"task_status": "SUCCESS",
"content": [
{
"url": "xxx"
}
],
"submit_time": 1759150148,
"end_time": 1759150172
}
}
注意:生成视频的 url 链接有效期为 24 小时,请及时下载并保存。submit_time和end_time为 Unix 时间戳,单位为秒。