MiniMax image-01 文生图工具
MiniMax image-01 文本生成图像工具。使用 MiniMax 的 image-01 模型从文字描述生成图片。
⚠️ 重要:区域选择 使用前根据你的 MiniMax 账户区域确定 API 节点:
| 区域 | API 地址 | 适用用户 |
|---|---|---|
| 中国区 | https://api.minimax.chat/v1/image_generation |
中国用户 / MiniMax 中国站 |
| 国际区 | https://api.minimax.io/v1/image_generation |
海外用户 |
如何判断:
- 在中国或使用 MiniMax 中国站 → 中国区
- 在海外或使用 MiniMax 国际站 → 国际区
快速使用
python scripts/image_gen.py "你的图片描述" --region cn
参数说明
| 参数 | 说明 | 默认值 |
|---|---|---|
prompt |
图片描述(必填) | — |
--region |
区域:cn 或 global(必填) |
— |
--aspect |
比例:16:9、1:1、4:3、9:16、21:9 | 16:9 |
--n |
生成数量(1-9) | 1 |
--no-enhance |
关闭 Prompt 增强 | 开启 |
比例参考
| 比例 | 最佳用途 |
|---|---|
| 16:9 | 横版 / 视频封面 |
| 1:1 | 社交媒体 / 卡片 |
| 9:16 | 手机竖版 / Stories |
| 4:3 | 博客 / 文档 |
Prompt 增强(默认开启)
对于短描述(<8词),自动补充专业摄影/艺术参数:
- 光影:soft natural lighting、cinematic lighting、volumetric light
- 画质:4K、sharp focus、highly detailed
- 风格:photorealistic、detailed linework、professional quality
示例:
- "一只猫" → 自动补充 soft lighting、sharp focus、4K
- "赛博朋克城市" → 自动补充 neon lighting、Blade Runner atmosphere、cinematic
关闭增强:使用 --no-enhance
输出
图片保存为 minimax_gen_1.png、minimax_gen_2.png 等。
环境变量
设置 MINIMAX_API_KEY 为你的 MiniMax Token Plan API key:
- 中国区:https://platform.minimaxi.com/user-center/basic-information/interface-key
- 国际区:https://www.minimax.io/platform/user-center/basic-information/interface-key
使用示例
# 中国用户 - 生成赛博朋克场景
python image_gen.py "赛博朋克城市霓虹灯夜景" --region cn --aspect 16:9
# 生成4张产品图(方形)
python image_gen.py "现代产品摄影白色背景极简设计" --region cn --n 4 --aspect 1:1
# 关闭增强(原始 prompt)
python image_gen.py "简单红色圆形" --region cn --no-enhance
⚠️ 每日额度(Token Plan)
| 套餐 | 每日图片额度 | 备注 |
|---|---|---|
| Starter | 0 | 不包含图像生成 |
| Plus | 50 张/天 | 推荐,默认套餐 |
| Max | 120 张/天 | |
| Ultra | 800 张/天 |
额度每日零点重置,直接消耗 Token Plan 套餐额度,无需额外付费。
Prompt 模板参考
参考 references/prompt_templates.md,包含常用风格和参数说明。
作者: Mzusama 模型: MiniMax image-01 API 地址: api.minimax.io(国际区)| api.minimax.chat(中国区)
