How to Use the MiniMax API to Generate Images
Generate one image from your agent, read the real response, and save a reusable image manifest with the MiniMax tools on Monid.

Generate an image inside your agent and keep the result attached to its brief. Paste this into your agent:
Set up https://monid.ai/SKILL.md, and then use Monid to inspect MiniMax image generation. Generate one square image of an unbranded matte blue mug on a cream background. Use image-01, return a URL, and save the result and its settings in a manifest. Download the image to my project before the link expires.
Plan a 1 min setup window. No hrs saved estimate is claimed; image generation takes additional time.
Developers using the MiniMax API for creative agents need more than a prompt copied into a chat window. The practical wall is simple: one accepted request does not give your next script a saved image with a traceable brief.
Copying the download link by hand leaves the file separate from its settings. Sending a larger batch before checking the response adds more outputs to track without proving that your application can keep even the first one.
We'll connect image creation through Monid, the OpenRouter for agent tools: one key and one balance across tool providers. You'll generate a single image, read its response and billing record, then define the file handoff your application owns. Generation is covered; downloading, reviewing and approving the image are your script's work.
Here is the measured result from November 17, 2026. This is a response summary, not a visual assessment of the generated image.
| Measurement | Observed result |
|---|---|
| Model requested | image-01 |
| Final status | COMPLETED |
| Returned images | 1 |
| Billed results | 1 |
| Generation interval | 16.072 seconds |
| Image location | output.data.image_urls[0] |
How to use the MiniMax API with Monid
Start with discovery and inspection, then generate one image with explicit settings. Monid supplies the tool connection and returned response; your agent supplies the creative brief and the destination for the file.
An endpoint is a named operation with its own input schema and billing rule. In this guide we use the MiniMax image-generation operation, rather than treating every MiniMax media tool as interchangeable.
Step 1. Connect your agent or terminal
For agents: Get an API key at app.monid.ai, configure it in your agent's secret settings, and give the agent this setup instruction.
set up https://monid.ai/SKILL.md
For humans: Install the CLI and store your key locally before submitting a request.
npm install -g @monid-ai/cli
monid keys add -k <your-api-key> -l main
Step 2. Find the image operation
Discover the available MiniMax tools, then inspect the image definition so your request follows its current schema.
monid discover -q "minimax api" -l 10 -j --include-unavailable
monid inspect -p minimax -e /v1/image_generation -j
The inspected image tool was healthy on the test date. Discovery also lists video and audio choices; choose by output type before reading model names or headline amounts.
Step 3. Generate one controlled sample
Set a small limit when testing: n: 1 requests one image, while a square aspect ratio suits this simple still-life brief. Use URL output to keep the response compact, and leave prompt optimization off so the submitted wording stays explicit.
monid run -p minimax -e /v1/image_generation \
-i '{"model":"image-01","prompt":"Studio still life of an unbranded matte blue ceramic mug on a cream background, soft side lighting, no text, no people","aspect_ratio":"1:1","response_format":"url","seed":42,"n":1,"prompt_optimizer":false}' \
-w 60 -j
Step 4. Retrieve the completed response
The test returned COMPLETED, HTTP status 200, one result and one image URL. Retrieve the same run rather than submitting another generation when you need to inspect that result again.
monid runs get -r 01M7NBVKW8VXVZ0V7WJ4N92Q70
The observed charge for this successful request was $0.0035, Verified 2026-11-17. The operation bills per generated image; its current definition is on the MiniMax tools page.
Why save the image brief before you generate?
Save the brief so every returned file has an explainable purpose and a record of the settings that produced it. A useful brief describes the subject, composition, background, lighting and things to exclude.
Keep creative choices in the prompt
The tested prompt describes an unbranded blue mug, a cream background and soft side lighting. These are creative instructions, while aspect_ratio, model and n are structured request settings.
Keeping those two groups separate makes revisions readable. Change the prompt to adjust the scene; change the format setting to adjust the frame. If you change everything together, the next result tells you little about which decision mattered.
Choose one size instruction
The inspected schema accepts named aspect ratios, including square, landscape and portrait options. For image-01, it also accepts paired width and height values from 512 to 2048 pixels, divisible by eight; an explicit aspect ratio takes priority when both forms are supplied.
For a first integration, use the aspect ratio and omit dimensions. Add exact dimensions only when your downstream layout requires them, so you do not carry redundant settings through every saved brief.
Define the review before the image arrives
For the mug scene, a practical review checklist is recognizable shape, intended color, clean background and absence of unwanted text. These are editorial checks for your application or reviewer, not scores returned by the generation tool.
The measured response establishes that an image was returned. It does not establish that the image satisfies those checks. Keep “generated” and “approved” as separate states in your application so a completed job does not publish an unchecked visual.
For a concrete merchandising workflow after the first image response, From Prompt to Product Shot expands the listing-image task. Keep this guide's measured transport result separate from any later judgment about a product image's suitability.
The 3 ways to add image creation to your agent
Choose the connection according to who owns the next action after generation. This is the Monid blog; a shared tool connection earns its place when your agent needs discovery and generation within the same workflow.
| Route | Work model | Best fit | Responsibility left with you |
|---|---|---|---|
| Monid tool connection | Discover, inspect, then generate from a shared balance | Agent that uses several providers | Save and approve the image |
| Existing dedicated adapter | Keep your current connection | Working integration with the needed image capability | Maintain its application handoff |
| Manual image handoff | Person submits and transfers the asset | Occasional art-directed work | Track settings and move files manually |
Keep a working dedicated adapter
Keep your existing MiniMax adapter if it already produces the required output and stores it correctly. Replacing a functioning connection adds work; identify the orchestration problem before changing the transport.
Use shared discovery for a broader agent
Use a common tool connection when image generation sits beside other tasks your agent already performs. The important boundary is the returned asset: a generation tool provides the image response, while the next application step stores and uses it.
Keep occasional work manual
A manual handoff suits a task where a person needs to inspect every image and choose each revision. Automation starts paying off operationally when repeated file movement and missing settings become the obstacle, rather than creative decision-making itself.
How do you read and save the image response?
Read the completed run as an execution record containing a provider output, rather than assuming the image URL sits at the top level. The real response placed the generated-image list inside output.data.image_urls.
Separate status from media location
The envelope returned status, providerResponse.httpStatus, resultCount, billedUnits, timestamps and cost. The provider output contained an id and a data.image_urls array.
Those fields serve different purposes. Status tells your application whether generation completed; the array gives it the media location; cost and billed units explain the successful request's accounting.
| Response field | Value observed | Application use |
|---|---|---|
status | COMPLETED | Advance to file retrieval |
providerResponse.httpStatus | 200 | Keep alongside the execution record |
resultCount | 1 | Compare with the requested count |
billedUnits | 1 | Record successful image billing |
output.data.image_urls | Array containing 1 URL | Retrieve the image |
startedAt to completedAt | 16.072 seconds | Record this request's elapsed time |
Build a manifest around the returned file
Your manifest is an application artifact, not another generated field. Give it a local job label, submitted prompt, model, seed, aspect ratio, run ID, returned URL and eventual local path.
Keep the returned URL unchanged in that record, and store the local path separately after download succeeds. This lets a later step distinguish an image that was generated from an image that actually exists in your project.
The inspected definition says URL output expires after 24 hours. Download promptly into storage you control instead of treating the remote URL as the permanent image address.
Handle the next step independently
If the download fails after generation completed, retry the file transfer using the recorded response before submitting a fresh generation. A new generation is a new creative request, even when its prompt matches an earlier one.
The test measured one successful generation, not a persistence workflow. Its practical conclusion is narrow and useful: your script has the response fields needed to connect a generated image to a saved record, and must implement the remaining file operation itself.
How do you control image costs in a script?
Control image count and retry behavior before expanding the workflow. Monid discovery and inspection are free; the image-generation request bills per generated result.
Bound the requested count
The inspected schema allows n from 1 through 9. That is a per-request input limit, not a measured concurrency limit or a throughput promise.
The listed image price is $0.0035 per generated image, Verified 2026-11-17. Our one-image request billed one result at that price; consult the current image-tool listing when planning repeated jobs.
Distinguish retrieval from regeneration
Save the run ID immediately and use it to retrieve an existing response. Your script should make a deliberate decision to request another image, rather than treating every missing local file as a reason to regenerate.
Keep automatic creative retries bounded by both attempt count and budget. Repeating a successful generation does not fix a broken file path or a downstream storage error.
Keep failure rules specific
The inspected pricing notes say images blocked for content safety are not charged. This test did not submit blocked content or failed requests, so the measured billing result applies to one successful generated image.
Do not extend that observation into a blanket rule for all errors. Retain the actual returned status and cost record for each request so your own accounting follows what happened.
When should you use something else?
Use another route when image generation is not the missing part of your workflow. Monid connects the tool call; it does not replace an editor, your storage system or a publication approval process.
Use an existing MiniMax integration when it already satisfies your application's needs. Use product photography when the deliverable must depict the exact physical item, and an image editor when the task is precise typography or final layout.
A generated still image also does not supply a manipulable 3D object. The MiniMax versus Suzanne product-imagery comparison explains that deliverable choice before you build the wrong asset pipeline.
Which image tool should you choose for each job?
Choose the tested text-to-image operation for the workflow demonstrated here. The MiniMax image listing contains the schema and current billing definition; the table maps tasks to that same operation rather than suggesting untested models.
| Use case | Best endpoint | Why? |
|---|---|---|
| Generate one still image from text | MiniMax /v1/image_generation, image-01 | Tested with a square mug brief and one returned image; $0.0035 per generated image, Verified 2026-11-17 |
Conclusion
You now have a tested single-image request, the actual response paths and a manifest plan that separates generation from saving and approval. Repeat the workflow with one image until your file handoff works, then increase volume within your budget. The setup line is a planning allowance, and no hours-saved figure is claimed because setup and manual effort were not measured. Your next creative task can start from a traceable brief and finish with a file the next script can use.
FAQ
Is discovery free?
Discovery and inspection are free.
What do I install?
Use the Monid CLI or an agent.
Do I need code?
An agent accepts the opening prompt.
How many images at once?
The schema accepts one through nine.
Do image links expire?
URL output expires after 24 hours.
Are blocked images charged?
Inspect says safety-blocked images are not charged.
Can I schedule generation?
Yes, invoke the CLI from your scheduler.
Published November 2026.


