返回顶部
m

minimax-image-generator

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.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.1.0
安全检测
已通过
97
下载量
0
收藏
概述
安装方式
版本历史

minimax-image-generator

# MiniMax Image Generation (Text-to-Image & Image-to-Image) > ⚠️ Requires a **Coding Plan API Key** > Subscribe at: [https://platform.minimaxi.com/subscribe/coding-plan](https://platform.minimaxi.com/subscribe/coding-plan) Text-to-image (t2i) and image-to-image (i2i) generation tool using MiniMax's image generation API. --- ## Setup ### 1. Configure API Key ```bash openclaw config set skills.entries.minimax-image-generator.apiKey "sk-your-key" ``` Or add to `openclaw.json` skills entries: ```json { "skills": { "entries": { "minimax-image-generator": { "apiKey": "sk-your-key" } } } } ``` ### 2. Dependencies ```bash pip install requests ``` --- ## Architecture ``` ~/.openclaw/workspace/skills/minimax-image-generator/ ├── SKILL.md ├── _meta.json └── scripts/ └── minimax_image_gen.py ``` --- ## Usage ### From terminal ```bash # Text-to-image (t2i) - basic MINIMAX_API_KEY="sk-your-key" python3 scripts/minimax_image_gen.py "a beautiful sunset over ocean" # Text-to-image with options MINIMAX_API_KEY="sk-your-key" python3 scripts/minimax_image_gen.py "a cat" --model image-01 --aspect-ratio 16:9 --n 2 # Image-to-image (i2i) - reference image by URL MINIMAX_API_KEY="sk-your-key" python3 scripts/minimax_image_gen.py "transform to anime style" --image-url "https://example.com/photo.jpg" # Image-to-image with base64 MINIMAX_API_KEY="sk-your-key" python3 scripts/minimax_image_gen.py "make it brighter" --image-base64 "data:image/jpeg;base64,..." # Save to file MINIMAX_API_KEY="sk-your-key" python3 scripts/minimax_image_gen.py "a cat" --save cat.png ``` ### From code ```python from minimax_image_gen import generate_image # Text-to-image result = generate_image( prompt="a beautiful sunset over ocean", model="image-01", aspect_ratio="16:9", n=1 ) # Image-to-image (URL) result = generate_image( prompt="transform to anime style", image_url="https://example.com/photo.jpg" ) # Image-to-image (base64) result = generate_image( prompt="make it brighter", image_base64="data:image/jpeg;base64,..." ) ``` --- ## Tool Definition **Name:** `minimax_image_gen` **Input Schema:** ```json { "type": "object", "properties": { "prompt": { "type": "string", "description": "Image description text, max 1500 chars." }, "model": { "type": "string", "enum": ["image-01", "image-01-live"], "default": "image-01", "description": "Model name." }, "image_url": { "type": "string", "description": "Reference image URL for image-to-image (i2i). Supports public URLs." }, "image_base64": { "type": "string", "description": "Reference image as base64 Data URL for i2i. Format: 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": "Image aspect ratio." }, "style_type": { "type": "string", "enum": ["漫画", "元气", "中世纪", "水彩"], "description": "Style (only for image-01-live)." }, "n": { "type": "integer", "minimum": 1, "maximum": 9, "default": 1, "description": "Number of images to generate." }, "response_format": { "type": "string", "enum": ["url", "base64"], "default": "url", "description": "Return format." }, "prompt_optimizer": { "type": "boolean", "default": false, "description": "Enable prompt auto-optimization." } }, "required": ["prompt"] } ``` **Output:** JSON with image URLs or base64 data --- ## Error Codes | Code | Meaning | |------|---------| | 0 | Success | | 1002 | Rate limit | | 1004 | Auth failed - check API Key | | 1008 | Insufficient balance | | 1026 | Content violation | | 2013 | Parameter error | | 2049 | Invalid API Key |

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 minimax-image-generator-1776088750 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 minimax-image-generator-1776088750 技能

通过命令行安装

skillhub install minimax-image-generator-1776088750

下载 Zip 包

⬇ 下载 minimax-image-generator v1.1.0

文件大小: 6.15 KB | 发布时间: 2026-4-14 09:42

v1.1.0 最新 2026-4-14 09:42
- Adds image-to-image (i2i) generation: transform images by URL or base64.
- Skill name updated to minimax-image-generator.
- Input schema now supports image_url and image_base64 for reference images.
- Documentation and usage instructions updated for both text-to-image and image-to-image methods.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部