MiniMax H3 / H3 Max 调用示例
将 $UNIAI_API_KEY 和素材地址替换为你自己的值。每次发送一个请求。
文生视频
curl -X POST "https://api.uniall.ai/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"
}'
首尾帧
curl -X POST "https://api.uniall.ai/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"
}'
图片、视频和音频参考
curl -X POST "https://api.uniall.ai/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
curl -X POST "https://api.uniall.ai/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。
curl -X POST "https://api.uniall.ai/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 任务。
curl -X POST "https://api.uniall.ai/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"
}'