Skip to content

Wan - Flash 图转视频 ​

接口 ​

POST /videos/generations

完整 URL: https://modelfold.ai/v1/videos/generations

鉴权:所有请求都需要 Authorization: Bearer <API_KEY> 请求头。

模型参数直接放在 JSON 请求体中,不要套 input。请求等待生成完成后返回 data[].url;支持的媒体模型也可使用 异步创建、轮询及回调。示例素材地址须替换为自己的公开可访问文件。计费及错误说明见 API 网关。

生成任务的输入参数

请求参数 ​

请求体 (application/json) ​

参数类型必填说明
modelstring是用于生成的模型名称。必填字段。
- 此端点必须为 wan/2-6-flash-image-to-video 默认值:"wan/2-6-flash-image-to-video"。 可选值:wan/2-6-flash-image-to-video。 示例:wan/2-6-flash-image-to-video。
promptstring是本站网关要求传入 prompt,最长 2000 字。视频生成的文本提示。支持中英文,2–1500 个字符。 maxLength: 1500. 示例:Anthopmopric fox singing a Christmas song at the rubbish dump in the rain.。
image_urlsarray&lt;string&gt;是图片 URL 列表。所有图片至少为 256x256 像素。(上传后的文件 URL,非文件内容;接受类型:image/jpeg, image/png, image/webp;最大大小:10.0MB) maxItems: 1.
durationstring否生成视频的时长(秒) 默认值:"5"。 可选值:5 / 10 / 15。 示例:5。
resolutionstring否视频分辨率等级 默认值:"1080p"。 可选值:720p / 1080p。 示例:720p。
audioboolean是是否生成带音频的视频。音频会直接影响费用,带声音与静音视频的计费不同。(布尔值 true/false) 示例:false。
multi_shotsboolean否multi_shots 参数控制 AI 视频生成时的镜头构图风格,决定生成视频为单一连续镜头还是多镜头带转场。(布尔值 true/false) 示例:false。

请求示例 ​

bash
curl -X POST "https://modelfold.ai/v1/videos/generations" \
  -H "Authorization: Bearer $MODELFOLD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "wan/2-6-flash-image-to-video",
  "prompt": "Anthopmopric fox singing a Christmas song at the rubbish dump in the rain.",
  "image_urls": [
    "https://example.com/reference.png"
  ],
  "audio": false,
  "duration": "5",
  "resolution": "1080p"
}'
json
{
  "model": "wan/2-6-flash-image-to-video",
  "prompt": "Anthopmopric fox singing a Christmas song at the rubbish dump in the rain.",
  "image_urls": [
    "https://example.com/reference.png"
  ],
  "audio": false,
  "duration": "5",
  "resolution": "1080p"
}

响应 ​

200 — 生成完成。usage 返回实际计费明细;结果地址仅作结构示例。 ​

json
{
  "ok": true,
  "created": 1792134000,
  "data": [
    {
      "url": "https://modelfold.ai/uploads/outputs/result.mp4"
    }
  ],
  "usage": {}
}

ModelFold — 一个 API,接入所有主流 AI 模型。