Loading...
Loading...
Generate images using Minimax image-01, triggered when the user says "Generate images with Minimax".
npx skill4agent add nmvr2600/minimax-token-plan-skills minimax-image${CLAUDE_SKILL_DIR}| Task | Command |
|---|---|
| Generate a single image | |
| Specify aspect ratio | |
| Batch generation | |
| Specify output directory | |
| Custom filename prefix | |
| Image-to-image (subject consistency) | |
export MINIMAX_API_KEY="your_api_key_here"# API host address (default for domestic sites is https://api.minimaxi.com)
export MINIMAX_API_HOST="https://api.minimaxi.com"# Basic usage - generate 1:1 square image
bun run ${CLAUDE_SKILL_DIR}/scripts/generate.ts "a cute fluffy cat sitting on a windowsill"
# Specify aspect ratio (16:9 widescreen suitable for desktop wallpapers)
bun run ${CLAUDE_SKILL_DIR}/scripts/generate.ts "girl in a library" --aspect-ratio 16:9
# Vertical ratio (9:16 suitable for mobile wallpapers)
bun run ${CLAUDE_SKILL_DIR}/scripts/generate.ts "futuristic city skyline" --aspect-ratio 9:16
# Batch generate 4 images, specify output directory
bun run ${CLAUDE_SKILL_DIR}/scripts/generate.ts "dreamy forest" -n 4 --output-dir ./outputs
# Custom filename prefix
bun run ${CLAUDE_SKILL_DIR}/scripts/generate.ts "abstract art" --prefix abstract_1# Use reference image URL to generate new images with consistent character
bun run ${CLAUDE_SKILL_DIR}/scripts/generate.ts \
"girl reading by the window, sunlight" \
--reference-image "https://example.com/reference_face.jpg"| Parameter | Type | Default Value | Description |
|---|---|---|---|
| string | Required | Image description text, maximum 1500 characters, English descriptions yield better results |
| string | | Model name |
| string | | Aspect ratio, see supported list below |
| string | | Return format: |
| int | | Number of images to generate, 1-9 |
| string | | Image save directory |
| string | | Output filename prefix |
| object | None | Subject reference for image-to-image (see below) |
| Parameter | Abbreviation | Description |
|---|---|---|
| | Aspect ratio |
| | Output directory |
| | Return format: base64 / url |
| | Number of images to generate (1-9) |
| | Filename prefix |
| | Reference image URL (image-to-image) |
| | Display help information |
| Ratio | Resolution | Application Scenario |
|---|---|---|
| 1024x1024 | Square, social media avatars |
| 1280x720 | Widescreen, desktop wallpapers, video covers |
| 720x1280 | Vertical screen, mobile wallpapers, short video covers |
| 1152x864 | Standard screen, PPT illustrations |
| 864x1152 | Vertical standard, posters |
| 1248x832 | Photography ratio, landscape photo style |
| 832x1248 | Vertical photography, portrait photo style |
| 1344x576 | Ultra-widescreen, cinematic scenes (image-01 only) |
| Field | Type | Description |
|---|---|---|
| string | Subject type, currently only supports |
| string | Reference image, supports public URL or |
bun run ${CLAUDE_SKILL_DIR}/scripts/generate.ts "一个可爱的猫咪坐在窗台上"bun run ${CLAUDE_SKILL_DIR}/scripts/generate.ts "a cute fluffy cat sitting on a windowsill, sunlight, warm colors"# Side profile, blurry, or group photos make it difficult for the model to extract features
bun run ${CLAUDE_SKILL_DIR}/scripts/generate.ts "girl reading" -i "https://example.com/group_photo.jpg"bun run ${CLAUDE_SKILL_DIR}/scripts/generate.ts "girl reading" -i "https://example.com/clear_frontal_face.jpg"bun run ${CLAUDE_SKILL_DIR}/scripts/generate.ts "a cute cat" -n 4bun run ${CLAUDE_SKILL_DIR}/scripts/generate.ts "a cute cat" -n 4 --output-dir ./images --prefix cat| Error Message | Cause | Solution |
|---|---|---|
| Environment variable not set | |
| Invalid API Key | Check if the Key is correct |
| Too many requests | Reduce request frequency, or check quota |
| API returned error | Check error message, common causes: prompt too long, invalid parameters |
| n parameter out of range | Use a value between 1-9 |
bun run ${CLAUDE_SKILL_DIR}/scripts/generate.ts -- --helpminimax-usage--output-dir--prefix