Install
openclaw skills install minimax-image-generationMiniMax AI图片生成,支持 image-01 和 image-01-live 模型。 image-01: 画面表现细腻,支持文生图、图生图 image-01-live: 手绘、卡通等画风增强,支持文生图并进行画风设置 需要 MiniMax API Key (Coding Plan)。
openclaw skills install minimax-image-generation使用 MiniMax Coding Plan API 调用 image-01、image-01-live 模型生成图片。
API Key 获取: https://platform.minimaxi.com/user-center/basic-information/interface-key
export MINIMAX_API_KEY="your-api-key"
| 模型 | 说明 | 支持比例 |
|---|---|---|
| image-01 | 画面表现细腻,支持文生图、图生图 | 1:1, 16:9, 4:3, 3:2, 2:3, 3:4, 9:16, 21:9 |
| image-01-live | 手绘、卡通等画风增强 | 1:1, 16:9, 4:3, 3:2, 2:3, 3:4, 9:16 |
1:1 (1024x1024) - 默认16:9 (1280x720)4:3 (1152x864)3:2 (1248x832)2:3 (832x1248)3:4 (864x1152)9:16 (720x1280)21:9 (1344x576) - 仅 image-01# 列出可用模型
python3 scripts/minimax_image_create.py --list-models
# 文生图 (image-01)
python3 scripts/minimax_image_create.py \
--api-key $MINIMAX_API_KEY \
--model image-01 \
--prompt "一只可爱的橘猫" \
--aspect-ratio 16:9
# 文生图 (image-01-live)
python3 scripts/minimax_image_create.py \
--api-key $MINIMAX_API_KEY \
--model image-01-live \
--prompt "一只可爱的橘猫" \
--style watercolor
# 图生图
python3 scripts/minimax_image_create.py \
--api-key $MINIMAX_API_KEY \
--model image-01 \
--prompt "转换成水彩画风格" \
--input-image https://example.com/image.jpg
| 参数 | 说明 | 默认值 |
|---|---|---|
--api-key | MiniMax API Key | 环境变量 MINIMAX_API_KEY |
--model | 模型名称 (image-01/image-01-live) | image-01 |
--prompt | 图像描述 (必填) | - |
--aspect-ratio | 宽高比 | 1:1 |
--width | 自定义宽度 (仅 image-01) | - |
--height | 自定义高度 (仅 image-01) | - |
--n | 生成数量 [1-9] | 1 |
--seed | 随机种子 | 随机 |
--prompt-optimizer | 开启 prompt 自动优化 | false |
--aigc-watermark | 添加水印 | false |
--response-format | 返回格式 (url/base64) | url |
--input-image | 输入图片 (图生图) | - |
--style | 画风 (仅 image-01-live) | - |
--output-json | JSON 格式输出 | - |
⚠️ 注意: style 参数当前可能不稳定,建议先用默认设置生成。
realistic - 写实animation - 动画comic - 漫画watercolor - 水彩oil_painting - 油画sketch - 素描cartoon - 卡通hand_drawn - 手绘端点: POST https://api.minimaxi.com/v1/image_generation
请求头:
Authorization: Bearer <API_KEY>
Content-Type: application/json
请求体:
{
"model": "image-01",
"prompt": "图像描述",
"aspect_ratio": "16:9",
"n": 1,
"response_format": "url",
"prompt_optimizer": false
}
响应:
{
"id": "task_id",
"data": {
"image_urls": ["https://..."]
},
"metadata": {
"success_count": "1"
},
"base_resp": {
"status_code": 0,
"status_msg": "success"
}
}
--input-image 参数指定输入图片 URL