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.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "minimax-image-generator" with this command: npx skills add lanhaixuan/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

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

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Multi Edge-TTS CN

Edge-TTS 在线语音合成 skill。基于微软 Edge TTS 引擎,生成速度快(1-2秒),支持多种音色和输出格式。同时支持飞书(OGG/Opus)和企业微信(AMR)。默认音色 xiaoxiao_lively。需联网。

Registry SourceRecently Updated
General

vedic-destiny

吠陀命盘分析中文入口。用于完整命盘研判、命主盘 Rashi chart 与九分盘 Navamsha chart 联读、既往事件回看、出生时间稳定度判断、事业主题、婚姻主题、时空盘专题,以及基于 Jagannatha Hora PDF、星盘截图或文本命盘数据的系统拆盘。当用户提到完整星盘、事业方向、婚姻问题、关系窗...

Registry SourceRecently Updated
General

One Person Company OS

Build a visual operating cockpit for an AI-native one-person company across promise, buyer, product, delivery, cash, learning, and assets. / 为 AI 一人公司建立可视化经营...

Registry SourceRecently Updated
General

健康追踪

健康追踪技能 - 追踪饮水、睡眠、步数等健康数据,JSON存储。

Registry SourceRecently Updated