← Back to Skills Marketplace
lixiang92229

MiniMax Image Generation

by lixiang92229 · GitHub ↗ · v1.1.1 · MIT-0
cross-platform ✓ Security Clean
503
Downloads
0
Stars
1
Active Installs
3
Versions
Install in OpenClaw
/install lx-minimax-image-generation
Description
MiniMax文生图(T2I)和图生图(I2I)工具 / MiniMax image generation tool supporting T2I and I2I. Generate 1-9 images per request with customizable aspect ratios.
README (SKILL.md)

Minimax Image Generation Skill

概述 | Overview

通过 MiniMax API 实现**文生图(T2I)图生图(I2I)**功能。

Supports Text-to-Image and Image-to-Image generation via MiniMax API.


环境变量 | Environment Variables

变量名 必填 说明
MINIMAX_API_KEY MiniMax API密钥 / MiniMax API Key

⚠️ 重要: 本skill需要 MINIMAX_API_KEY 环境变量才能运行。请从 MiniMax开放平台 获取API Key。


功能 | Features

1. 文生图 Text-to-Image

根据文字描述生成图片 / Generate images from text prompts:

from scripts.image_gen import generate_image

result = generate_image(
    prompt="北京故宫角楼,晴空万里,摄影作品",
    model="image-01",
    aspect_ratio="16:9",
    n=2
)

2. 图生图 Image-to-Image

基于参考图片生成新图,保持人物主体特征 / Create variations using a reference image:

result = generate_image(
    prompt="穿着中国传统服装,站在长城上",
    model="image-01",
    aspect_ratio="3:4",
    subject_reference=[
        {
            "type": "character",
            "image_file": "https://example.com/photo.jpg"  # 或 base64 Data URL
        }
    ],
    n=1
)

3. 画风生成 Style Models (需要订阅 / Requires subscription)

使用 image-01-live 模型指定画风 / Specify artistic styles:

风格 Style 说明
漫画 Comic/ Manga
元气 Energetic/ Youthful
中世纪 Medieval
水彩 Watercolor
result = generate_image(
    prompt="一位中国科学家在实验室",
    model="image-01-live",
    style_type="水彩",
    style_weight=0.8
)

命令行使用 | CLI Usage

# 1. 设置环境变量 / Set environment variable
export MINIMAX_API_KEY="your-api-key-here"

# 2. 文生图 / Text-to-Image
python3 scripts/image_gen.py -p "一只可爱的橘猫在阳光下打盹" -r "16:9" -n 2

# 3. 图生图 / Image-to-Image
python3 scripts/image_gen.py -p "穿着西装" -r "3:4" --reference "https://example.com/photo.jpg"

# 4. 指定画风 / With style
python3 scripts/image_gen.py -p "海边日落" -s "水彩" -r "16:9"

参数说明 | Parameters

参数 默认值 说明
--prompt, -p 必填 图片描述,最长1500字符 / Image description, max 1500 chars
--model, -m image-01 模型 / Model: image-01image-01-live
--ratio, -r 1:1 宽高比 / Aspect ratio: 1:1, 16:9, 4:3, 3:2, 2:3, 3:4, 9:16, 21:9
--n 1 生成数量1-9 / Number of images [1-9]
--style, -s - 画风类型(仅image-01-live)/ Style type for image-01-live
--reference, -ref - 参考图URL或base64(用于图生图)/ Reference image URL or base64
--output, -o - 输出路径 / Output file path(默认: /home/ubuntu/.openclaw/workspace/images)
--base64 false 返回base64格式 / Return base64 instead of downloading

输出 | Output

默认输出目录: /home/ubuntu/.openclaw/workspace/images/

可通过 --output 参数自定义路径 / Can be customized via --output parameter.

返回 / Returns:

  • image_urls: 图片URL列表 / List of image URLs
  • _local_paths: 本地保存路径 / Local saved file paths

⚠️ 安全风险提示 | Security Warnings

1. API密钥安全 / API Key Security

  • 🔐 必须设置 MINIMAX_API_KEY 环境变量
  • 🔐 请勿将API Key提交到版本控制系统
  • 🔐 建议使用限额的API Key,定期轮换

2. 参考图隐私风险 / Reference Image Privacy Risk

  • ⚠️ 图生图功能会将参考图片上传到MiniMax API
  • ⚠️ 请勿使用敏感或私人图片作为参考图
  • ⚠️ 除非您信任MiniMax的服务及其隐私政策

3. 网络访问 / Network Access

  • 🌐 本skill会访问 https://api.minimaxi.com
  • 🌐 生成的图片URL有效期为24小时
  • 🌐 请确认您的网络环境允许访问上述地址

4. 文件写入 / File Write

  • 📁 默认保存到 /home/ubuntu/.openclaw/workspace/images/
  • 📁 可通过 --output 参数修改保存路径
  • 📁 请确保目标目录有写入权限

5. 本地调用日志 / Local Call Log

  • 📝 每次成功调用后,会自动在 /home/ubuntu/.openclaw/workspace/minimax-image-generation-log.md 追加一条日志
  • 📝 记录内容:时间戳、调用类型(T2I/I2I)、prompt摘要(最多80字)、图片数量、宽高比、本地保存路径
  • 📝 如文件不存在,会自动创建(包含表头)
  • ⚠️ 注意:如 workspace 同步到 GitHub 或分享给他人,使用记录也会一并暴露,请知悉

注意事项 | Notes

  • ⚠️ image-01-live 需要会员订阅 / Requires premium subscription
  • ⚠️ 图片URL有效期24小时 / Image URLs expire in 24 hours
  • 图片建议小于10MB / Image should be under 10MB
  • 参考图建议单人正面照片 / Reference: single person, frontal photo works best

详细API文档 | Full API Reference

Usage Guidance
This skill is coherent for calling the MiniMax image API, but check these things before installing: - Set and protect MINIMAX_API_KEY (the skill requires it; rotate and scope the key if possible). Note the registry summary you saw incorrectly omitted this requirement—trust the SKILL.md/_meta.json. - Avoid using sensitive/private photos for Image-to-Image: reference images are uploaded to api.minimaxi.com as part of I2I requests. - Be aware the script auto-downloads images and appends a usage entry (timestamp, truncated prompt, count, aspect ratio, local paths) to /home/ubuntu/.openclaw/workspace/minimax-image-generation-log.md. If your workspace is synced (e.g., to GitHub) or shared, these logs and saved images may be exposed—change --output or the LOG_FILE path or disable logging if needed. - If you need stronger isolation, run the skill in an environment where the workspace is not synced and network egress is restricted to the expected domain (api.minimaxi.com). - If you want to remove persistent traces, edit scripts/image_gen.py to disable the logging function or change the output paths. If you want additional assurance, review and test the bundled scripts in a sandboxed environment and confirm network requests go only to api.minimaxi.com and image URLs returned by that API.
Capability Analysis
Type: OpenClaw Skill Name: lx-minimax-image-generation Version: 1.1.1 The skill bundle provides a legitimate tool for image generation via the MiniMax API (T2I and I2I). The core logic in `scripts/image_gen.py` uses standard Python libraries to interact with the official MiniMax API and download generated images to a designated workspace. The documentation in `SKILL.md` and `README.md` includes transparent security warnings regarding API key management and privacy risks. No indicators of malicious intent, such as data exfiltration, unauthorized command execution, or prompt injection attacks, were found.
Capability Assessment
Purpose & Capability
The skill's stated purpose (T2I and I2I image generation) matches the included code and SKILL.md: it calls https://api.minimaxi.com, requires a MINIMAX_API_KEY, uploads reference images for I2I, downloads results, and supports the listed models/parameters. Note: the top-level registry summary in the prompt declared 'Required env vars: none' and 'Primary credential: none', but the bundled SKILL.md and _meta.json clearly require MINIMAX_API_KEY. This metadata inconsistency should be corrected but does not indicate malicious intent.
Instruction Scope
Instructions and the script stay within the expected scope: they build a JSON payload, POST to the MiniMax API, download returned image URLs, save files to the workspace, and append an entry to a local log. The SKILL.md explicitly warns that reference images are uploaded to the API and that the local log contains truncated prompts—these behaviors are visible in the code and documented. There are no instructions to read unrelated system files or exfiltrate data to unexpected endpoints.
Install Mechanism
There is no install spec; this is an instruction-only skill with a bundled Python script. No external installers or downloads are performed by the skill itself during install; the script uses only Python stdlib (urllib, json, os). No high-risk remote install URLs or archive extraction are present.
Credentials
The only sensitive runtime dependency is MINIMAX_API_KEY (declared in SKILL.md and _meta.json). That is proportionate for a third‑party image-generation API client. Reminder: the top-level registry metadata in the provided summary incorrectly listed no required env vars—this mismatch should be resolved. The script does not request unrelated credentials.
Persistence & Privilege
The skill does not request elevated platform privileges and always:false. It writes generated images and a local markdown log to /home/ubuntu/.openclaw/workspace/ by default; this is expected but constitutes persistence of prompts and paths in the workspace. If that workspace is synced or shared, usage history and truncated prompts may be exposed. The autonomous invocation default (disable-model-invocation=false) is normal and not by itself a concern.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install lx-minimax-image-generation
  3. After installation, invoke the skill by name or use /lx-minimax-image-generation
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.1.1
Document local call log behavior (timestamp, prompt summary, paths) in SKILL.md and README.md
v1.1.0
Add auto logging to minimax-image-generation-log.md
v1.0.0
Initial release with env var security, _meta.json, and comprehensive docs
Metadata
Slug lx-minimax-image-generation
Version 1.1.1
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 3
Frequently Asked Questions

What is MiniMax Image Generation?

MiniMax文生图(T2I)和图生图(I2I)工具 / MiniMax image generation tool supporting T2I and I2I. Generate 1-9 images per request with customizable aspect ratios. It is an AI Agent Skill for Claude Code / OpenClaw, with 503 downloads so far.

How do I install MiniMax Image Generation?

Run "/install lx-minimax-image-generation" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is MiniMax Image Generation free?

Yes, MiniMax Image Generation is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does MiniMax Image Generation support?

MiniMax Image Generation is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created MiniMax Image Generation?

It is built and maintained by lixiang92229 (@lixiang92229); the current version is v1.1.1.

💬 Comments