generate_image
Create images from a text description using the MiniMax image-01 model. Generated images are returned inline in the MCP response (base64-encoded JPEG) and saved to disk for reuse.
Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
prompt | string | ✓ | — | Text description of the image to generate (max 1,500 chars) |
model | string | — | image-01 | Image generation model |
aspect_ratio | string | — | 1:1 | Output aspect ratio: 1:1, 16:9, 4:3, 3:2, 2:3, 3:4, 9:16, 21:9 |
n | integer | — | 1 | Number of images to generate per request [1, 9] |
prompt_optimizer | boolean | — | true | Auto-optimize the prompt for better results |
Usage Examples
Section titled “Usage Examples”Single image:
“Generate an image of a serene mountain lake at sunrise, photorealistic style.”
Batch with aspect ratio:
“Create 4 variations of a logo for a coffee shop called ‘Morning Brew’, minimalist style, 16:9 aspect ratio.”
Widescreen scene:
“Generate a portrait of a futuristic city skyline at night, cyberpunk aesthetic, 21:9 widescreen.”
Image for video pipeline (see generate_video):
“Generate a photorealistic image of a golden retriever on a beach at sunset — I’ll use it as the first frame of a video.”
Response
Section titled “Response”Returns one or more image content parts (base64-encoded JPEG), plus a text part with the saved file paths.
- All images are returned as JPEG with MIME type
image/jpeg. - When
n > 1, each image is saved as a separate file in the same temporary directory. - Generated files can be passed as
first_frame_imagetogenerate_videoto create a video from the image.