Text-to-image and image-to-image generation using MiniMax API. Generates images from text prompts (t2i) or transforms reference images (i2i) using MiniMax's image-01 or image-01-live models.
⚠️ 需要 编程计划 API 密钥
订阅地址:https://platform.minimaxi.com/subscribe/coding-plan
使用 MiniMax 图像生成 API 的文生图(t2i)和图生图(i2i)工具。
bash
openclaw config set skills.entries.minimax-image-generator.apiKey sk-your-key
或添加到 openclaw.json 的技能条目中:
json
{
skills: {
entries: {
minimax-image-generator: {
apiKey: sk-your-key
}
}
}
}
bash
pip install requests
~/.openclaw/workspace/skills/minimax-image-generator/
├── SKILL.md
├── _meta.json
└── scripts/
└── minimaximagegen.py
bash
python
from minimaximagegen import generate_image
名称: minimaximagegen
输入模式:
json
{
type: object,
properties: {
prompt: {
type: string,
description: 图像描述文本,最多 1500 个字符。
},
model: {
type: string,
enum: [image-01, image-01-live],
default: image-01,
description: 模型名称。
},
image_url: {
type: string,
description: 图生图(i2i)的参考图片 URL。支持公开 URL。
},
image_base64: {
type: string,
description: 图生图(i2i)的 base64 Data URL 格式参考图片。格式:data:image/jpeg;base64,...
},
aspect_ratio: {
type: string,
enum: [1:1, 16:9, 4:3, 3:2, 2:3, 3:4, 9:16, 21:9],
default: 1:1,
description: 图像宽高比。
},
style_type: {
type: string,
enum: [漫画, 元气, 中世纪, 水彩],
description: 风格(仅适用于 image-01-live)。
},
n: {
type: integer,
minimum: 1,
maximum: 9,
default: 1,
description: 生成图像数量。
},
response_format: {
type: string,
enum: [url, base64],
default: url,
description: 返回格式。
},
prompt_optimizer: {
type: boolean,
default: false,
description: 启用提示词自动优化。
}
},
required: [prompt]
}
输出: 包含图像 URL 或 base64 数据的 JSON
| 代码 | 含义 |
|---|---|
| 0 | 成功 |
| 1002 |
该技能支持在以下平台通过对话安装:
帮我安装 SkillHub 和 minimax-image-generator-1776004262 技能
设置 SkillHub 为我的优先技能安装源,然后帮我安装 minimax-image-generator-1776004262 技能
skillhub install minimax-image-generator-1776004262
文件大小: 6.15 KB | 发布时间: 2026-4-13 11:03