Skip to content

Add MiniMax image generation support to the image-generation skill - #94

Open
octo-patch wants to merge 2 commits into
xianyu110:mainfrom
octo-patch:octo/20260730-text-to-image-tool-recvqdvAHO3BX7
Open

Add MiniMax image generation support to the image-generation skill#94
octo-patch wants to merge 2 commits into
xianyu110:mainfrom
octo-patch:octo/20260730-text-to-image-tool-recvqdvAHO3BX7

Conversation

@octo-patch

Copy link
Copy Markdown

Reason: Add MiniMax's official image-generation request schema, endpoint selection, and output parsing to the bundled image-generation skill.

What changed

  • Add a minimax API format to .claude/.skills/bananapro-image-gen/scripts/generate_image.py, selectable via --api-format minimax, alongside the existing formats.
  • Endpoint selection by region for POST /v1/image_generation:
    • global_enhttps://api.minimax.io
    • cn_zhhttps://api.minimaxi.com
  • Build the official request body (model, prompt, response_format, n, plus optional aspect_ratio, width, height, seed, prompt_optimizer), defaulting the model to image-01.
  • Parse the official response: validate base_resp.status_code, read the image from data.image_urls (or data.image_base64 when response_format=base64), and report metadata.success_count / metadata.failed_count.
  • New CLI flags: --region, --response-format, --aspect-ratio, --width, --height, --seed, --n, and --prompt-optimizer / --no-prompt-optimizer.
  • Add tests/test_minimax_image.py covering endpoint and region selection, request-body construction, URL and base64 output parsing, and error-status handling.

Checks

  • python3 -m py_compile scripts/generate_image.py
  • python3 tests/test_minimax_image.py

Implement MiniMax's official image_generation request schema, regional
endpoint selection (global_en and cn_zh), and response parsing for the
bundled image-generation skill, with offline unit tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant