POST /v1/images/generationshttps://moyunapi.comAuthorization: Bearer sk-xxxapplication/json| 模型名 | 说明 | 特性 |
|---|---|---|
MiniMax-image-01 | 全新图像生成模型 | 画面细腻,支持文生图、人物主体参考 |
MiniMax-image-01-live | 画风控制模型 | 支持漫画/元气/中世纪/水彩画风设置 |
| aspect_ratio | 分辨率 | 说明 |
|---|---|---|
1:1 | 1024×1024 | 默认正方形 |
16:9 | 1280×720 | 宽屏横图 |
4:3 | 1152×864 | 标准横图 |
3:2 | 1248×832 | 摄影横图 |
2:3 | 832×1248 | 竖版海报 |
3:4 | 864×1152 | 标准竖图 |
9:16 | 720×1280 | 手机竖屏 |
21:9 | 1344×576 | 超宽横图(仅 image-01) |
response_format 为 url 时,URL 有效期为 24 小时。aspect_ratio、prompt_optimizer 等参数需通过 OpenAI SDK 的 extra_body 传递。21:9 宽高比仅支持 MiniMax-image-01 模型。prompt 最长 1500 字符。n 取值范围 [1, 9]。curl --location 'https://moyunapi.com/v1/images/generations' \
--header 'Accept;' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "MiniMax-image-01",
"prompt": "A man in a white t-shirt, full-body, standing front view, outdoors, with the Venice Beach sign in the background, Los Angeles. Fashion photography in 90s documentary style, film grain, photorealistic.",
"n": 1,
"response_format": "b64_json",
"aspect_ratio": "16:9",
"prompt_optimizer": true
}'{
"created": 1719600000,
"data": [
{
"b64_json": "iVBORw0KGgoAAAANSUhEUgAAAoAAAAKgCAYAAAALda0mAAAgAElEQVR4nO3deZyVdfk//hcDA8MyMDLDOoOo4IzK4ih2nXYd1x0cdezrrrt2Xdd1be1Va9fWtlfXdbu0+6ju1qp7bV2vtfbaq9YOOxRRUUQEZBh9EEYQGZYZGH5/P1wvCcgkM8lkv5/367p+Ei/vey7PeZ/n8/mcz/N9nue7vu/zfd/3..."
}
]
}