Minimax Image Generator

v1.1.0

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...

0· 140·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for lanhaixuan/minimax-image-generator.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Minimax Image Generator" (lanhaixuan/minimax-image-generator) from ClawHub.
Skill page: https://clawhub.ai/lanhaixuan/minimax-image-generator
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Required env vars: MINIMAX_API_KEY
Required binaries: python3
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install minimax-image-generator

ClawHub CLI

Package manager switcher

npx clawhub@latest install minimax-image-generator
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description claim text-to-image and image-to-image via MiniMax. Declared binary (python3) and env var (MINIMAX_API_KEY) are appropriate. The script posts to api.minimaxi.com and implements the described models and options — requirements and functionality are proportionate to the stated purpose.
Instruction Scope
SKILL.md and the included Python script only: read MINIMAX_API_KEY (env or ~/.openclaw/openclaw.json), build a JSON payload, call the MiniMax API, parse results, optionally download/save image URLs. Instructions do not attempt to read unrelated secrets or system files beyond the single OpenClaw config file used to store the apiKey.
Install Mechanism
No install spec; SKILL.md recommends pip install requests which is standard and minimal. There are no downloads from arbitrary URLs, no extracted archives, and no creation of nonstandard system binaries.
Credentials
Only requires a single API key (MINIMAX_API_KEY) which is the expected credential. The script will also read ~/.openclaw/openclaw.json as an alternate key source (matches SKILL.md). No other tokens, passwords, or unrelated environment variables are requested.
Persistence & Privilege
Skill is not forced always-on and does not modify other skills or system-wide settings. It writes images to a per-skill workspace directory (~/.openclaw/workspace/tmp), which is reasonable for saving outputs.
Assessment
This skill appears coherent and implements what it advertises, but review these practical points before installing: (1) The tool will use your MINIMAX_API_KEY — only provide a key you trust to be used with MiniMax and be aware of billing/quotas. (2) The script will read ~/.openclaw/openclaw.json as an alternate key source; verify that file before use. (3) If you supply image URLs, the script will download them to ~/.openclaw/workspace/tmp — avoid pointing it at URLs you don't trust. (4) The README suggests installing the requests package from PyPI; as with any third-party package, install from the official registry and review versions if you have supply-chain concerns. (5) If you are unsure about trusting the skill source, open and review scripts/minimax_image_gen.py (already included) before running; revoke the API key if you later suspect misuse.

Like a lobster shell, security has layers — review code before you run it.

Runtime requirements

🎨 Clawdis
Binspython3
EnvMINIMAX_API_KEY
Primary envMINIMAX_API_KEY
latestvk970j078qctezm927h8zm9rt1983m1q8
140downloads
0stars
2versions
Updated 1mo ago
v1.1.0
MIT-0

MiniMax Image Generation (Text-to-Image & Image-to-Image)

⚠️ Requires a Coding Plan API Key Subscribe at: 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

openclaw config set skills.entries.minimax-image-generator.apiKey "sk-your-key"

Or add to openclaw.json skills entries:

{
  "skills": {
    "entries": {
      "minimax-image-generator": {
        "apiKey": "sk-your-key"
      }
    }
  }
}

2. Dependencies

pip install requests

Architecture

~/.openclaw/workspace/skills/minimax-image-generator/
├── SKILL.md
├── _meta.json
└── scripts/
    └── minimax_image_gen.py

Usage

From terminal

# 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

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:

{
  "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

CodeMeaning
0Success
1002Rate limit
1004Auth failed - check API Key
1008Insufficient balance
1026Content violation
2013Parameter error
2049Invalid API Key

Comments

Loading comments...