Appearance
HappyHorse / Wan 视频模型
happyhorse-1.0 和 wan2.7 使用 MoonApiX 通用视频任务入口,适合文生视频、图生视频和参考素材视频。创建任务时调用 POST /v1/videos,保存任务 ID,再通过任务查询接口读取状态和结果 URL。
模型列表
| 模型 | 常用模式 | 分辨率 | 时长 | 比例 |
|---|---|---|---|---|
happyhorse-1.0 | 文生视频、首帧图生视频、参考图视频 | 720P、1080P | 5、10、15 秒 | 16:9、9:16、1:1、4:3、3:4 |
wan2.7 | 文生视频、首帧、尾帧、参考图、参考视频 | 720P、1080P | 5、10、15 秒 | 16:9、9:16、1:1、4:3、3:4 |
实际可用参数和价格以 MoonApiX 后台、价格页和 GET /v1/models 为准。
文生视频
bash
curl https://moonapix.com/v1/videos \
-H "Authorization: Bearer <MOONAPIX_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"model": "happyhorse-1.0",
"prompt": "A warm cinematic shot of a handcrafted wooden music box opening on a desk, slow camera push-in.",
"duration": 5,
"resolution": "720P",
"ratio": "16:9",
"watermark": false,
"callback_url": "https://example.com/moonapix/webhook"
}'图生视频
首帧图生视频可以直接使用 first_frame_url,也可以在 images[] 中标记 role。
json
{
"model": "happyhorse-1.0",
"prompt": "Animate the product with a slow rotating camera and soft studio light.",
"first_frame_url": "https://example.com/product.png",
"duration": 5,
"resolution": "720P",
"ratio": "1:1",
"watermark": false
}兼容数组写法:
json
{
"model": "wan2.7",
"prompt": "Keep the character appearance, subtle smile, natural head movement.",
"images": [
{
"url": "https://example.com/first-frame.png",
"role": "first_frame"
}
],
"duration": 5,
"resolution": "1080P",
"ratio": "9:16"
}尾帧和参考视频
wan2.7 支持尾帧和参考视频。参考视频总时长建议不超过 5 秒,图片和视频参考素材总数建议不超过 5 个。
json
{
"model": "wan2.7",
"prompt": "Transition from the first frame to the final frame with smooth camera movement.",
"first_frame_url": "https://example.com/first.png",
"last_frame_url": "https://example.com/last.png",
"duration": 5,
"resolution": "720P",
"ratio": "16:9"
}参考视频示例:
json
{
"model": "wan2.7",
"prompt": "Follow the reference motion while keeping the new product design consistent.",
"videos": [
{
"url": "https://example.com/reference-motion.mp4",
"role": "reference_video"
}
],
"duration": 5,
"resolution": "720P",
"ratio": "16:9"
}happyhorse-1.0 当前不支持尾帧、参考视频或独立音频。需要这些输入时请选择明确支持对应能力的模型。
查询任务
bash
curl https://moonapix.com/v1/tasks/task_xxx \
-H "Authorization: Bearer <MOONAPIX_API_KEY>"也可以使用兼容查询入口:
bash
curl https://moonapix.com/v1/videos/task_xxx \
-H "Authorization: Bearer <MOONAPIX_API_KEY>"成功响应通常会在多个字段中放置结果 URL,便于不同 SDK 读取:
json
{
"id": "task_xxx",
"task_id": "task_xxx",
"object": "video",
"model": "wan2.7",
"status": "succeeded",
"url": "https://example.com/result.mp4",
"video_url": "https://example.com/result.mp4",
"output": {
"url": "https://example.com/result.mp4"
}
}客户端应先检查 status,只有 succeeded 时读取 URL;submitted、queued、running、failed 或 cancelled 都不要当作成功结果。
常用字段
| 字段 | happyhorse-1.0 | wan2.7 | 说明 |
|---|---|---|---|
model | 支持 | 支持 | 视频模型名。 |
prompt | 支持 | 支持 | 视频描述。 |
duration | 5、10、15 | 5、10、15 | 视频时长,单位秒。 |
resolution | 720P、1080P | 720P、1080P | 分辨率。 |
ratio / aspect_ratio | 支持 | 支持 | 16:9、9:16、1:1、4:3、3:4。 |
first_frame_url | 支持 | 支持 | 首帧图片 URL。 |
last_frame_url | 不支持 | 支持 | 尾帧图片 URL。 |
images[] | 支持 | 支持 | 图片素材,建议最多 5 个。 |
videos[] | 不支持 | 支持 | 参考视频,建议总时长不超过 5 秒。 |
audios[] | 不支持 | 不支持 | 当前不作为独立音频素材入口。 |
watermark | 支持 | 支持 | 是否添加水印。 |
callback_url | 支持 | 支持 | 任务完成回调地址。 |
素材建议
如果素材已有稳定公网 URL,优先直接传 URL。需要复用、外部 URL 不稳定,或业务需要统一托管时,可先使用 MoonApiX 上传与素材接口创建托管 URL。是否能直接使用 Asset://asset_xxx 取决于模型支持,请以模型页和生成验证为准。
结果和计费
这两个模型按任务计费。任务提交成功后请保存 id / task_id、model、请求参数、任务状态和结果 URL;价格以 MoonApiX 后台配置为准。