← 返回
未分类 Key 中文

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...
使用 MiniMax API 进行文本到图像和图像到图像生成,根据文本提示 (t2i) 或参考图像 (i2i) 生成或转换图像。
lanhaixuan
未分类 clawhub v1.1.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 367
下载
💾 12
安装
1
版本
#latest

概述

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

版本历史

共 1 个版本

  • v1.1.0 当前
    2026-03-31 17:50 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

security-compliance

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,219 📥 266,846
ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,363 📥 319,033
developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 672 📥 324,514