模型 API 目录(含官方/标准)▾
图像系列
视频系列
文本系列
[官方] = 官方上游渠道;[标准] = 经济路由。同族可展开切换对比。
生视频 API // VIDEOS
OpenAI 兼容接口(推荐)
标准的 OpenAI 视频接口(Sora 风格):提交任务后返回 id,轮询GET /v1/videos/{id} 获取结果。通用 OpenAI 兼容客户端(OpenAI SDK、Dify、n8n 等)可直接调用。
POST
https://xiaoguai123.xyz/v1/videoscurl -X POST https://xiaoguai123.xyz/v1/videos \
-H "Authorization: Bearer sk-xxx" \
-H "Content-Type: application/json" \
-d '{
"model": "minimax-h3",
"prompt": "镜头缓缓推进,瀑布与彩虹,自然光",
"duration": 8,
"resolution": "720p",
"size": "1280x720"
}'GET
https://xiaoguai123.xyz/v1/videos/{id}{
"id": "xg_abc123",
"object": "video",
"status": "completed",
"model": "minimax-h3",
"progress": 100,
"created_at": 1763000000,
"completed_at": 1763000020,
"outputs": [{ "id": "xg_abc123_1", "type": "video_file", "url": "https://cdn/video.mp4" }],
"error": null
}状态:queued / in_progress / completed / failed。失败会自动退款,error 字段含原因。
原生任务接口
POST
/api/v1/videos/generations提交异步生视频任务。按秒计费的模型会按 duration 计算冻结金额。
curl -X POST https://xiaoguai123.xyz/api/v1/videos/generations \
-H "Authorization: Bearer sk-xxx" \
-H "Content-Type: application/json" \
-d '{
"model": "sora-2",
"prompt": "瀑布与彩虹",
"duration": 8,
"resolution": "720p",
"aspect_ratio": "16:9"
}'三种玩法(文生 / 图生 / 参考图生视频)
文生视频(最简)
curl -X POST https://xiaoguai123.xyz/v1/videos -H "Authorization: Bearer sk-xxx" -H "Content-Type: application/json" -d '{"model": "minimax-h3", "prompt": "一只橘猫在雨夜街道上走过"}'图生视频(首帧,可加尾帧)
curl -X POST https://xiaoguai123.xyz/v1/videos -H "Authorization: Bearer sk-xxx" -H "Content-Type: application/json" -d '{"model": "minimax-h3", "prompt": "让画面中的猫缓缓转头", "image": "https://example.com/first.png", "last_frame": "https://example.com/last.png"}'参考图生视频(多张参考 / 角色 / 参考视频 / 音频)
curl -X POST https://xiaoguai123.xyz/v1/videos -H "Authorization: Bearer sk-xxx" -H "Content-Type: application/json" -d '{"model": "minimax-h3", "prompt": "保持角色一致,走进竹林", "image_urls": ["https://example.com/ref1.png", "https://example.com/ref2.png"]}'字段对照:image = 首帧 ·last_frame = 尾帧 ·image_urls / reference_images = 参考图 ·image_with_roles = 带角色参考 ·video_urls = 参考视频 ·audio_urls = 参考音频(均支持 URL 或 base64 Data URI)
官方 MiniMax content[] 兼容写法
curl -X POST https://xiaoguai123.xyz/v1/videos \
-H "Authorization: Bearer sk-xxx" \
-H "Content-Type: application/json" \
-d '{
"model": "minimax-h3-aether",
"prompt": "保持参考视频的动作节奏和镜头运动",
"mode": "全能多参",
"content": [
{ "type": "video_url", "role": "reference_video", "video_url": { "url": "https://example.com/ref.mp4" } },
{ "type": "image_url", "role": "reference_image", "image_url": { "url": "https://example.com/ref.png" } }
]
}'H3 会自动把 reference_video 转成video_urls,把reference_image 转成image_urls;其他模型仍不接受content[]。
请求字段
| 字段 | 必填 | 说明 |
|---|---|---|
| model | 是 | 视频模型 publicId |
| prompt | 是 | 提示词 |
| duration / seconds | 视模型 | 秒数;影响按秒计费金额 |
| resolution | 否 | 如 480p / 720p / 1080p(视模型) |
| size / aspect_ratio | 否 | 画面比例:支持 "1280x720" 或 "16:9" 等 |
| image / image_urls / reference_images / first_frame_image / last_frame_image / image_with_roles / video_urls / audio_urls | 否 | 图生 / 参考图生视频素材(URL 或 base64),见具体模型详情页 |
提示
视频任务耗时通常长于生图,请适当加大轮询间隔(如 3–5 秒),并处理好 timeout / failed 退款状态。
MiniMax H3 未指定逐字台词时,默认保留环境音、动作音和纯器乐配乐,但不会生成对白、旁白或可辨识人声。如需对白,请在 prompt 中明确给出说话人和原文,例如:角色A说:“计划开始。”
