curl --request POST \
--url https://api.evolink.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "minimax-h3-image",
"prompt": "海面上绚丽多彩的美丽日落"
}
'{
"created": 1757156493,
"id": "task-unified-1757156493-imcg5zqt",
"model": "minimax-h3-image",
"object": "image.generation.task",
"progress": 0,
"status": "pending",
"task_info": {
"can_cancel": true,
"estimated_time": 100
},
"type": "image",
"usage": {
"billing_rule": "per_call",
"credits_reserved": 2.5,
"user_group": "default"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": "insufficient_quota",
"message": "Insufficient quota. Please top up your account.",
"type": "insufficient_quota"
}
}{
"error": {
"code": "model_access_denied",
"message": "Token does not have access to model: minimax-h3-image",
"type": "invalid_request_error"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests, please try again later",
"type": "rate_limit_error"
}
}{
"error": {
"code": "internal_error",
"message": "Internal server error",
"type": "api_error"
}
}MiniMax H3 Image 图像生成
- MiniMax H3 Image (minimax-h3-image) 模型支持文本转图片、图像编辑两种生成模式,最多可传 16 张参考图
- 输出最高 2000 万像素:可选画面比例配合 1K / 2K / 4K 分辨率档位,也可直接指定宽高像素
- 异步处理模式,使用返回的任务ID 进行查询
- 生成的图像链接,有效期为24小时,请尽快保存
curl --request POST \
--url https://api.evolink.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "minimax-h3-image",
"prompt": "海面上绚丽多彩的美丽日落"
}
'{
"created": 1757156493,
"id": "task-unified-1757156493-imcg5zqt",
"model": "minimax-h3-image",
"object": "image.generation.task",
"progress": 0,
"status": "pending",
"task_info": {
"can_cancel": true,
"estimated_time": 100
},
"type": "image",
"usage": {
"billing_rule": "per_call",
"credits_reserved": 2.5,
"user_group": "default"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": "insufficient_quota",
"message": "Insufficient quota. Please top up your account.",
"type": "insufficient_quota"
}
}{
"error": {
"code": "model_access_denied",
"message": "Token does not have access to model: minimax-h3-image",
"type": "invalid_request_error"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests, please try again later",
"type": "rate_limit_error"
}
}{
"error": {
"code": "internal_error",
"message": "Internal server error",
"type": "api_error"
}
}授权
##所有接口均需要使用Bearer Token进行认证##
获取 API Key :
访问 API Key 管理页面 获取您的 API Key
使用时在请求头中添加:
Authorization: Bearer YOUR_API_KEY
请求体
图像生成模型名称,官方通道,稳定性和可控性更好,适用于商业场景
minimax-h3-image "minimax-h3-image"
提示词,描述想要生成的图像,或描述如何编辑已输入的图像
长度限制:
- 最多
32,000字符(按 Unicode 码点统计) prompt_extend为false时,只有提示词的前约4096个 token 生效
32000"海面上绚丽多彩的美丽日落"
参考图像URL列表,用于图生图与图像编辑功能
注意:
- 单次请求支持输入图像数量:
1~16张 - 单张图像大小:不超过
64MB - 单张图像边长:宽 / 高均在
128~8192px 之间 - 单张图像宽高比:长边 / 短边不超过
4:1 - 支持的文件格式:
.jpeg、.jpg、.png、.webp、.heic、.heif - 图像URL需要服务器能直接查看,或者图像URL在访问时会直接进行下载(一般这种URL是以图像的扩展名作为结尾,例如
.png、.jpg) - 图生图/图像编辑场景下,传入的参考图本身会产生额外的图像输入 token 消耗
[
"https://example.com/image1.png",
"https://example.com/image2.png"
]
生成图像的尺寸,支持比例格式与显式像素格式两种写法,默认 auto
① 比例格式(推荐):X:Y,常用比例如下:
1:1:正方形1:2/2:1:极竖/极横1:3/3:1:超竖/超横(临界 3:1)2:3/3:2:标准竖/横3:4/4:3:传统竖/横4:5/5:4:社交媒体常用9:16/16:9:手机/桌面宽屏9:21/21:9:超宽屏
其他 X:Y 也可以:X、Y 为 1 ~ 300 的整数,且长宽比 ≤ 3:1
② 显式像素格式:WxH(或 W×H),例如 1024x1024、2720x1536、5472x3072
- 像素预算:
655,360 ≤ width × height ≤ 20,000,000(约 0.65 MP ~ 20 MP) - 长宽比:
≤ 3:1
③ auto:由模型自动决定画面比例,输出面积仍按 resolution 档位
超限处理:
- 超出上述范围的尺寸直接返回
400,不会自动缩放或取整
"auto"
分辨率档位快捷参数,在 size 为 auto 或比例格式时生效,显式像素格式下此字段被忽略
像素预算规则(根据目标总像素数和 size 比例推算宽高):
1K:~1 MP(1024² = 1,048,576 像素)2K:~4 MP(2048² = 4,194,304 像素)4K:~16.8 MP(4096² = 16,777,216 像素)
横版/正方形对应实际输出尺寸(竖版尺寸为对应横版的宽高调换,例如 3:4 = 4:3 反转):
| 比例 | 2K | 4K |
|---|---|---|
1:1 | 2048×2048 | 4096×4096 |
4:3 | 2368×1760 | 4736×3552 |
16:9 | 2720×1536 | 5472×3072 |
3:1 | 3552×1184 | 7104×2368 |
注意:
1K与2K的图像输出 token 数相同(每张约4,096);4K每张约16,384,以返回的usage为准- 取值大小写不敏感
1K, 2K, 4K "2K"
输出图像的文件格式,默认 jpeg
jpeg:有损压缩,文件体积更小png:无损webp:体积与质量兼顾
注意:
- 不支持透明背景
jpeg, png, webp "jpeg"
生成图片数量,每张独立计费
注意:
- 文本输入 token 与图像输入 token 都会随
n等比放大 - 部分图片失败时(例如未通过内容安全审核),任务仍会带着成功的图片完成。实际张数以响应中的
results为准,计费按返回的usage结算
1 <= x <= 101
提示词优化开关:生成前由模型把提示词改写得更详细,默认 true
注意:
- 只有文生图且
size为比例格式或显式像素格式时可以设为false size为auto,或传了image_urls时,设为false会返回400- 开启时每张图约增加
2,300~3,800个文本输入 token;关闭时只计提示词本身
true
任务完成后的HTTPS回调地址
回调时机:
- 任务完成(completed)、失败(failed)或取消(cancelled)时触发
- 在计费确认完成后发送
安全限制:
- 仅支持HTTPS协议
- 禁止回调到内网IP地址(127.0.0.1、10.x.x.x、172.16-31.x.x、192.168.x.x等)
- URL长度不超过
2048字符
回调机制:
- 超时时间:
10秒 - 失败后最多重试
3次(会分别在失败的1秒/2秒/4秒后进行重试) - 回调响应体格式与任务查询接口返回的格式一致
- 回调地址若返回2xx状态码视为成功,其他状态码会触发重试
"https://your-domain.com/webhooks/image-task-completed"
响应
图像任务创建成功
任务创建时间戳
1757156493
任务ID
"task-unified-1757156493-imcg5zqt"
实际使用的模型名称
"minimax-h3-image"
任务的具体类型
image.generation.task 任务进度百分比 (0-100)
0 <= x <= 1000
任务状态
pending, processing, completed, failed "pending"
异步任务信息
Show child attributes
Show child attributes
任务的输出类型
text, image, audio, video "image"
使用量和计费信息
Show child attributes
Show child attributes