# MiniMax H3 / H3 Max 调用示例 This file is the focused AI-readable context for one UniAI documentation page. URL: https://docs.uniai.tv/models/video/minimax-h3/examples Locale: zh-CN Markdown: https://docs.uniai.tv/ai/pages/models/video/minimax-h3/examples.md Description: MiniMax H3、H3 Max 视频生成、媒体参考、Context 和 2K 再生成的原生 API 请求示例。 Agent guidance: - Use this page when the user is asking about this specific route or model capability. - Preserve endpoint paths, JSON keys, model IDs, and placeholder values exactly. - `{BASE_URL}` means `https://api.uniai.tv`; treat `sk-***` and `task_xxx` as safe placeholders, not real secrets. ## Page Markdown 将 `$UNIAI_API_KEY` 和素材地址替换为你自己的值。每次发送一个请求。 ## 文生视频 ```bash curl -X POST "https://api.uniai.tv/v2/video_generation" \ -H "Authorization: Bearer $UNIAI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "MiniMax-H3", "content": [ { "type": "text", "text": "A paper boat crosses a quiet pond in warm morning light." } ], "duration": 5, "resolution": "2K", "ratio": "16:9" }' ``` ## 首尾帧 ```bash curl -X POST "https://api.uniai.tv/v2/video_generation" \ -H "Authorization: Bearer $UNIAI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "MiniMax-H3", "content": [ { "type": "text", "text": "The camera moves from the first frame to the last." }, { "type": "image_url", "image_url": { "url": "https://YOUR_PUBLIC_URL/first.png" }, "role": "first_frame" }, { "type": "image_url", "image_url": { "url": "https://YOUR_PUBLIC_URL/last.png" }, "role": "last_frame" } ], "duration": 5, "resolution": "768P" }' ``` ## 图片、视频和音频参考 ```bash curl -X POST "https://api.uniai.tv/v2/video_generation" \ -H "Authorization: Bearer $UNIAI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "MiniMax-H3", "content": [ { "type": "text", "text": "A person speaks while walking through the city." }, { "type": "image_url", "image_url": { "url": "https://YOUR_PUBLIC_URL/person.png" }, "role": "reference_image" }, { "type": "video_url", "video_url": { "url": "https://YOUR_PUBLIC_URL/walking.mp4" }, "role": "reference_video" }, { "type": "audio_url", "audio_url": { "url": "https://YOUR_PUBLIC_URL/voice.mp3" }, "role": "reference_audio" } ], "duration": 5, "resolution": "768P", "ratio": "adaptive" }' ``` ## H3 Max ```bash curl -X POST "https://api.uniai.tv/v2/video_generation" \ -H "Authorization: Bearer $UNIAI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "MiniMax-H3-Max", "content": [ { "type": "text", "text": "A paper boat crosses a quiet pond in warm morning light." } ], "duration": 5, "resolution": "768P", "ratio": "16:9", "extra": { "prompt_expansion_mode": "balanced" } }' ``` ## Context 返回处理后的提示词,不会创建视频。省略 `resolution`。 ```bash curl -X POST "https://api.uniai.tv/v2/h3_context_ir" \ -H "Authorization: Bearer $UNIAI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "MiniMax-H3", "content": [ { "type": "text", "text": "A paper boat crosses a quiet pond in warm morning light." } ], "duration": 5, "ratio": "16:9" }' ``` ## 再生成 2K 使用自己账号最近七天内创建的已完成 H3 768P 任务。 ```bash curl -X POST "https://api.uniai.tv/v2/video_regeneration" \ -H "Authorization: Bearer $UNIAI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "MiniMax-H3", "source_task_id": "task_YOUR_COMPLETED_H3_768P", "resolution": "2K" }' ```