🔥 Black Friday AI API deals are live· 🎬 Seedance 2.5 — 20% off, up to 42% below market, until Nov 30Ends in--d --:--:--See deals →

Wan 3.0 参考素材转视频 API: AI 图像转视频

通过 Muapi REST API 使用 Wan 3.0 参考素材转视频将图像制作成视频。按次生成付费,无需订阅。

交互式模型控制

使用 Wan 3.0,根据参考图像、视频和音频生成视频。让角色和风格在整个场景中保持一致。按次生成付费。

Wan 3.0 参考素材转视频 API 文档

端点

POST https://api.muapi.ai/api/v1/wan3.0-reference-to-video

使用 Muapi API 密钥在 x-api-key 请求头中提交任务,然后轮询 https://api.muapi.ai/api/v1/predictions/{request_id}/result 直到状态变为 completed。

参数

名称类型必填描述
promptstring是描述要创建的视频。参考媒体通过其数组顺序识别。
images_listarray否最多 10 参考图像 for visual coherence guidance.
videos_listarray否最多 5 reference video clips (MP4/MOV, 1-15s each); total reference + generated duration must not exceed 30s.
audios_listarray否最多 5 参考音频 clips (total duration up to 15s) for soundtrack synchronization.
resolutionstring否输出视频的分辨率。选项: 480p, 720p, 1080p默认值: "720p"
aspect_ratiostring否输出视频的帧尺寸。选项: adaptive, 16:9, 9:16, 1:1, 4:3, 3:4默认值: "16:9"
durationinteger否视频时长(秒)。默认值: 5
thinking_modeboolean否启用深度思考模式以理解复杂场景。默认值: false
enable_audioboolean否在视频中加入生成的音频轨道。默认值: true
seedinteger否用于复现结果的随机种子。使用 -1 表示随机种子。默认值: -1

cURL 示例

REQUEST_ID=$(curl -s -X POST https://api.muapi.ai/api/v1/wan3.0-reference-to-video \
  -H "x-api-key: $MUAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"<prompt>"}' | jq -r .request_id)

curl -s https://api.muapi.ai/api/v1/predictions/$REQUEST_ID/result -H "x-api-key: $MUAPI_API_KEY"

Python 示例

import os, time, requests

API = "https://api.muapi.ai/api/v1"
headers = {"x-api-key": os.environ["MUAPI_API_KEY"]}

r = requests.post(f"{API}/wan3.0-reference-to-video", headers=headers, json={"prompt":"<prompt>"})
request_id = r.json()["request_id"]

while True:
    res = requests.get(f"{API}/predictions/{request_id}/result", headers=headers).json()
    if res["status"] == "completed":
        print(res["outputs"]); break
    if res["status"] == "failed":
        raise RuntimeError(res.get("error"))
    time.sleep(3)

完整文档及 Agent/MCP 集成: llms.txt. 在此获取 API 密钥: muapi.ai/access-keys.