curl --request POST \ --url https://api.minimax.io/v1/images/edits \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "model": "MiniMax-H3-Image", "prompt": "Replace the cat in image 1 with the Shiba Inu in image 2, keep the background unchanged", "images": [ {"image_url": "https://example.com/cat.jpg"}, {"image_url": "https://example.com/dog.png"} ], "size": "auto", "response_format": "url"}'
{ "created": 1792308678, "data": [ { "url": "https://example.com/h3-image/output-0.jpg", "size": "5440x3072", "revised_prompt": "Replace the orange cat lying on the windowsill in image 1 with the Shiba Inu from image 2, keeping the dog's coat color and facial features, lying down, with the windowsill, lighting and background unchanged" } ], "output_format": "jpeg", "usage": { "generated_images": 1, "total_tokens": 40225, "input_tokens": 23905, "output_tokens": 16320, "input_tokens_details": { "text_tokens": 12093, "image_tokens": 11812 }, "output_tokens_details": { "image_tokens": 16320 } }, "request_id": "021792308678142a2c883cf675b9804d"}
MiniMax-H3-Image
Image Edit
Generate new images from 1 to 16 reference images and a text description with MiniMax-H3-Image.
POST
/
v1
/
images
/
edits
curl --request POST \ --url https://api.minimax.io/v1/images/edits \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "model": "MiniMax-H3-Image", "prompt": "Replace the cat in image 1 with the Shiba Inu in image 2, keep the background unchanged", "images": [ {"image_url": "https://example.com/cat.jpg"}, {"image_url": "https://example.com/dog.png"} ], "size": "auto", "response_format": "url"}'
{ "created": 1792308678, "data": [ { "url": "https://example.com/h3-image/output-0.jpg", "size": "5440x3072", "revised_prompt": "Replace the orange cat lying on the windowsill in image 1 with the Shiba Inu from image 2, keeping the dog's coat color and facial features, lying down, with the windowsill, lighting and background unchanged" } ], "output_format": "jpeg", "usage": { "generated_images": 1, "total_tokens": 40225, "input_tokens": 23905, "output_tokens": 16320, "input_tokens_details": { "text_tokens": 12093, "image_tokens": 11812 }, "output_tokens_details": { "image_tokens": 16320 } }, "request_id": "021792308678142a2c883cf675b9804d"}
Supported models: MiniMax-H3-Image, MiniMax-H3-Image-Highspeed; both take the same parameters and limits. Image edits always apply prompt enhancement; see data[].revised_prompt for the enhanced prompt.
The server waits up to 600 seconds; set the client timeout to at least 600 seconds. This endpoint is not idempotent: once a request is sent, the server finishes generation and charges for successful images even if the client times out or disconnects, and a retry generates and charges again. With the OpenAI SDK, set max_retries=0 to turn off its default automatic retries.
Text description of the edit, up to 32000 characters (counted as Unicode characters, excluding leading and trailing whitespace); an empty or whitespace-only prompt returns 400.
Reference image limits (total request body ≤ 64 MiB; Base64-encoded data is about 4/3 of the original file size; if the request body would exceed the limit, use public URLs or mm_file://)
Output image size, default auto; see Output Size. Use one of two forms:
WIDTHxHEIGHT: set the width and height directly, e.g. 2720x1536; both are positive integers. The area (width × height) must be between 655,360 and 20,000,000 pixels and the aspect ratio between 1:3 and 3:1, bounds inclusive; otherwise 400 is returned, and the size is never scaled or rounded. In this form, do not set aspect_ratio or area (not even to auto); otherwise 400 is returned
auto or omitted: width and height are determined by aspect_ratio (default auto) and area (default 4K); either can be set on its own
Output area level, default 4K. Can only be set when size is omitted or auto; setting it while size is WIDTHxHEIGHT returns 400.
1K, 2K and 4K target areas of 1024 × 1024, 2048 × 2048 and 4096 × 4096 pixels. The server calculates width and height from the aspect ratio; for example, 2K with 16:9 outputs 2720 × 1536. See data[].size for each image's actual width and height.
Output image format, default jpeg. Available values: png, jpeg, jpg, webp. jpg is equivalent to jpeg; output_format in the response is returned as jpeg.
url: image URL. Download the image and store it yourself; the URL is not guaranteed to remain available
b64_json: Base64-encoded image data, not supported with streaming
Total output area (n × width × height) limits for b64_json; exceeding returns 400 (with size = auto, each image counts as its area level, e.g. 4096 × 4096 for 4K):
Whether to stream results, default false. When enabled, the response is text/event-stream (SSE), and only response_format = url is supported:
One event is pushed as each image finishes: image_edit.partial_succeeded on success, image_edit.partial_failed on failure. Events are pushed in completion order; use image_index to match images
image_edit.completed is pushed after all images finish, with usage and request_id
After the response headers are sent, an error event is pushed if all images fail or the request fails before generation is submitted
Errors before the response headers are sent (invalid parameters, authentication, rate limiting, insufficient balance, etc.) are returned as regular HTTP errors, the same as non-streaming calls; check the HTTP status code before parsing SSE
Compression quality, range [0, 100], default 95; higher values give better quality and larger files. Only applies to jpeg / webp and is ignored for png; values outside the range return 400.
Required range: 0 <= x <= 100
Response
Returns application/json when stream is false (default). When stream is true, returns text/event-stream (SSE); the data of each event is JSON, defined under the text/event-stream response. See Streaming Events for event details and a full example.
Images, always n items in image order (matching image_index in streaming events). Successful items contain url (or b64_json), size and revised_prompt; failed items, including those withheld by the content safety check, contain only error.
If at least one image succeeds, the HTTP status is 200, so check data[].error for every item; if all images fail, a 402, 422 or 500 error response is returned. Only successful images are charged.
Request ID (the trace ID). Provide it when reporting an issue.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"MiniMax API Docs","colors":{"primary":"#181E25","dark":"#181E25"},"logo":{"light":"https://mintcdn.com/minimax-cac98058/XYzsL2L2ynonu2Q_/logo/light.svg?fit=max\u0026auto=format\u0026n=XYzsL2L2ynonu2Q_\u0026q=85\u0026s=9c99bb2678d62388d8a4e7cce1750858","dark":"https://mintcdn.com/minimax-cac98058/XYzsL2L2ynonu2Q_/logo/dark.svg?fit=max\u0026auto=format\u0026n=XYzsL2L2ynonu2Q_\u0026q=85\u0026s=e62ef6e36d7512de91c8c48322614594","href":"https://minimax.io"},"favicon":"https://mintcdn.com/minimax-cac98058/3KE0RwwD41Lh3xt2/favicon.ico?fit=max\u0026auto=format\u0026n=3KE0RwwD41Lh3xt2\u0026q=85\u0026s=6a58247013972686c0a551c6c6b98d66","api":{"examples":{"prefill":true}},"appearance":{"default":"system","strict":false},"navbar":{"primary":{"type":"button","label":"Console","href":"https://platform.minimax.io/console/home"}},"footer":{"socials":{"discord":"https://www.minimax.io/discord","x":"https://x.com/MiniMax_AI","linkedin":"https://www.linkedin.com/company/minimax-ai","github":"https://github.com/MiniMax-AI"},"links":[{"header":"Model","items":[{"label":"MiniMax M3.1 Flash","href":"https://www.minimax.io/blog/minimax-m31f"},{"label":"MiniMax M3","href":"https://www.minimax.io/blog/minimax-m3"},{"label":"MiniMax H3","href":"https://www.minimax.io/blog/minimax-h3"},{"label":"MiniMax Speech 2.8","href":"https://www.minimax.io/news/minimax-speech-28"},{"label":"MiniMax Music 3.0","href":"https://www.minimax.io/blog/minimax-music-3-0-next-generation-open-weights-production-ready-versatile-music-model"}]},{"header":"Product","items":[{"label":"MiniMax Code","href":"https://agent.minimax.io/"},{"label":"MiniMax Design","href":"https://design.minimax.io/"},{"label":"MiniMax Audio","href":"https://www.minimax.io/audio"}]},{"header":"API Platform","items":[{"label":"Developer Docs","href":"https://platform.minimax.io/docs/guides/models-intro"},{"label":"M Plan Subscription","href":"https://www.minimax.io/m-plan"},{"label":"Pricing","href":"https://platform.minimax.io/docs/pricing/overview"},{"label":"Console Login","href":"https://platform.minimax.io/console/home"},{"label":"Status","href":"https://status.minimax.io/"}]},{"header":"Company","items":[{"label":"About Us","href":"https://www.minimax.io/about"},{"label":"News","href":"https://www.minimax.io/news"},{"label":"Investor Relations","href":"https://ir.minimax.io/"},{"label":"Careers","href":"https://www.minimax.io/careers"}]}]},"seo":{"metatags":{"title":"MiniMax API Docs","description":"MiniMax Open Platform developer documentation with model API references, integration guides, tool setup, and billing information for building AI applications.","charset":"UTF-8","canonical":"https://platform.minimax.io/docs","viewport":"width=device-width, initial-scale=1.0"},"indexing":"all"},"fonts":{"family":"DM Sans"},"icons":{"library":"lucide"},"integrations":{"telemetry":{"enabled":true},"cookies":{"key":"minimax_docs_feedback_consent","value":"v1:granted"}},"banner":{"content":"🎉 The new-generation MiniMax M3.1 Flash is now available! ➔ [View docs](/docs/guides/text-generation).","dismissible":true},"contextual":{"options":["copy","view","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"minimax-cac98058","hasAudioNarration":false,"actualSubdomain":"minimax-cac98058","customDomains":["platform.minimax.io"],"gitSource":{"type":"github","owner":"minimax-ai-dev","repo":"docs","deployBranch":"main","contentDirectory":"packages/docs-en","isPrivate":true,"mountPath":"","label":""},"feedback":{"issues":false,"thumbs":true,"edits":false,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af3309e6f6c3ce06d51fcf8","clientVersion":"0.0.4094","searchFilterCounts":[{"language":"default","tag":"API","count":49},{"language":"default","tag":"Developer Guides","count":33},{"language":"default","tag":"Use Guides","count":23},{"language":"default","tag":"M Plan","count":18},{"language":"default","tag":"Speech","count":17},{"language":"default","tag":"Text","count":14},{"language":"default","tag":"Guides","count":12},{"language":"default","tag":"Tools","count":9},{"language":"default","tag":"Legacy APIs","count":8},{"language":"default","tag":"Video","count":8}]},"assistantConfig":{"enableAskAiButton":false,"enableAskAiSearchBar":false},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":".audio-container{height:50px;margin:16px 0}.video-agent-templates{width:300px;height:180px;object-fit:cover}video{border-radius:12px}table{overflow-x:auto}th,td{vertical-align:middle!important}td .video-agent-templates{margin:0}#navbar .docs-platform-brand{display:inline-flex;align-items:center;flex-shrink:0}#navbar .docs-platform-name{margin-left:20px;padding-left:20px;border-left:1px solid #e5e7eb;color:#6b7280;font-size:14px;font-weight:400;line-height:20px;white-space:nowrap}.dark #navbar .docs-platform-name{border-color:#374151;color:#9ca3af}#topbar-cta-button>a>span,#navbar .docs-console-mobile>span{background-color:#242424;border-radius:8px}#topbar-cta-button>a:hover>span,#navbar .docs-console-mobile:hover>span{background-color:#3a3a3a}#navbar .docs-console-mobile{display:none}#navbar nav:has(#topbar-cta-button){margin-right:0}@media (max-width: 1023px){#navbar .docs-platform-name{margin-left:12px;padding-left:12px;font-size:12px}#navbar .docs-console-mobile{position:relative;display:inline-flex;align-items:center;flex-shrink:0;padding:8px 10px;font-size:12px;font-weight:500;white-space:nowrap}}@media (max-width: 480px){#navbar .docs-topbar-row{column-gap:4px}#navbar .docs-platform-brand .nav-logo{width:80px;height:auto}#navbar .docs-platform-name{max-width:60px;margin-left:8px;padding-left:8px;font-size:11px;line-height:14px;white-space:normal}#navbar .docs-console-mobile{padding:8px;font-size:11px}#navbar :has(>#search-bar-entry-mobile){gap:6px}#navbar #search-bar-entry-mobile{width:24px}}#content-container p{font-size:1rem;line-height:1.5rem}.eyebrow{text-transform:uppercase}.method-nav-pill>span{font-weight:400}*:has(>.method-pill){border:none}.navbar-link>a{font-weight:400}.nav-tabs-item{font-weight:400}.nav-tabs-item.text-gray-800{font-weight:500}*:has(>.navbar-link)>.navbar-link:first-child>a{color:#181e25;font-weight:500}.dark *:has(>.navbar-link)>.navbar-link:first-child>a{color:#fff}#navbar,#sidebar{letter-spacing:0.02em}.callout{margin-top:2rem;margin-bottom:2rem}#content:has(>.model-retirement-notice:first-child){margin-top:1rem}.callout.model-retirement-notice{margin-top:0}.mplan-tool-intro{margin:16px 0;padding:12px 16px;border-left:4px solid #d97706;border-radius:6px;background:#fffbeb}.dark .mplan-tool-intro{background:rgba(120, 53, 15, 0.22);color:#e5e7eb}.dark .mplan-tool-intro a{color:#fbbf24!important;border-bottom-color:#fbbf24!important}.card span{line-height:1.4rem;margin-top:8px!important}#banner a{border-bottom-color:#181E25;color:#FFF}#footer a[href=\"mailto:api@minimax.io\"] svg{-webkit-mask-image:url('https://filecdn.minimax.chat/public/45f6ad6e-f42e-45ed-938e-7de67bfd367f.svg')!important;mask-image:url('https://filecdn.minimax.chat/public/45f6ad6e-f42e-45ed-938e-7de67bfd367f.svg')!important}#sidebar:has(a[href$=\"/pricing/overview\"]),#sidebar:has(a[href$=\"/pricing/overview/\"]){visibility:hidden}.pricing-sidebar-navigation{display:none}@media (min-width: 1024px){#content:has([data-pricing-sidebar]){container-type:normal;contain:none;isolation:auto}.pricing-sidebar-navigation{--pricing-sidebar-top: calc(var(--mintlify-slot-header-height, calc(4rem + var(--topbar-tabs-height, 3rem))) + var(--banner-height, 0px));display:block;position:fixed;z-index:20;top:var(--pricing-sidebar-top);left:max(2rem, calc((100vw - 92rem) / 2 + 2rem));width:var(--sidebar-width, 18rem);height:calc(100dvh - var(--pricing-sidebar-top));box-sizing:border-box;overflow-y:auto;overscroll-behavior:contain;padding:40px 24px 32px 0;margin:0}}[data-pricing-overview-active] [data-pricing-original]{display:none!important}.pricing-anchor-navigation{font-size:14px;line-height:1.5}.pricing-navigation-group+.pricing-navigation-group{margin-top:28px}.pricing-navigation-title{display:block;margin:0 0 10px;padding-left:16px;color:#111827;font-size:inherit;font-weight:600;line-height:1.5}.pricing-anchor-navigation .pricing-anchor-link{display:block;padding:6px 12px 6px 16px;margin:1px 0;border:0;border-radius:12px;color:#374151;line-height:1.5;text-decoration:none;overflow-wrap:anywhere}.pricing-anchor-navigation .pricing-anchor-link:hover{background:rgba(75, 85, 99, .05);color:#111827}.pricing-anchor-navigation .pricing-anchor-link[aria-current=\"location\"]{background:rgba(24, 30, 37, .075);color:#181e25;font-weight:600}.pricing-anchor-link:focus-visible{outline:2px solid currentColor;outline-offset:-2px}.pricing-section-toc{font-size:14px;line-height:1.5}.pricing-toc-title{margin-bottom:12px;color:#374151;font-weight:500}.pricing-section-toc .pricing-anchor-link{display:block;border:0;padding:5px 0 5px 12px;border-left:1px solid #e5e7eb;color:#6b7280;text-decoration:none;overflow-wrap:anywhere}.pricing-section-toc .pricing-anchor-link[aria-current=\"location\"]{border-left:2px solid #181e25;color:#181e25;font-weight:500}.pricing-mobile-navigation{display:none}#pricing-document .pricing-section,#pricing-document .pricing-section [id]{scroll-margin-top:10rem}.dark .pricing-navigation-title,.dark .pricing-toc-title{color:#e5e7eb}.dark .pricing-anchor-navigation .pricing-anchor-link,.dark .pricing-section-toc .pricing-anchor-link{color:#9ca3af}.dark .pricing-anchor-navigation .pricing-anchor-link:hover{background:rgba(229, 231, 235, .05);color:#d1d5db}.dark .pricing-anchor-navigation .pricing-anchor-link[aria-current=\"location\"]{background:rgba(229, 231, 235, .1);color:#f3f4f6}.dark .pricing-section-toc .pricing-anchor-link{border-left-color:#374151}.dark .pricing-section-toc .pricing-anchor-link[aria-current=\"location\"]{border-left-color:#e5e7eb;color:#e5e7eb}@media (max-width: 1023px){#pricing-document .pricing-mobile-navigation{display:block;margin:0 0 24px}#pricing-document .pricing-mobile-navigation>.accordion{margin-bottom:0}#pricing-document .pricing-mobile-navigation .pricing-anchor-navigation{max-height:min(65vh, 560px);overflow-y:auto;padding:8px 12px 20px;overscroll-behavior:contain}}#pricing-document>.pricing-section{margin-top:56px;padding-top:40px;border-top:1px solid #e5e7eb}#pricing-document>.pricing-overview+.pricing-section{margin-top:36px;border-top:0}#pricing-document>.pricing-section>h2:first-child{margin-top:0}#pricing-document .pricing-overview>span[data-as=\"p\"],#pricing-document .pricing-section>span[data-as=\"p\"]{display:block;margin:1em 0}.dark #pricing-document>.pricing-section{border-color:#374151}@media (max-width: 767px){#pricing-document>.pricing-section{margin-top:40px;padding-top:28px}}#pricing-document section[id=\"models/text\"] table{table-layout:fixed;width:100%}#pricing-document section[id=\"models/text\"] table th:first-child,#pricing-document section[id=\"models/text\"] table td:first-child{width:32%}#pricing-document section[id=\"models/video\"] table{table-layout:fixed;width:100%}#pricing-document section[id=\"models/video\"] table th:first-child,#pricing-document section[id=\"models/video\"] table td:first-child{width:30%}#pricing-document .video-price-table,#pricing-document .video-task-table{display:table;table-layout:fixed;width:100%}#pricing-document .video-price-table td:has(>strong)+td,#pricing-document .video-price-table tbody tr:not(:has(strong))>td:first-child{padding-left:24px}#pricing-document .video-price-table thead th:nth-child(2){padding-left:24px}.restricted-doc{--restricted-border: rgba(15, 23, 42, .12);--restricted-border-strong: rgba(15, 23, 42, .18);--restricted-muted: #64748b;--restricted-surface: rgba(15, 23, 42, .035);--restricted-surface-hover: rgba(15, 23, 42, .055);--restricted-link: #2563eb;color:inherit}.dark .restricted-doc{--restricted-border: rgba(255, 255, 255, .12);--restricted-border-strong: rgba(255, 255, 255, .18);--restricted-muted: #94a3b8;--restricted-surface: rgba(255, 255, 255, .045);--restricted-surface-hover: rgba(255, 255, 255, .07);--restricted-link: #60a5fa}.restricted-doc-loading{min-height:12rem;display:flex;align-items:center;justify-content:center}.restricted-doc-spinner{width:1.75rem;height:1.75rem;border:2px solid rgba(98,112,132,.24);border-top-color:#627084;border-radius:50%;animation:restricted-doc-spin .75s linear infinite}@keyframes restricted-doc-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.restricted-doc-spinner{animation-duration:1.5s}}.restricted-doc>h1{margin:0 0 .75rem;font-size:2.25rem;line-height:1.2;font-weight:700;letter-spacing:-.025em}.restricted-doc-description{margin:0 0 2rem;color:var(--restricted-muted);font-size:1.05rem;line-height:1.7}.restricted-doc h2,.restricted-doc h3,.restricted-doc h4{scroll-margin-top:6rem;font-weight:650;letter-spacing:-.015em}.restricted-doc h2{margin:2.75rem 0 1rem;padding-top:.25rem;font-size:1.65rem;line-height:1.35}.restricted-doc h3{margin:2.1rem 0 .75rem;font-size:1.3rem;line-height:1.4}.restricted-doc h4{margin:1.6rem 0 .5rem;font-size:1.1rem;line-height:1.45}.restricted-doc>p{margin:1rem 0}.restricted-doc p,.restricted-doc li{line-height:1.75}.restricted-doc ul,.restricted-doc ol{margin:1rem 0;padding-left:1.5rem}.restricted-doc li{padding-left:.15rem}.restricted-doc li+li{margin-top:.3rem}.restricted-doc li>p{margin:.25rem 0}.restricted-doc a{color:var(--restricted-link);text-decoration:underline;text-decoration-color:color-mix(in srgb, var(--restricted-link) 35%, transparent);text-underline-offset:.2em}.restricted-doc a:hover{text-decoration-color:currentColor}.restricted-doc :not(pre)>code{padding:.15rem .4rem;border:1px solid var(--restricted-border);border-radius:.35rem;background:var(--restricted-surface);font-size:.875em;font-weight:500}.restricted-doc-table-wrap{max-width:100%;margin:1.5rem 0;overflow-x:auto;border:1px solid var(--restricted-border-strong);border-radius:.75rem}.restricted-doc table{width:100%;border-collapse:separate;border-spacing:0;font-size:.925rem;line-height:1.55}.restricted-doc th,.restricted-doc td{min-width:7rem;padding:.75rem 1rem;border-bottom:1px solid var(--restricted-border);vertical-align:top;text-align:left}.restricted-doc th+th,.restricted-doc td+td{border-left:1px solid var(--restricted-border)}.restricted-doc th{background:var(--restricted-surface);font-weight:600;color:inherit}.restricted-doc tbody tr{transition:background-color .15s ease}.restricted-doc tbody tr:hover{background:var(--restricted-surface-hover)}.restricted-doc tr:last-child td{border-bottom:0}.restricted-doc-code{position:relative;margin:1.5rem 0;border:1px solid rgba(255,255,255,.09);border-radius:.75rem;background:#0f172a;color:#e5e7eb;box-shadow:0 1px 2px rgba(15,23,42,.08);overflow:hidden}.restricted-doc-code pre{margin:0;padding:1.1rem 1.2rem;overflow-x:auto;background:transparent}.restricted-doc-code code{display:block;min-width:max-content;padding-right:3.5rem;font-size:.85rem;line-height:1.7;white-space:pre;tab-size:2}.restricted-doc-code button{position:absolute;z-index:1;top:.65rem;right:.65rem;padding:.3rem .6rem;border:1px solid rgba(255,255,255,.16);border-radius:.4rem;background:rgba(30,41,59,.92);color:#cbd5e1;font-size:.75rem;line-height:1.25rem;cursor:pointer;transition:color .15s ease, border-color .15s ease, background-color .15s ease}.restricted-doc-code button:hover{border-color:rgba(255,255,255,.28);background:#334155;color:#fff}.restricted-doc-code .hljs-comment,.restricted-doc-code .hljs-quote{color:#7f8ea3;font-style:italic}.restricted-doc-code .hljs-keyword,.restricted-doc-code .hljs-selector-tag,.restricted-doc-code .hljs-literal,.restricted-doc-code .hljs-section,.restricted-doc-code .hljs-link{color:#c792ea}.restricted-doc-code .hljs-string,.restricted-doc-code .hljs-title,.restricted-doc-code .hljs-name,.restricted-doc-code .hljs-type,.restricted-doc-code .hljs-attribute,.restricted-doc-code .hljs-symbol,.restricted-doc-code .hljs-bullet,.restricted-doc-code .hljs-addition,.restricted-doc-code .hljs-variable,.restricted-doc-code .hljs-template-tag,.restricted-doc-code .hljs-template-variable{color:#addb67}.restricted-doc-code .hljs-number,.restricted-doc-code .hljs-meta,.restricted-doc-code .hljs-built_in,.restricted-doc-code .hljs-builtin-name,.restricted-doc-code .hljs-params{color:#f78c6c}.restricted-doc-code .hljs-attr,.restricted-doc-code .hljs-selector-id,.restricted-doc-code .hljs-selector-class,.restricted-doc-code .hljs-selector-attr,.restricted-doc-code .hljs-selector-pseudo{color:#ffcb6b}.restricted-doc-code .hljs-function,.restricted-doc-code .hljs-class .hljs-title{color:#82aaff}.restricted-doc-code .hljs-regexp,.restricted-doc-code .hljs-deletion{color:#ff5370}.restricted-doc-code .hljs-emphasis{font-style:italic}.restricted-doc-code .hljs-strong{font-weight:700}.restricted-doc-callout{margin:1.5rem 0;padding:.9rem 1rem;border:1px solid rgba(59,130,246,.22);border-radius:.65rem;background:rgba(59,130,246,.07)}.restricted-doc-callout>:first-child{margin-top:0}.restricted-doc-callout>:last-child{margin-bottom:0}.restricted-doc blockquote{margin:1.5rem 0;padding:.1rem 0 .1rem 1.1rem;border-left:2px solid var(--restricted-border-strong);color:var(--restricted-muted);font-style:italic}.restricted-doc blockquote>:first-child{margin-top:0}.restricted-doc blockquote>:last-child{margin-bottom:0}.restricted-doc-toc ul{margin:.6rem 0 0;padding:0;list-style:none}.restricted-doc-toc li{margin:.35rem 0;line-height:1.35}.restricted-doc-toc li[data-level=\"3\"]{padding-left:.75rem}.restricted-doc-toc li[data-level=\"4\"]{padding-left:1.5rem}.restricted-doc-toc a{color:var(--restricted-muted);text-decoration:none}.restricted-doc-toc a:hover{color:var(--restricted-link)}.restricted-doc-toc-title{font-weight:600}.restricted-doc-not-found{min-height:20rem;padding:4rem 0;text-align:center}.restricted-doc-not-found h1{font-size:3rem}@media (max-width: 768px){.restricted-doc>h1{font-size:1.85rem}.restricted-doc th,.restricted-doc td{min-width:6.5rem;padding:.65rem .75rem}.restricted-doc-code pre{padding:1rem}}"}],"page":{"pagePath":"api-reference/image-generation-h3-edits","slug":"/api-reference/image-generation-h3-edits","pageMetadata":{"title":"Image Edit","sidebarTitle":"Image Edit","description":"Generate new images from 1 to 16 reference images and a text description with MiniMax-H3-Image.","openapi":"api-reference/image/generation/api/h3-image-edits.json POST /v1/images/edits","href":"/api-reference/image-generation-h3-edits"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Generate new images from 1 to 16 reference images and a text description with MiniMax-H3-Image.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,..._provideComponents(),...props.components},{Warning}=_components;if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Supported models: `,_jsx(_components.code,{children:`MiniMax-H3-Image`}),`, `,_jsx(_components.code,{children:`MiniMax-H3-Image-Highspeed`}),`; both take the same parameters and limits. Image edits always apply prompt enhancement; see `,_jsx(_components.code,{children:`data[].revised_prompt`}),` for the enhanced prompt.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`The server waits up to 600 seconds; set the client timeout to at least 600 seconds. This endpoint is not idempotent: once a request is sent, the server finishes generation and charges for successful images even if the client times out or disconnects, and a retry generates and charges again. With the OpenAI SDK, set `,_jsx(_components.code,{children:`max_retries=0`}),` to turn off its default automatic retries.`]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Image Edit","sidebarTitle":"Image Edit","description":"Generate new images from 1 to 16 reference images and a text description with MiniMax-H3-Image.","openapi":"api-reference/image/generation/api/h3-image-edits.json POST /v1/images/edits","href":"/api-reference/image-generation-h3-edits"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/minimax-cac98058/74cbedfd7ddc6a81/scripts/auto-token.js","/docs/_mintlify/custom/minimax-cac98058/08175b8daa74cd64/scripts/logo.js","/docs/_mintlify/custom/minimax-cac98058/bdfa294452778802/scripts/head-userinfo.js","/docs/_mintlify/custom/minimax-cac98058/ee26a6e83cc5ae7f/scripts/navbar-same-tab.js","/docs/_mintlify/custom/minimax-cac98058/b2a91de372d716f8/scripts/pricing-dropdown.js","/docs/_mintlify/custom/minimax-cac98058/c76999ca41eb4aec/scripts/domain-link-rewrite.js","/docs/_mintlify/custom/minimax-cac98058/4fe58d73df53e822/scripts/cookie-consent.js","/docs/_mintlify/custom/minimax-cac98058/444224329a77c4b1/scripts/page-view-tracking.js","/docs/_mintlify/custom/minimax-cac98058/07d15e8ada8d8bbf/scripts/restricted-docs-core.js","/docs/_mintlify/custom/minimax-cac98058/409396746d530a03/scripts/restricted-docs-highlight.js","/docs/_mintlify/custom/minimax-cac98058/728362c2608a54be/scripts/restricted-docs.js","/docs/_mintlify/custom/minimax-cac98058/50d87c5c4c9a98b0/scripts/rum.js","/docs/_mintlify/custom/minimax-cac98058/871207bfb6c35ea9/scripts/pricing-navigation.js","/docs/_mintlify/custom/minimax-cac98058/b067abec70d0dbb6/scripts/feedback-consent.js"],"openApiReferenceData":{"operation":{"summary":"Image Edit","description":"Generate new images from 1 to 16 reference images and a text description with MiniMax-H3-Image.","operationId":"h3ImageEdits","tags":["Image"],"requestBody":"75a0e782-30ea-4a25-95a5-5fb0fa6fd90c","responses":{"200":"e3814f8e-ed38-499d-8888-06d70e5808bd","400":"5018ed30-83e6-49f3-bf10-41546ce968ca","401":"5259e2ff-1605-49cf-a64e-788ac1646ff0","402":"9a68fa73-c508-4e17-9300-06ce5bdc3fc5","422":"4b8db614-e2b3-4b24-b4d0-ba20f12ed16c","429":"3a502805-bca0-4635-b57e-e28cd8929339","500":"f40805fd-2944-4b62-8f60-f9e653f1041b"},"x-codeSamples":[{"lang":"cURL","label":"cURL (JSON)","source":"curl --request POST \\\n --url https://api.minimax.io/v1/images/edits \\\n --header 'Authorization: Bearer \u003ctoken>' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"model\": \"MiniMax-H3-Image\",\n \"prompt\": \"Replace the cat in image 1 with the Shiba Inu in image 2, keep the background unchanged\",\n \"images\": [\n {\"image_url\": \"https://example.com/cat.jpg\"},\n {\"image_url\": \"https://example.com/dog.png\"}\n ],\n \"size\": \"auto\",\n \"response_format\": \"url\"\n}'"},{"lang":"cURL","label":"cURL (multipart)","source":"curl --request POST \\\n --url https://api.minimax.io/v1/images/edits \\\n --header 'Authorization: Bearer \u003ctoken>' \\\n --form model=MiniMax-H3-Image \\\n --form 'prompt=Replace the cat in image 1 with the Shiba Inu in image 2, keep the background unchanged' \\\n --form 'image[]=@cat.jpg' \\\n --form 'image[]=@dog.png' \\\n --form size=auto \\\n --form response_format=url"},{"lang":"Python","label":"Python (requests)","source":"import os\nimport requests\n\nurl = \"https://api.minimax.io/v1/images/edits\"\nheaders = {\"Authorization\": f\"Bearer {os.environ.get('MINIMAX_API_KEY')}\"}\n\npayload = {\n \"model\": \"MiniMax-H3-Image\",\n \"prompt\": \"Replace the cat in image 1 with the Shiba Inu in image 2, keep the background unchanged\",\n \"images\": [\n {\"image_url\": \"https://example.com/cat.jpg\"},\n {\"image_url\": \"https://example.com/dog.png\"},\n ],\n \"size\": \"auto\",\n \"response_format\": \"url\",\n}\n\nresponse = requests.post(url, headers=headers, json=payload, timeout=600)\nprint(response.json())"},{"lang":"Python","label":"Python (OpenAI SDK)","source":"import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n base_url=\"https://api.minimax.io/v1\",\n api_key=os.environ.get(\"MINIMAX_API_KEY\"),\n)\n\n# Upload reference images as files; list order is the Picture number\nresult = client.images.edit(\n model=\"MiniMax-H3-Image\",\n image=[open(\"cat.jpg\", \"rb\"), open(\"dog.png\", \"rb\")],\n prompt=\"Replace the cat in image 1 with the Shiba Inu in image 2, keep the background unchanged\",\n size=\"auto\",\n response_format=\"url\",\n)\n\nfor i, item in enumerate(result.data):\n print(i, item.url) # url is None for images that failed"}],"method":"post","type":"path","servers":["d2792867-ee94-41d9-a7b4-0f7233306d80"],"security":["ca48c875-1e36-4a31-9c4a-7aa4e6099eba"],"path":"/v1/images/edits","baseUrlOptions":["https://api.minimax.io"],"title":"Image Edit","codeSamples":[{"label":"cURL (JSON)","lang":"cURL","source":"curl --request POST \\\n --url https://api.minimax.io/v1/images/edits \\\n --header 'Authorization: Bearer \u003ctoken>' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"model\": \"MiniMax-H3-Image\",\n \"prompt\": \"Replace the cat in image 1 with the Shiba Inu in image 2, keep the background unchanged\",\n \"images\": [\n {\"image_url\": \"https://example.com/cat.jpg\"},\n {\"image_url\": \"https://example.com/dog.png\"}\n ],\n \"size\": \"auto\",\n \"response_format\": \"url\"\n}'"},{"label":"cURL (multipart)","lang":"cURL","source":"curl --request POST \\\n --url https://api.minimax.io/v1/images/edits \\\n --header 'Authorization: Bearer \u003ctoken>' \\\n --form model=MiniMax-H3-Image \\\n --form 'prompt=Replace the cat in image 1 with the Shiba Inu in image 2, keep the background unchanged' \\\n --form 'image[]=@cat.jpg' \\\n --form 'image[]=@dog.png' \\\n --form size=auto \\\n --form response_format=url"},{"label":"Python (requests)","lang":"Python","source":"import os\nimport requests\n\nurl = \"https://api.minimax.io/v1/images/edits\"\nheaders = {\"Authorization\": f\"Bearer {os.environ.get('MINIMAX_API_KEY')}\"}\n\npayload = {\n \"model\": \"MiniMax-H3-Image\",\n \"prompt\": \"Replace the cat in image 1 with the Shiba Inu in image 2, keep the background unchanged\",\n \"images\": [\n {\"image_url\": \"https://example.com/cat.jpg\"},\n {\"image_url\": \"https://example.com/dog.png\"},\n ],\n \"size\": \"auto\",\n \"response_format\": \"url\",\n}\n\nresponse = requests.post(url, headers=headers, json=payload, timeout=600)\nprint(response.json())"},{"label":"Python (OpenAI SDK)","lang":"Python","source":"import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n base_url=\"https://api.minimax.io/v1\",\n api_key=os.environ.get(\"MINIMAX_API_KEY\"),\n)\n\n# Upload reference images as files; list order is the Picture number\nresult = client.images.edit(\n model=\"MiniMax-H3-Image\",\n image=[open(\"cat.jpg\", \"rb\"), open(\"dog.png\", \"rb\")],\n prompt=\"Replace the cat in image 1 with the Shiba Inu in image 2, keep the background unchanged\",\n size=\"auto\",\n response_format=\"url\",\n)\n\nfor i, item in enumerate(result.data):\n print(i, item.url) # url is None for images that failed"}],"requiredOnlyExamples":false,"requestExampleType":"codeSamples","responseExampleType":"generated","prefillPlaygroundWithExample":true,"prefillPlaygroundExamples":[{"body.model":"MiniMax-H3-Image","body.prompt":"Replace the cat in image 1 with the Shiba Inu in image 2, keep the background unchanged","body.images.items.0.image_url":"https://example.com/cat.jpg","body.images.items.1.image_url":"https://example.com/dog.png","body.size":"auto","body.response_format":"url"}]},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","prompt","images"],"properties":{"model":{"type":"string","description":"Model name. Supported values: `MiniMax-H3-Image`, `MiniMax-H3-Image-Highspeed`; both take the same parameters and limits","enum":["MiniMax-H3-Image","MiniMax-H3-Image-Highspeed"],"isRequired":true,"uniqueKey":"model","typeLabel":"enum\u003cstring>"},"prompt":{"type":"string","maxLength":32000,"description":"Text description of the edit, up to 32000 characters (counted as Unicode characters, excluding leading and trailing whitespace); an empty or whitespace-only prompt returns 400.","isRequired":true,"uniqueKey":"prompt","typeLabel":"string"},"images":{"type":"array","minItems":1,"maxItems":16,"description":"Reference images, 1 to 16.\n\n**Reference image limits** (total request body ≤ 64 MiB; Base64-encoded data is about 4/3 of the original file size; if the request body would exceed the limit, use public URLs or `mm_file://`)\n\n| Item | Limit |\n| :--- | :--- |\n| Format | JPG, JPEG, PNG, WEBP, HEIC, HEIF |\n| Single file size | ≤ 64 MiB |\n| Width/height range | [128, 8192] px |\n| Aspect ratio (long/short side) | ≤ 4:1 |\n| Count | 1 to 16 |","items":{"type":"object","description":"A single reference image.","required":["image_url"],"properties":{"image_url":{"type":"string","description":"Image location. Supported: a public URL; `mm_file://{file_id}` (reference an uploaded file, obtained by calling [File Upload](/api-reference/file-management-upload) with `purpose` set to `image_generation_input`); a `data:image/\u003cformat>;base64,\u003cBase64>` data URI (`\u003cformat>` lowercase).","isRequired":true,"uniqueKey":"images.items.[INDEX].image_url","typeLabel":"string"}},"uniqueKey":"images.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"images","typeLabel":"object[]"},"n":{"type":"integer","default":1,"minimum":1,"maximum":10,"description":"Number of images, range [1, 10], default 1.","uniqueKey":"n","typeLabel":"integer"},"size":{"type":"string","default":"auto","description":"Output image size, default `auto`; see [Output Size](/guides/image-generation#output-size). Use one of two forms:\n\n- `WIDTHxHEIGHT`: set the width and height directly, e.g. `2720x1536`; both are positive integers. The area (width × height) must be between 655,360 and 20,000,000 pixels and the aspect ratio between 1:3 and 3:1, bounds inclusive; otherwise 400 is returned, and the size is never scaled or rounded. In this form, do not set `aspect_ratio` or `area` (not even to `auto`); otherwise 400 is returned\n- `auto` or omitted: width and height are determined by `aspect_ratio` (default `auto`) and `area` (default `4K`); either can be set on its own","uniqueKey":"size","typeLabel":"string"},"aspect_ratio":{"type":"string","default":"auto","example":"16:9","description":"Output aspect ratio, default `auto`. Can only be set when `size` is omitted or `auto`; setting it while `size` is `WIDTHxHEIGHT` returns 400.\n\n- `auto`: decided by prompt enhancement based on the reference images and content\n- `X:Y`: X and Y are integers from 1 to 300 and the ratio is between 1:3 and 3:1 (bounds inclusive), e.g. `16:9`, `3:4`, `21:9`, `3:1`","uniqueKey":"aspect_ratio","typeLabel":"string"},"area":{"type":"string","enum":["1K","2K","4K"],"default":"4K","description":"Output area level, default `4K`. Can only be set when `size` is omitted or `auto`; setting it while `size` is `WIDTHxHEIGHT` returns 400.\n\n`1K`, `2K` and `4K` target areas of 1024 × 1024, 2048 × 2048 and 4096 × 4096 pixels. The server calculates width and height from the aspect ratio; for example, `2K` with `16:9` outputs 2720 × 1536. See `data[].size` for each image's actual width and height.","uniqueKey":"area","typeLabel":"enum\u003cstring>"},"output_format":{"type":"string","enum":["png","jpeg","jpg","webp"],"default":"jpeg","description":"Output image format, default `jpeg`. Available values: `png`, `jpeg`, `jpg`, `webp`. `jpg` is equivalent to `jpeg`; `output_format` in the response is returned as `jpeg`.","uniqueKey":"output_format","typeLabel":"enum\u003cstring>"},"response_format":{"type":"string","enum":["url","b64_json"],"default":"url","description":"Return format, default `url`.\n\n- `url`: image URL. Download the image and store it yourself; the URL is not guaranteed to remain available\n- `b64_json`: Base64-encoded image data, not supported with streaming\n\nTotal output area (`n` × width × height) limits for `b64_json`; exceeding returns 400 (with `size` = `auto`, each image counts as its `area` level, e.g. 4096 × 4096 for `4K`):\n\n| `output_format` | Total area limit | Example |\n| :--- | :--- | :--- |\n| `png` | 20,000,000 px | 1 image of any size |\n| `jpeg` / `webp` | 80,000,000 px | Up to 4 images at `4K`, or 10 at `2K` |","uniqueKey":"response_format","typeLabel":"enum\u003cstring>"},"stream":{"type":"boolean","default":false,"description":"Whether to stream results, default `false`. When enabled, the response is `text/event-stream` (SSE), and only `response_format` = `url` is supported:\n\n- One event is pushed as each image finishes: `image_edit.partial_succeeded` on success, `image_edit.partial_failed` on failure. Events are pushed in completion order; use `image_index` to match images\n- `image_edit.completed` is pushed after all images finish, with `usage` and `request_id`\n- After the response headers are sent, an `error` event is pushed if all images fail or the request fails before generation is submitted\n- Errors before the response headers are sent (invalid parameters, authentication, rate limiting, insufficient balance, etc.) are returned as regular HTTP errors, the same as non-streaming calls; check the HTTP status code before parsing SSE\n\nSee [Streaming Events](/api-reference/image-generation-h3-streaming) for event structures.","uniqueKey":"stream","typeLabel":"boolean"},"output_compression":{"type":"integer","minimum":0,"maximum":100,"default":95,"description":"Compression quality, range [0, 100], default 95; higher values give better quality and larger files. Only applies to `jpeg` / `webp` and is ignored for `png`; values outside the range return 400.","uniqueKey":"output_compression","typeLabel":"integer"}},"example":{"model":"MiniMax-H3-Image","prompt":"Replace the cat in image 1 with the Shiba Inu in image 2, keep the background unchanged","images":[{"image_url":"https://example.com/cat.jpg"},{"image_url":"https://example.com/dog.png"}],"size":"auto","response_format":"url"},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"model":"MiniMax-H3-Image","prompt":"Replace the cat in image 1 with the Shiba Inu in image 2, keep the background unchanged","images":[{"image_url":"https://example.com/cat.jpg"},{"image_url":"https://example.com/dog.png"}],"size":"auto","response_format":"url"}}},"exampleType":"generated"},"multipart/form-data":{"schema":{"type":"object","description":"The `multipart/form-data` format, compatible with the OpenAI SDK `images.edit`: upload reference images as files and pass the other parameters as form fields, with the same values as the `application/json` format.","required":["model","prompt","image"],"properties":{"model":{"type":"string","description":"Model name. Supported values: `MiniMax-H3-Image`, `MiniMax-H3-Image-Highspeed`; both take the same parameters and limits","enum":["MiniMax-H3-Image","MiniMax-H3-Image-Highspeed"],"isRequired":true,"uniqueKey":"model","typeLabel":"enum\u003cstring>"},"prompt":{"type":"string","maxLength":32000,"description":"Text description of the edit, up to 32000 characters (counted as Unicode characters, excluding leading and trailing whitespace); an empty or whitespace-only prompt returns 400.","isRequired":true,"uniqueKey":"prompt","typeLabel":"string"},"image":{"type":"array","minItems":1,"maxItems":16,"description":"Reference image files, 1 to 16; upload order is the Picture number. Use the field name `image` or `image[]`, one field per file (the OpenAI SDK uses `image[]` for multiple images). Format, single file size, width/height, and aspect ratio limits are the same as `images` in the `application/json` format; total request body ≤ 64 MiB. `mask` is not supported and returns 400.","items":{"type":"string","format":"binary","uniqueKey":"image.items.[INDEX]","typeLabel":"file"},"isRequired":true,"uniqueKey":"image","typeLabel":"file[]"},"n":{"type":"integer","default":1,"minimum":1,"maximum":10,"description":"Number of images, range [1, 10], default 1.","uniqueKey":"n","typeLabel":"integer"},"size":{"type":"string","default":"auto","description":"Output image size, default `auto`; see [Output Size](/guides/image-generation#output-size). Use one of two forms:\n\n- `WIDTHxHEIGHT`: set the width and height directly, e.g. `2720x1536`; both are positive integers. The area (width × height) must be between 655,360 and 20,000,000 pixels and the aspect ratio between 1:3 and 3:1, bounds inclusive; otherwise 400 is returned, and the size is never scaled or rounded. In this form, do not set `aspect_ratio` or `area` (not even to `auto`); otherwise 400 is returned\n- `auto` or omitted: width and height are determined by `aspect_ratio` (default `auto`) and `area` (default `4K`); either can be set on its own","uniqueKey":"size","typeLabel":"string"},"aspect_ratio":{"type":"string","default":"auto","example":"16:9","description":"Output aspect ratio, default `auto`. Can only be set when `size` is omitted or `auto`; setting it while `size` is `WIDTHxHEIGHT` returns 400.\n\n- `auto`: decided by prompt enhancement based on the reference images and content\n- `X:Y`: X and Y are integers from 1 to 300 and the ratio is between 1:3 and 3:1 (bounds inclusive), e.g. `16:9`, `3:4`, `21:9`, `3:1`","uniqueKey":"aspect_ratio","typeLabel":"string"},"area":{"type":"string","enum":["1K","2K","4K"],"default":"4K","description":"Output area level, default `4K`. Can only be set when `size` is omitted or `auto`; setting it while `size` is `WIDTHxHEIGHT` returns 400.\n\n`1K`, `2K` and `4K` target areas of 1024 × 1024, 2048 × 2048 and 4096 × 4096 pixels. The server calculates width and height from the aspect ratio; for example, `2K` with `16:9` outputs 2720 × 1536. See `data[].size` for each image's actual width and height.","uniqueKey":"area","typeLabel":"enum\u003cstring>"},"output_format":{"type":"string","enum":["png","jpeg","jpg","webp"],"default":"jpeg","description":"Output image format, default `jpeg`. Available values: `png`, `jpeg`, `jpg`, `webp`. `jpg` is equivalent to `jpeg`; `output_format` in the response is returned as `jpeg`.","uniqueKey":"output_format","typeLabel":"enum\u003cstring>"},"response_format":{"type":"string","enum":["url","b64_json"],"default":"url","description":"Return format, default `url`.\n\n- `url`: image URL. Download the image and store it yourself; the URL is not guaranteed to remain available\n- `b64_json`: Base64-encoded image data, not supported with streaming\n\nTotal output area (`n` × width × height) limits for `b64_json`; exceeding returns 400 (with `size` = `auto`, each image counts as its `area` level, e.g. 4096 × 4096 for `4K`):\n\n| `output_format` | Total area limit | Example |\n| :--- | :--- | :--- |\n| `png` | 20,000,000 px | 1 image of any size |\n| `jpeg` / `webp` | 80,000,000 px | Up to 4 images at `4K`, or 10 at `2K` |","uniqueKey":"response_format","typeLabel":"enum\u003cstring>"},"stream":{"type":"boolean","default":false,"description":"Whether to stream results, default `false`. When enabled, the response is `text/event-stream` (SSE), and only `response_format` = `url` is supported:\n\n- One event is pushed as each image finishes: `image_edit.partial_succeeded` on success, `image_edit.partial_failed` on failure. Events are pushed in completion order; use `image_index` to match images\n- `image_edit.completed` is pushed after all images finish, with `usage` and `request_id`\n- After the response headers are sent, an `error` event is pushed if all images fail or the request fails before generation is submitted\n- Errors before the response headers are sent (invalid parameters, authentication, rate limiting, insufficient balance, etc.) are returned as regular HTTP errors, the same as non-streaming calls; check the HTTP status code before parsing SSE\n\nSee [Streaming Events](/api-reference/image-generation-h3-streaming) for event structures.","uniqueKey":"stream","typeLabel":"boolean"},"output_compression":{"type":"integer","minimum":0,"maximum":100,"default":95,"description":"Compression quality, range [0, 100], default 95; higher values give better quality and larger files. Only applies to `jpeg` / `webp` and is ignored for `png`; values outside the range return 400.","uniqueKey":"output_compression","typeLabel":"integer"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"prompt":"\u003cstring>","image":["\u003cstring>"],"n":1,"size":"auto","aspect_ratio":"16:9","area":"4K","output_format":"jpeg","response_format":"url","stream":false,"output_compression":95}}},"exampleType":"generated"}},"description":"Two formats are supported: `application/json`, or `multipart/form-data` compatible with the OpenAI SDK `images.edit`.","exampleType":"generated"},"responses":{"e3814f8e-ed38-499d-8888-06d70e5808bd":{"description":"Returns `application/json` when `stream` is `false` (default). When `stream` is `true`, returns `text/event-stream` (SSE); the `data` of each event is JSON, defined under the `text/event-stream` response. See [Streaming Events](/api-reference/image-generation-h3-streaming) for event details and a full example.","content":{"application/json":{"schema":{"type":"object","properties":{"created":{"type":"integer","description":"Time the response was generated, as a Unix timestamp in seconds.","uniqueKey":"created","typeLabel":"integer"},"data":{"type":"array","description":"Images, always `n` items in image order (matching `image_index` in streaming events). Successful items contain `url` (or `b64_json`), `size` and `revised_prompt`; failed items, including those withheld by the content safety check, contain only `error`.\n\nIf at least one image succeeds, the HTTP status is 200, so check `data[].error` for every item; if all images fail, a 402, 422 or 500 error response is returned. Only successful images are charged.","items":{"type":"object","properties":{"url":{"type":"string","description":"Image URL, returned when `response_format` is `url`.","uniqueKey":"data.items.[INDEX].url","typeLabel":"string"},"b64_json":{"type":"string","description":"Base64-encoded image data. Returned when `response_format` is `b64_json`.","uniqueKey":"data.items.[INDEX].b64_json","typeLabel":"string"},"size":{"type":"string","description":"Actual image size, formatted as `WIDTHxHEIGHT`.","uniqueKey":"data.items.[INDEX].size","typeLabel":"string"},"revised_prompt":{"type":"string","description":"The prompt actually used to generate this image, i.e. the enhanced prompt.","uniqueKey":"data.items.[INDEX].revised_prompt","typeLabel":"string"},"error":{"type":"object","description":"Error for this image, returned only when it fails.","properties":{"code":{"type":"string","description":"Error code for this image. Common values: `1000` generation failed, `1001` timed out, `1008` insufficient balance, `1026` enhanced prompt failed the content safety check, `1027` generated image failed the content safety check. See [Error Codes](/api-reference/errorcode) for the full list.","uniqueKey":"data.items.[INDEX].error.code","typeLabel":"string"},"message":{"type":"string","description":"Error detail.","uniqueKey":"data.items.[INDEX].error.message","typeLabel":"string"}},"uniqueKey":"data.items.[INDEX].error","typeLabel":"object"}},"uniqueKey":"data.items.[INDEX]","typeLabel":"object"},"uniqueKey":"data","typeLabel":"object[]"},"output_format":{"type":"string","enum":["png","jpeg","webp"],"description":"Format of the generated images.","uniqueKey":"output_format","typeLabel":"enum\u003cstring>"},"usage":{"type":"object","description":"Token usage of this request, counting successful images only; billing is based on it. `total_tokens` is the sum of `input_tokens` and `output_tokens`.","properties":{"generated_images":{"type":"integer","description":"Number of images generated successfully; may be less than `n`.","uniqueKey":"usage.generated_images","typeLabel":"integer"},"total_tokens":{"type":"integer","description":"Total tokens.","uniqueKey":"usage.total_tokens","typeLabel":"integer"},"input_tokens":{"type":"integer","description":"Input tokens (text and reference images).","uniqueKey":"usage.input_tokens","typeLabel":"integer"},"output_tokens":{"type":"integer","description":"Output tokens (generated images).","uniqueKey":"usage.output_tokens","typeLabel":"integer"},"input_tokens_details":{"type":"object","properties":{"text_tokens":{"type":"integer","description":"Input text tokens, including tokens converted from the prompt enhancement cost.","uniqueKey":"usage.input_tokens_details.text_tokens","typeLabel":"integer"},"image_tokens":{"type":"integer","description":"Input reference image tokens; 0 for text-to-image.","uniqueKey":"usage.input_tokens_details.image_tokens","typeLabel":"integer"}},"uniqueKey":"usage.input_tokens_details","typeLabel":"object"},"output_tokens_details":{"type":"object","properties":{"image_tokens":{"type":"integer","description":"Tokens of the output images.","uniqueKey":"usage.output_tokens_details.image_tokens","typeLabel":"integer"}},"uniqueKey":"usage.output_tokens_details","typeLabel":"object"}},"uniqueKey":"usage","typeLabel":"object"},"request_id":{"type":"string","description":"Request ID (the trace ID). Provide it when reporting an issue.","uniqueKey":"request_id","typeLabel":"string"}},"example":{"created":1792308678,"data":[{"url":"https://example.com/h3-image/output-0.jpg","size":"5440x3072","revised_prompt":"Replace the orange cat lying on the windowsill in image 1 with the Shiba Inu from image 2, keeping the dog's coat color and facial features, lying down, with the windowsill, lighting and background unchanged"}],"output_format":"jpeg","usage":{"generated_images":1,"total_tokens":40225,"input_tokens":23905,"output_tokens":16320,"input_tokens_details":{"text_tokens":12093,"image_tokens":11812},"output_tokens_details":{"image_tokens":16320}},"request_id":"021792308678142a2c883cf675b9804d"},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"created":1792308678,"data":[{"url":"https://example.com/h3-image/output-0.jpg","size":"5440x3072","revised_prompt":"Replace the orange cat lying on the windowsill in image 1 with the Shiba Inu from image 2, keeping the dog's coat color and facial features, lying down, with the windowsill, lighting and background unchanged"}],"output_format":"jpeg","usage":{"generated_images":1,"total_tokens":40225,"input_tokens":23905,"output_tokens":16320,"input_tokens_details":{"text_tokens":12093,"image_tokens":11812},"output_tokens_details":{"image_tokens":16320}},"request_id":"021792308678142a2c883cf675b9804d"}}},"exampleType":"generated"},"text/event-stream":{"schema":{"oneOf":[{"type":"object","title":"partial_succeeded","description":"JSON in the `data` field of each SSE event: one of the four events below, distinguished by `type`. Each event consists of an `event:` line and a `data:` line, and events are separated by a blank line. While waiting, a comment line `: keepalive` is sent every 15 seconds and can be ignored.","required":["type","image_index","url"],"properties":{"type":{"type":"string","enum":["image_edit.partial_succeeded"],"description":"Event type, always `image_edit.partial_succeeded`.","isRequired":true,"uniqueKey":"oneOf.0.type","typeLabel":"enum\u003cstring>"},"image_index":{"type":"integer","description":"Image index, starting from 0, range [0, n-1]; matches the position in `data` of the non-streaming response.","isRequired":true,"uniqueKey":"oneOf.0.image_index","typeLabel":"integer"},"url":{"type":"string","description":"Image URL. Download the image and store it yourself.","isRequired":true,"uniqueKey":"oneOf.0.url","typeLabel":"string"},"created":{"type":"integer","description":"Unix timestamp (seconds) when the event was produced.","uniqueKey":"oneOf.0.created","typeLabel":"integer"},"model":{"type":"string","description":"Model name.","uniqueKey":"oneOf.0.model","typeLabel":"string"},"size":{"type":"string","description":"Actual image size, formatted as `WIDTHxHEIGHT`.","uniqueKey":"oneOf.0.size","typeLabel":"string"},"output_format":{"type":"string","enum":["png","jpeg","webp"],"description":"Image format: `png`, `jpeg`, or `webp`.","uniqueKey":"oneOf.0.output_format","typeLabel":"enum\u003cstring>"},"revised_prompt":{"type":"string","description":"The prompt actually used to generate this image, i.e. the enhanced prompt.","uniqueKey":"oneOf.0.revised_prompt","typeLabel":"string"}},"uniqueKey":"oneOf.0","typeLabel":"partial_succeeded · object"},{"type":"object","title":"partial_failed","description":"JSON in the `data` field of each SSE event: one of the four events below, distinguished by `type`. Each event consists of an `event:` line and a `data:` line, and events are separated by a blank line. While waiting, a comment line `: keepalive` is sent every 15 seconds and can be ignored.","required":["type","image_index","code","message"],"properties":{"type":{"type":"string","enum":["image_edit.partial_failed"],"description":"Event type, always `image_edit.partial_failed`.","isRequired":true,"uniqueKey":"oneOf.1.type","typeLabel":"enum\u003cstring>"},"image_index":{"type":"integer","description":"Image index, starting from 0, range [0, n-1]; matches the position in `data` of the non-streaming response.","isRequired":true,"uniqueKey":"oneOf.1.image_index","typeLabel":"integer"},"code":{"type":"string","description":"Error code for this image. Common values: `1000` generation failed, `1001` timed out, `1008` insufficient balance, `1026` enhanced prompt failed the content safety check, `1027` generated image failed the content safety check. See [Error Codes](/api-reference/errorcode) for the full list.","isRequired":true,"uniqueKey":"oneOf.1.code","typeLabel":"string"},"message":{"type":"string","description":"Error details.","isRequired":true,"uniqueKey":"oneOf.1.message","typeLabel":"string"},"created":{"type":"integer","description":"Unix timestamp (seconds) when the event was produced.","uniqueKey":"oneOf.1.created","typeLabel":"integer"},"model":{"type":"string","description":"Model name.","uniqueKey":"oneOf.1.model","typeLabel":"string"}},"uniqueKey":"oneOf.1","typeLabel":"partial_failed · object"},{"type":"object","title":"completed","description":"JSON in the `data` field of each SSE event: one of the four events below, distinguished by `type`. Each event consists of an `event:` line and a `data:` line, and events are separated by a blank line. While waiting, a comment line `: keepalive` is sent every 15 seconds and can be ignored.","required":["type"],"properties":{"type":{"type":"string","enum":["image_edit.completed"],"description":"Event type, always `image_edit.completed`.","isRequired":true,"uniqueKey":"oneOf.2.type","typeLabel":"enum\u003cstring>"},"created":{"type":"integer","description":"Unix timestamp (seconds) when the event was produced.","uniqueKey":"oneOf.2.created","typeLabel":"integer"},"model":{"type":"string","description":"Model name.","uniqueKey":"oneOf.2.model","typeLabel":"string"},"usage":{"type":"object","description":"Token usage of this request, counting successful images only; billing is based on it. `total_tokens` is the sum of `input_tokens` and `output_tokens`.","properties":{"generated_images":{"type":"integer","description":"Number of images generated successfully; may be less than `n`.","uniqueKey":"oneOf.2.usage.generated_images","typeLabel":"integer"},"total_tokens":{"type":"integer","description":"Total tokens.","uniqueKey":"oneOf.2.usage.total_tokens","typeLabel":"integer"},"input_tokens":{"type":"integer","description":"Input tokens (text and reference images).","uniqueKey":"oneOf.2.usage.input_tokens","typeLabel":"integer"},"output_tokens":{"type":"integer","description":"Output tokens (generated images).","uniqueKey":"oneOf.2.usage.output_tokens","typeLabel":"integer"},"input_tokens_details":{"type":"object","properties":{"text_tokens":{"type":"integer","description":"Input text tokens, including tokens converted from the prompt enhancement cost.","uniqueKey":"oneOf.2.usage.input_tokens_details.text_tokens","typeLabel":"integer"},"image_tokens":{"type":"integer","description":"Input reference image tokens; 0 for text-to-image.","uniqueKey":"oneOf.2.usage.input_tokens_details.image_tokens","typeLabel":"integer"}},"uniqueKey":"oneOf.2.usage.input_tokens_details","typeLabel":"object"},"output_tokens_details":{"type":"object","properties":{"image_tokens":{"type":"integer","description":"Tokens of the output images.","uniqueKey":"oneOf.2.usage.output_tokens_details.image_tokens","typeLabel":"integer"}},"uniqueKey":"oneOf.2.usage.output_tokens_details","typeLabel":"object"}},"uniqueKey":"oneOf.2.usage","typeLabel":"object"},"request_id":{"type":"string","description":"Request ID (the trace ID). Provide it when reporting an issue.","uniqueKey":"oneOf.2.request_id","typeLabel":"string"}},"uniqueKey":"oneOf.2","typeLabel":"completed · object"},{"type":"object","title":"error","description":"JSON in the `data` field of each SSE event: one of the four events below, distinguished by `type`. Each event consists of an `event:` line and a `data:` line, and events are separated by a blank line. While waiting, a comment line `: keepalive` is sent every 15 seconds and can be ignored.","required":["type","error"],"properties":{"type":{"type":"string","enum":["error"],"description":"Always `error`.","isRequired":true,"uniqueKey":"oneOf.3.type","typeLabel":"enum\u003cstring>"},"error":{"type":"object","properties":{"type":{"type":"string","description":"Error type: `bad_request_error` (400) / `authorized_error` (401) / `insufficient_balance_error` (402) / `unprocessable_entity_error` (422) / `rate_limit_error` (429) / `server_error` (500), etc.","uniqueKey":"oneOf.3.error.type","typeLabel":"string"},"message":{"type":"string","description":"Error detail; the trailing parenthesis holds the internal error code (e.g. `... (2013)`). See [Error Codes](/api-reference/errorcode).","uniqueKey":"oneOf.3.error.message","typeLabel":"string"},"http_code":{"type":"string","description":"HTTP status code as a string, e.g. `400`.","uniqueKey":"oneOf.3.error.http_code","typeLabel":"string"}},"description":"Error details, the same as the `error` field of the HTTP error response of a non-streaming request. When all images fail, `http_code` is `422` (all failed the content safety check), `402` (all failed due to insufficient balance), or `500` (otherwise).","isRequired":true,"uniqueKey":"oneOf.3.error","typeLabel":"object"},"usage":{"type":"object","description":"All values are 0.","properties":{"generated_images":{"type":"integer","description":"Number of images generated successfully; may be less than `n`.","uniqueKey":"oneOf.3.usage.generated_images","typeLabel":"integer"},"total_tokens":{"type":"integer","description":"Total tokens.","uniqueKey":"oneOf.3.usage.total_tokens","typeLabel":"integer"},"input_tokens":{"type":"integer","description":"Input tokens (text and reference images).","uniqueKey":"oneOf.3.usage.input_tokens","typeLabel":"integer"},"output_tokens":{"type":"integer","description":"Output tokens (generated images).","uniqueKey":"oneOf.3.usage.output_tokens","typeLabel":"integer"},"input_tokens_details":{"type":"object","properties":{"text_tokens":{"type":"integer","description":"Input text tokens, including tokens converted from the prompt enhancement cost.","uniqueKey":"oneOf.3.usage.input_tokens_details.text_tokens","typeLabel":"integer"},"image_tokens":{"type":"integer","description":"Input reference image tokens; 0 for text-to-image.","uniqueKey":"oneOf.3.usage.input_tokens_details.image_tokens","typeLabel":"integer"}},"uniqueKey":"oneOf.3.usage.input_tokens_details","typeLabel":"object"},"output_tokens_details":{"type":"object","properties":{"image_tokens":{"type":"integer","description":"Tokens of the output images.","uniqueKey":"oneOf.3.usage.output_tokens_details.image_tokens","typeLabel":"integer"}},"uniqueKey":"oneOf.3.usage.output_tokens_details","typeLabel":"object"}},"uniqueKey":"oneOf.3.usage","typeLabel":"object"},"request_id":{"type":"string","description":"Request ID (the trace ID). Provide it when reporting an issue.","uniqueKey":"oneOf.3.request_id","typeLabel":"string"}},"uniqueKey":"oneOf.3","typeLabel":"error · object"}],"uniqueKey":"","typeLabel":"partial_succeeded · object | partial_failed · object | completed · object | error · object"},"examples":{"Single image succeeded":{"title":"Single image succeeded","value":{"type":"image_edit.partial_succeeded","created":1792308690,"model":"MiniMax-H3-Image","image_index":1,"url":"https://example.com/h3-image/output-1.jpg","size":"5440x3072","output_format":"jpeg","revised_prompt":"Replace the orange cat in image 1 with the Shiba Inu from image 2, sitting on the windowsill looking out, keeping the original lighting and background"}},"Single image failed":{"title":"Single image failed","value":{"type":"image_edit.partial_failed","created":1792308691,"model":"MiniMax-H3-Image","image_index":2,"code":"1027","message":"output image failed content safety check"}},"All done":{"title":"All done","value":{"type":"image_edit.completed","created":1792308695,"model":"MiniMax-H3-Image","usage":{"generated_images":2,"total_tokens":80450,"input_tokens":47810,"output_tokens":32640,"input_tokens_details":{"text_tokens":24186,"image_tokens":23624},"output_tokens_details":{"image_tokens":32640}},"request_id":"021792308678142a2c883cf675b9804d"}},"Request failed":{"title":"Request failed","value":{"type":"error","error":{"type":"server_error","message":"internal error (1000)","http_code":"500"},"usage":{"generated_images":0,"total_tokens":0,"input_tokens":0,"output_tokens":0,"input_tokens_details":{"text_tokens":0,"image_tokens":0},"output_tokens_details":{"image_tokens":0}},"request_id":"021792308678142a2c883cf675b9804d"}}},"exampleType":"examples"}},"exampleType":"examples"},"5018ed30-83e6-49f3-bf10-41546ce968ca":{"description":"Invalid parameters","content":{"application/json":{"schema":{"type":"object","description":"Error response. The HTTP status code is the error code.\n\nIf all images fail, `created`, `data` (per-image failure reasons), and `usage` are also returned: 422 if all failed the content safety check, 402 if all failed due to insufficient balance, otherwise 500.","properties":{"type":{"type":"string","description":"Always `error`.","example":"error","uniqueKey":"type","typeLabel":"string"},"error":{"type":"object","properties":{"type":{"type":"string","description":"Error type: `bad_request_error` (400) / `authorized_error` (401) / `insufficient_balance_error` (402) / `unprocessable_entity_error` (422) / `rate_limit_error` (429) / `server_error` (500), etc.","uniqueKey":"error.type","typeLabel":"string"},"message":{"type":"string","description":"Error detail; the trailing parenthesis holds the internal error code (e.g. `... (2013)`). See [Error Codes](/api-reference/errorcode).","uniqueKey":"error.message","typeLabel":"string"},"http_code":{"type":"string","description":"HTTP status code as a string, e.g. `400`.","uniqueKey":"error.http_code","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"},"created":{"type":"integer","description":"Unix timestamp (seconds). Returned only when all images fail.","uniqueKey":"created","typeLabel":"integer"},"data":{"type":"array","description":"Per-image failure reasons. Returned only when all images fail.","items":{"type":"object","properties":{"url":{"type":"string","description":"Image URL, returned when `response_format` is `url`.","uniqueKey":"data.items.[INDEX].url","typeLabel":"string"},"b64_json":{"type":"string","description":"Base64-encoded image data. Returned when `response_format` is `b64_json`.","uniqueKey":"data.items.[INDEX].b64_json","typeLabel":"string"},"size":{"type":"string","description":"Actual image size, formatted as `WIDTHxHEIGHT`.","uniqueKey":"data.items.[INDEX].size","typeLabel":"string"},"revised_prompt":{"type":"string","description":"The prompt actually used to generate this image, i.e. the enhanced prompt.","uniqueKey":"data.items.[INDEX].revised_prompt","typeLabel":"string"},"error":{"type":"object","description":"Error for this image, returned only when it fails.","properties":{"code":{"type":"string","description":"Error code for this image. Common values: `1000` generation failed, `1001` timed out, `1008` insufficient balance, `1026` enhanced prompt failed the content safety check, `1027` generated image failed the content safety check. See [Error Codes](/api-reference/errorcode) for the full list.","uniqueKey":"data.items.[INDEX].error.code","typeLabel":"string"},"message":{"type":"string","description":"Error detail.","uniqueKey":"data.items.[INDEX].error.message","typeLabel":"string"}},"uniqueKey":"data.items.[INDEX].error","typeLabel":"object"}},"uniqueKey":"data.items.[INDEX]","typeLabel":"object"},"uniqueKey":"data","typeLabel":"object[]"},"usage":{"type":"object","description":"Returned only when all images fail.","properties":{"generated_images":{"type":"integer","description":"Number of images generated successfully; may be less than `n`.","uniqueKey":"usage.generated_images","typeLabel":"integer"},"total_tokens":{"type":"integer","description":"Total tokens.","uniqueKey":"usage.total_tokens","typeLabel":"integer"},"input_tokens":{"type":"integer","description":"Input tokens (text and reference images).","uniqueKey":"usage.input_tokens","typeLabel":"integer"},"output_tokens":{"type":"integer","description":"Output tokens (generated images).","uniqueKey":"usage.output_tokens","typeLabel":"integer"},"input_tokens_details":{"type":"object","properties":{"text_tokens":{"type":"integer","description":"Input text tokens, including tokens converted from the prompt enhancement cost.","uniqueKey":"usage.input_tokens_details.text_tokens","typeLabel":"integer"},"image_tokens":{"type":"integer","description":"Input reference image tokens; 0 for text-to-image.","uniqueKey":"usage.input_tokens_details.image_tokens","typeLabel":"integer"}},"uniqueKey":"usage.input_tokens_details","typeLabel":"object"},"output_tokens_details":{"type":"object","properties":{"image_tokens":{"type":"integer","description":"Tokens of the output images.","uniqueKey":"usage.output_tokens_details.image_tokens","typeLabel":"integer"}},"uniqueKey":"usage.output_tokens_details","typeLabel":"object"}},"uniqueKey":"usage","typeLabel":"object"},"request_id":{"type":"string","description":"Request ID (the trace ID). Provide it when reporting an issue.","uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"invalid_size":{"title":"invalid_size","value":{"type":"error","error":{"type":"bad_request_error","message":"invalid params, images must contain at most 16 items (2013)","http_code":"400"},"request_id":"021792308678142a2c883cf675b9804d"}},"b64_json":{"title":"b64_json","value":{"type":"error","error":{"type":"bad_request_error","message":"invalid params, b64_json total output area (n x width x height) 33554432 exceeds 20000000 for png, use url or jpeg/webp instead (2013)","http_code":"400"},"request_id":"021792308678142a2c883cf675b9804d"}}},"exampleType":"examples"}},"exampleType":"examples"},"5259e2ff-1605-49cf-a64e-788ac1646ff0":{"description":"Authentication failed","content":{"application/json":{"schema":{"type":"object","description":"Error response. The HTTP status code is the error code.\n\nIf all images fail, `created`, `data` (per-image failure reasons), and `usage` are also returned: 422 if all failed the content safety check, 402 if all failed due to insufficient balance, otherwise 500.","properties":{"type":{"type":"string","description":"Always `error`.","example":"error","uniqueKey":"type","typeLabel":"string"},"error":{"type":"object","properties":{"type":{"type":"string","description":"Error type: `bad_request_error` (400) / `authorized_error` (401) / `insufficient_balance_error` (402) / `unprocessable_entity_error` (422) / `rate_limit_error` (429) / `server_error` (500), etc.","uniqueKey":"error.type","typeLabel":"string"},"message":{"type":"string","description":"Error detail; the trailing parenthesis holds the internal error code (e.g. `... (2013)`). See [Error Codes](/api-reference/errorcode).","uniqueKey":"error.message","typeLabel":"string"},"http_code":{"type":"string","description":"HTTP status code as a string, e.g. `400`.","uniqueKey":"error.http_code","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"},"created":{"type":"integer","description":"Unix timestamp (seconds). Returned only when all images fail.","uniqueKey":"created","typeLabel":"integer"},"data":{"type":"array","description":"Per-image failure reasons. Returned only when all images fail.","items":{"type":"object","properties":{"url":{"type":"string","description":"Image URL, returned when `response_format` is `url`.","uniqueKey":"data.items.[INDEX].url","typeLabel":"string"},"b64_json":{"type":"string","description":"Base64-encoded image data. Returned when `response_format` is `b64_json`.","uniqueKey":"data.items.[INDEX].b64_json","typeLabel":"string"},"size":{"type":"string","description":"Actual image size, formatted as `WIDTHxHEIGHT`.","uniqueKey":"data.items.[INDEX].size","typeLabel":"string"},"revised_prompt":{"type":"string","description":"The prompt actually used to generate this image, i.e. the enhanced prompt.","uniqueKey":"data.items.[INDEX].revised_prompt","typeLabel":"string"},"error":{"type":"object","description":"Error for this image, returned only when it fails.","properties":{"code":{"type":"string","description":"Error code for this image. Common values: `1000` generation failed, `1001` timed out, `1008` insufficient balance, `1026` enhanced prompt failed the content safety check, `1027` generated image failed the content safety check. See [Error Codes](/api-reference/errorcode) for the full list.","uniqueKey":"data.items.[INDEX].error.code","typeLabel":"string"},"message":{"type":"string","description":"Error detail.","uniqueKey":"data.items.[INDEX].error.message","typeLabel":"string"}},"uniqueKey":"data.items.[INDEX].error","typeLabel":"object"}},"uniqueKey":"data.items.[INDEX]","typeLabel":"object"},"uniqueKey":"data","typeLabel":"object[]"},"usage":{"type":"object","description":"Returned only when all images fail.","properties":{"generated_images":{"type":"integer","description":"Number of images generated successfully; may be less than `n`.","uniqueKey":"usage.generated_images","typeLabel":"integer"},"total_tokens":{"type":"integer","description":"Total tokens.","uniqueKey":"usage.total_tokens","typeLabel":"integer"},"input_tokens":{"type":"integer","description":"Input tokens (text and reference images).","uniqueKey":"usage.input_tokens","typeLabel":"integer"},"output_tokens":{"type":"integer","description":"Output tokens (generated images).","uniqueKey":"usage.output_tokens","typeLabel":"integer"},"input_tokens_details":{"type":"object","properties":{"text_tokens":{"type":"integer","description":"Input text tokens, including tokens converted from the prompt enhancement cost.","uniqueKey":"usage.input_tokens_details.text_tokens","typeLabel":"integer"},"image_tokens":{"type":"integer","description":"Input reference image tokens; 0 for text-to-image.","uniqueKey":"usage.input_tokens_details.image_tokens","typeLabel":"integer"}},"uniqueKey":"usage.input_tokens_details","typeLabel":"object"},"output_tokens_details":{"type":"object","properties":{"image_tokens":{"type":"integer","description":"Tokens of the output images.","uniqueKey":"usage.output_tokens_details.image_tokens","typeLabel":"integer"}},"uniqueKey":"usage.output_tokens_details","typeLabel":"object"}},"uniqueKey":"usage","typeLabel":"object"},"request_id":{"type":"string","description":"Request ID (the trace ID). Provide it when reporting an issue.","uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"example":{"type":"error","error":{"type":"authorized_error","message":"login fail: Please carry the API secret key in the 'Authorization' field of the request header (1004)","http_code":"401"},"request_id":"021792308678142a2c883cf675b9804d"},"examples":{"Example":{"title":"Example","value":{"type":"error","error":{"type":"authorized_error","message":"login fail: Please carry the API secret key in the 'Authorization' field of the request header (1004)","http_code":"401"},"request_id":"021792308678142a2c883cf675b9804d"}}},"exampleType":"examples"}},"exampleType":"examples"},"9a68fa73-c508-4e17-9300-06ce5bdc3fc5":{"description":"Insufficient balance or plan quota. The error code is in the parentheses at the end of `error.message`:\n\n- `1008`: insufficient balance\n- `2053`: insufficient credit\n- `2067`: usage limit reached and credit auto consumption is off\n- `2068`: the current plan tier does not support this model","content":{"application/json":{"schema":{"type":"object","description":"Error response. The HTTP status code is the error code.\n\nIf all images fail, `created`, `data` (per-image failure reasons), and `usage` are also returned: 422 if all failed the content safety check, 402 if all failed due to insufficient balance, otherwise 500.","properties":{"type":{"type":"string","description":"Always `error`.","example":"error","uniqueKey":"type","typeLabel":"string"},"error":{"type":"object","properties":{"type":{"type":"string","description":"Error type: `bad_request_error` (400) / `authorized_error` (401) / `insufficient_balance_error` (402) / `unprocessable_entity_error` (422) / `rate_limit_error` (429) / `server_error` (500), etc.","uniqueKey":"error.type","typeLabel":"string"},"message":{"type":"string","description":"Error detail; the trailing parenthesis holds the internal error code (e.g. `... (2013)`). See [Error Codes](/api-reference/errorcode).","uniqueKey":"error.message","typeLabel":"string"},"http_code":{"type":"string","description":"HTTP status code as a string, e.g. `400`.","uniqueKey":"error.http_code","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"},"created":{"type":"integer","description":"Unix timestamp (seconds). Returned only when all images fail.","uniqueKey":"created","typeLabel":"integer"},"data":{"type":"array","description":"Per-image failure reasons. Returned only when all images fail.","items":{"type":"object","properties":{"url":{"type":"string","description":"Image URL, returned when `response_format` is `url`.","uniqueKey":"data.items.[INDEX].url","typeLabel":"string"},"b64_json":{"type":"string","description":"Base64-encoded image data. Returned when `response_format` is `b64_json`.","uniqueKey":"data.items.[INDEX].b64_json","typeLabel":"string"},"size":{"type":"string","description":"Actual image size, formatted as `WIDTHxHEIGHT`.","uniqueKey":"data.items.[INDEX].size","typeLabel":"string"},"revised_prompt":{"type":"string","description":"The prompt actually used to generate this image, i.e. the enhanced prompt.","uniqueKey":"data.items.[INDEX].revised_prompt","typeLabel":"string"},"error":{"type":"object","description":"Error for this image, returned only when it fails.","properties":{"code":{"type":"string","description":"Error code for this image. Common values: `1000` generation failed, `1001` timed out, `1008` insufficient balance, `1026` enhanced prompt failed the content safety check, `1027` generated image failed the content safety check. See [Error Codes](/api-reference/errorcode) for the full list.","uniqueKey":"data.items.[INDEX].error.code","typeLabel":"string"},"message":{"type":"string","description":"Error detail.","uniqueKey":"data.items.[INDEX].error.message","typeLabel":"string"}},"uniqueKey":"data.items.[INDEX].error","typeLabel":"object"}},"uniqueKey":"data.items.[INDEX]","typeLabel":"object"},"uniqueKey":"data","typeLabel":"object[]"},"usage":{"type":"object","description":"Returned only when all images fail.","properties":{"generated_images":{"type":"integer","description":"Number of images generated successfully; may be less than `n`.","uniqueKey":"usage.generated_images","typeLabel":"integer"},"total_tokens":{"type":"integer","description":"Total tokens.","uniqueKey":"usage.total_tokens","typeLabel":"integer"},"input_tokens":{"type":"integer","description":"Input tokens (text and reference images).","uniqueKey":"usage.input_tokens","typeLabel":"integer"},"output_tokens":{"type":"integer","description":"Output tokens (generated images).","uniqueKey":"usage.output_tokens","typeLabel":"integer"},"input_tokens_details":{"type":"object","properties":{"text_tokens":{"type":"integer","description":"Input text tokens, including tokens converted from the prompt enhancement cost.","uniqueKey":"usage.input_tokens_details.text_tokens","typeLabel":"integer"},"image_tokens":{"type":"integer","description":"Input reference image tokens; 0 for text-to-image.","uniqueKey":"usage.input_tokens_details.image_tokens","typeLabel":"integer"}},"uniqueKey":"usage.input_tokens_details","typeLabel":"object"},"output_tokens_details":{"type":"object","properties":{"image_tokens":{"type":"integer","description":"Tokens of the output images.","uniqueKey":"usage.output_tokens_details.image_tokens","typeLabel":"integer"}},"uniqueKey":"usage.output_tokens_details","typeLabel":"object"}},"uniqueKey":"usage","typeLabel":"object"},"request_id":{"type":"string","description":"Request ID (the trace ID). Provide it when reporting an issue.","uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"example":{"type":"error","error":{"type":"insufficient_balance_error","message":"insufficient balance (1008)","http_code":"402"},"request_id":"021792308678142a2c883cf675b9804d"},"examples":{"Example":{"title":"Example","value":{"type":"error","error":{"type":"insufficient_balance_error","message":"insufficient balance (1008)","http_code":"402"},"request_id":"021792308678142a2c883cf675b9804d"}}},"exampleType":"examples"}},"exampleType":"examples"},"4b8db614-e2b3-4b24-b4d0-ba20f12ed16c":{"description":"Input contains sensitive content / All images withheld by the content safety check","content":{"application/json":{"schema":{"type":"object","description":"Error response. The HTTP status code is the error code.\n\nIf all images fail, `created`, `data` (per-image failure reasons), and `usage` are also returned: 422 if all failed the content safety check, 402 if all failed due to insufficient balance, otherwise 500.","properties":{"type":{"type":"string","description":"Always `error`.","example":"error","uniqueKey":"type","typeLabel":"string"},"error":{"type":"object","properties":{"type":{"type":"string","description":"Error type: `bad_request_error` (400) / `authorized_error` (401) / `insufficient_balance_error` (402) / `unprocessable_entity_error` (422) / `rate_limit_error` (429) / `server_error` (500), etc.","uniqueKey":"error.type","typeLabel":"string"},"message":{"type":"string","description":"Error detail; the trailing parenthesis holds the internal error code (e.g. `... (2013)`). See [Error Codes](/api-reference/errorcode).","uniqueKey":"error.message","typeLabel":"string"},"http_code":{"type":"string","description":"HTTP status code as a string, e.g. `400`.","uniqueKey":"error.http_code","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"},"created":{"type":"integer","description":"Unix timestamp (seconds). Returned only when all images fail.","uniqueKey":"created","typeLabel":"integer"},"data":{"type":"array","description":"Per-image failure reasons. Returned only when all images fail.","items":{"type":"object","properties":{"url":{"type":"string","description":"Image URL, returned when `response_format` is `url`.","uniqueKey":"data.items.[INDEX].url","typeLabel":"string"},"b64_json":{"type":"string","description":"Base64-encoded image data. Returned when `response_format` is `b64_json`.","uniqueKey":"data.items.[INDEX].b64_json","typeLabel":"string"},"size":{"type":"string","description":"Actual image size, formatted as `WIDTHxHEIGHT`.","uniqueKey":"data.items.[INDEX].size","typeLabel":"string"},"revised_prompt":{"type":"string","description":"The prompt actually used to generate this image, i.e. the enhanced prompt.","uniqueKey":"data.items.[INDEX].revised_prompt","typeLabel":"string"},"error":{"type":"object","description":"Error for this image, returned only when it fails.","properties":{"code":{"type":"string","description":"Error code for this image. Common values: `1000` generation failed, `1001` timed out, `1008` insufficient balance, `1026` enhanced prompt failed the content safety check, `1027` generated image failed the content safety check. See [Error Codes](/api-reference/errorcode) for the full list.","uniqueKey":"data.items.[INDEX].error.code","typeLabel":"string"},"message":{"type":"string","description":"Error detail.","uniqueKey":"data.items.[INDEX].error.message","typeLabel":"string"}},"uniqueKey":"data.items.[INDEX].error","typeLabel":"object"}},"uniqueKey":"data.items.[INDEX]","typeLabel":"object"},"uniqueKey":"data","typeLabel":"object[]"},"usage":{"type":"object","description":"Returned only when all images fail.","properties":{"generated_images":{"type":"integer","description":"Number of images generated successfully; may be less than `n`.","uniqueKey":"usage.generated_images","typeLabel":"integer"},"total_tokens":{"type":"integer","description":"Total tokens.","uniqueKey":"usage.total_tokens","typeLabel":"integer"},"input_tokens":{"type":"integer","description":"Input tokens (text and reference images).","uniqueKey":"usage.input_tokens","typeLabel":"integer"},"output_tokens":{"type":"integer","description":"Output tokens (generated images).","uniqueKey":"usage.output_tokens","typeLabel":"integer"},"input_tokens_details":{"type":"object","properties":{"text_tokens":{"type":"integer","description":"Input text tokens, including tokens converted from the prompt enhancement cost.","uniqueKey":"usage.input_tokens_details.text_tokens","typeLabel":"integer"},"image_tokens":{"type":"integer","description":"Input reference image tokens; 0 for text-to-image.","uniqueKey":"usage.input_tokens_details.image_tokens","typeLabel":"integer"}},"uniqueKey":"usage.input_tokens_details","typeLabel":"object"},"output_tokens_details":{"type":"object","properties":{"image_tokens":{"type":"integer","description":"Tokens of the output images.","uniqueKey":"usage.output_tokens_details.image_tokens","typeLabel":"integer"}},"uniqueKey":"usage.output_tokens_details","typeLabel":"object"}},"uniqueKey":"usage","typeLabel":"object"},"request_id":{"type":"string","description":"Request ID (the trace ID). Provide it when reporting an issue.","uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"input_sensitive":{"title":"input_sensitive","value":{"type":"error","error":{"type":"unprocessable_entity_error","message":"input content failed safety check: prompt (1026)","http_code":"422"},"request_id":"021792308678142a2c883cf675b9804d"}},"all_images_failed":{"title":"all_images_failed","value":{"type":"error","error":{"type":"unprocessable_entity_error","message":"no image generated: all 2 images failed content safety check (1027)","http_code":"422"},"created":1792308678,"data":[{"error":{"code":"1027","message":"output image failed content safety check"}},{"error":{"code":"1027","message":"output image failed content safety check"}}],"usage":{"generated_images":0,"total_tokens":0,"input_tokens":0,"output_tokens":0,"input_tokens_details":{"text_tokens":0,"image_tokens":0},"output_tokens_details":{"image_tokens":0}},"request_id":"021792308678142a2c883cf675b9804d"}}},"exampleType":"examples"}},"exampleType":"examples"},"3a502805-bca0-4635-b57e-e28cd8929339":{"description":"Rate limited. The error code is in the parentheses at the end of `error.message`:\n\n- `1002`: the images-per-minute (IPM) limit is exceeded; each request counts as `n` images\n- `2056`: the M Plan usage limit is reached","content":{"application/json":{"schema":{"type":"object","description":"Error response. The HTTP status code is the error code.\n\nIf all images fail, `created`, `data` (per-image failure reasons), and `usage` are also returned: 422 if all failed the content safety check, 402 if all failed due to insufficient balance, otherwise 500.","properties":{"type":{"type":"string","description":"Always `error`.","example":"error","uniqueKey":"type","typeLabel":"string"},"error":{"type":"object","properties":{"type":{"type":"string","description":"Error type: `bad_request_error` (400) / `authorized_error` (401) / `insufficient_balance_error` (402) / `unprocessable_entity_error` (422) / `rate_limit_error` (429) / `server_error` (500), etc.","uniqueKey":"error.type","typeLabel":"string"},"message":{"type":"string","description":"Error detail; the trailing parenthesis holds the internal error code (e.g. `... (2013)`). See [Error Codes](/api-reference/errorcode).","uniqueKey":"error.message","typeLabel":"string"},"http_code":{"type":"string","description":"HTTP status code as a string, e.g. `400`.","uniqueKey":"error.http_code","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"},"created":{"type":"integer","description":"Unix timestamp (seconds). Returned only when all images fail.","uniqueKey":"created","typeLabel":"integer"},"data":{"type":"array","description":"Per-image failure reasons. Returned only when all images fail.","items":{"type":"object","properties":{"url":{"type":"string","description":"Image URL, returned when `response_format` is `url`.","uniqueKey":"data.items.[INDEX].url","typeLabel":"string"},"b64_json":{"type":"string","description":"Base64-encoded image data. Returned when `response_format` is `b64_json`.","uniqueKey":"data.items.[INDEX].b64_json","typeLabel":"string"},"size":{"type":"string","description":"Actual image size, formatted as `WIDTHxHEIGHT`.","uniqueKey":"data.items.[INDEX].size","typeLabel":"string"},"revised_prompt":{"type":"string","description":"The prompt actually used to generate this image, i.e. the enhanced prompt.","uniqueKey":"data.items.[INDEX].revised_prompt","typeLabel":"string"},"error":{"type":"object","description":"Error for this image, returned only when it fails.","properties":{"code":{"type":"string","description":"Error code for this image. Common values: `1000` generation failed, `1001` timed out, `1008` insufficient balance, `1026` enhanced prompt failed the content safety check, `1027` generated image failed the content safety check. See [Error Codes](/api-reference/errorcode) for the full list.","uniqueKey":"data.items.[INDEX].error.code","typeLabel":"string"},"message":{"type":"string","description":"Error detail.","uniqueKey":"data.items.[INDEX].error.message","typeLabel":"string"}},"uniqueKey":"data.items.[INDEX].error","typeLabel":"object"}},"uniqueKey":"data.items.[INDEX]","typeLabel":"object"},"uniqueKey":"data","typeLabel":"object[]"},"usage":{"type":"object","description":"Returned only when all images fail.","properties":{"generated_images":{"type":"integer","description":"Number of images generated successfully; may be less than `n`.","uniqueKey":"usage.generated_images","typeLabel":"integer"},"total_tokens":{"type":"integer","description":"Total tokens.","uniqueKey":"usage.total_tokens","typeLabel":"integer"},"input_tokens":{"type":"integer","description":"Input tokens (text and reference images).","uniqueKey":"usage.input_tokens","typeLabel":"integer"},"output_tokens":{"type":"integer","description":"Output tokens (generated images).","uniqueKey":"usage.output_tokens","typeLabel":"integer"},"input_tokens_details":{"type":"object","properties":{"text_tokens":{"type":"integer","description":"Input text tokens, including tokens converted from the prompt enhancement cost.","uniqueKey":"usage.input_tokens_details.text_tokens","typeLabel":"integer"},"image_tokens":{"type":"integer","description":"Input reference image tokens; 0 for text-to-image.","uniqueKey":"usage.input_tokens_details.image_tokens","typeLabel":"integer"}},"uniqueKey":"usage.input_tokens_details","typeLabel":"object"},"output_tokens_details":{"type":"object","properties":{"image_tokens":{"type":"integer","description":"Tokens of the output images.","uniqueKey":"usage.output_tokens_details.image_tokens","typeLabel":"integer"}},"uniqueKey":"usage.output_tokens_details","typeLabel":"object"}},"uniqueKey":"usage","typeLabel":"object"},"request_id":{"type":"string","description":"Request ID (the trace ID). Provide it when reporting an issue.","uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"example":{"type":"error","error":{"type":"rate_limit_error","message":"rate limit exceeded(IPM) (1002)","http_code":"429"},"request_id":"021792308678142a2c883cf675b9804d"},"examples":{"Example":{"title":"Example","value":{"type":"error","error":{"type":"rate_limit_error","message":"rate limit exceeded(IPM) (1002)","http_code":"429"},"request_id":"021792308678142a2c883cf675b9804d"}}},"exampleType":"examples"}},"exampleType":"examples"},"f40805fd-2944-4b62-8f60-f9e653f1041b":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","description":"Error response. The HTTP status code is the error code.\n\nIf all images fail, `created`, `data` (per-image failure reasons), and `usage` are also returned: 422 if all failed the content safety check, 402 if all failed due to insufficient balance, otherwise 500.","properties":{"type":{"type":"string","description":"Always `error`.","example":"error","uniqueKey":"type","typeLabel":"string"},"error":{"type":"object","properties":{"type":{"type":"string","description":"Error type: `bad_request_error` (400) / `authorized_error` (401) / `insufficient_balance_error` (402) / `unprocessable_entity_error` (422) / `rate_limit_error` (429) / `server_error` (500), etc.","uniqueKey":"error.type","typeLabel":"string"},"message":{"type":"string","description":"Error detail; the trailing parenthesis holds the internal error code (e.g. `... (2013)`). See [Error Codes](/api-reference/errorcode).","uniqueKey":"error.message","typeLabel":"string"},"http_code":{"type":"string","description":"HTTP status code as a string, e.g. `400`.","uniqueKey":"error.http_code","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"},"created":{"type":"integer","description":"Unix timestamp (seconds). Returned only when all images fail.","uniqueKey":"created","typeLabel":"integer"},"data":{"type":"array","description":"Per-image failure reasons. Returned only when all images fail.","items":{"type":"object","properties":{"url":{"type":"string","description":"Image URL, returned when `response_format` is `url`.","uniqueKey":"data.items.[INDEX].url","typeLabel":"string"},"b64_json":{"type":"string","description":"Base64-encoded image data. Returned when `response_format` is `b64_json`.","uniqueKey":"data.items.[INDEX].b64_json","typeLabel":"string"},"size":{"type":"string","description":"Actual image size, formatted as `WIDTHxHEIGHT`.","uniqueKey":"data.items.[INDEX].size","typeLabel":"string"},"revised_prompt":{"type":"string","description":"The prompt actually used to generate this image, i.e. the enhanced prompt.","uniqueKey":"data.items.[INDEX].revised_prompt","typeLabel":"string"},"error":{"type":"object","description":"Error for this image, returned only when it fails.","properties":{"code":{"type":"string","description":"Error code for this image. Common values: `1000` generation failed, `1001` timed out, `1008` insufficient balance, `1026` enhanced prompt failed the content safety check, `1027` generated image failed the content safety check. See [Error Codes](/api-reference/errorcode) for the full list.","uniqueKey":"data.items.[INDEX].error.code","typeLabel":"string"},"message":{"type":"string","description":"Error detail.","uniqueKey":"data.items.[INDEX].error.message","typeLabel":"string"}},"uniqueKey":"data.items.[INDEX].error","typeLabel":"object"}},"uniqueKey":"data.items.[INDEX]","typeLabel":"object"},"uniqueKey":"data","typeLabel":"object[]"},"usage":{"type":"object","description":"Returned only when all images fail.","properties":{"generated_images":{"type":"integer","description":"Number of images generated successfully; may be less than `n`.","uniqueKey":"usage.generated_images","typeLabel":"integer"},"total_tokens":{"type":"integer","description":"Total tokens.","uniqueKey":"usage.total_tokens","typeLabel":"integer"},"input_tokens":{"type":"integer","description":"Input tokens (text and reference images).","uniqueKey":"usage.input_tokens","typeLabel":"integer"},"output_tokens":{"type":"integer","description":"Output tokens (generated images).","uniqueKey":"usage.output_tokens","typeLabel":"integer"},"input_tokens_details":{"type":"object","properties":{"text_tokens":{"type":"integer","description":"Input text tokens, including tokens converted from the prompt enhancement cost.","uniqueKey":"usage.input_tokens_details.text_tokens","typeLabel":"integer"},"image_tokens":{"type":"integer","description":"Input reference image tokens; 0 for text-to-image.","uniqueKey":"usage.input_tokens_details.image_tokens","typeLabel":"integer"}},"uniqueKey":"usage.input_tokens_details","typeLabel":"object"},"output_tokens_details":{"type":"object","properties":{"image_tokens":{"type":"integer","description":"Tokens of the output images.","uniqueKey":"usage.output_tokens_details.image_tokens","typeLabel":"integer"}},"uniqueKey":"usage.output_tokens_details","typeLabel":"object"}},"uniqueKey":"usage","typeLabel":"object"},"request_id":{"type":"string","description":"Request ID (the trace ID). Provide it when reporting an issue.","uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"server_error":{"title":"server_error","value":{"type":"error","error":{"type":"server_error","message":"internal error (1000)","http_code":"500"},"request_id":"021792308678142a2c883cf675b9804d"}},"all_images_failed":{"title":"all_images_failed","value":{"type":"error","error":{"type":"server_error","message":"no image generated: 1 x 1027, 1 x 1000 (1000)","http_code":"500"},"created":1792308678,"data":[{"error":{"code":"1027","message":"output image failed content safety check"}},{"error":{"code":"1000","message":"image generation failed"}}],"usage":{"generated_images":0,"total_tokens":0,"input_tokens":0,"output_tokens":0,"input_tokens_details":{"text_tokens":0,"image_tokens":0},"output_tokens_details":{"image_tokens":0}},"request_id":"021792308678142a2c883cf675b9804d"}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"ca48c875-1e36-4a31-9c4a-7aa4e6099eba":{"bearerAuth":{"type":"http","scheme":"bearer","description":"`HTTP: Bearer Auth`\n- Security Scheme Type: http\n- HTTP Authorization Scheme: `Bearer API_key`, used to verify account information, can be found in [Account Management>API Keys](https://platform.minimax.io/user-center/basic-information/interface-key).","scopes":[],"schemeName":"bearerAuth"}}},"servers":{"d2792867-ee94-41d9-a7b4-0f7233306d80":{"url":"https://api.minimax.io"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"`HTTP: Bearer Auth`\n- Security Scheme Type: http\n- HTTP Authorization Scheme: `Bearer API_key`, used to verify account information, can be found in [Account Management>API Keys](https://platform.minimax.io/user-center/basic-information/interface-key).","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"`HTTP: Bearer Auth`\n- Security Scheme Type: http\n- HTTP Authorization Scheme: `Bearer API_key`, used to verify account information, can be found in [Account Management>API Keys](https://platform.minimax.io/user-center/basic-information/interface-key).","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"api-reference/image/generation/api/h3-image-edits.json"},"subdomain":"minimax-cac98058","siteName":"MiniMax API Docs","title":"Image Edit - MiniMax API Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-10T12:56:24.457Z","originalFileLocation":"api-reference/image-generation-h3-edits.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Generate new images from 1 to 16 reference images and a text description with MiniMax-H3-Image.\">\u003cmeta data-mint-head name=\"application-name\" content=\"MiniMax API Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/minimax-cac98058/-WSO_KEoennf5XoM/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/minimax-cac98058/-WSO_KEoennf5XoM/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/minimax-cac98058/-WSO_KEoennf5XoM/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/minimax-cac98058/-WSO_KEoennf5XoM/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/minimax-cac98058/-WSO_KEoennf5XoM/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/minimax-cac98058/-WSO_KEoennf5XoM/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/minimax-cac98058/-WSO_KEoennf5XoM/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/minimax-cac98058/-WSO_KEoennf5XoM/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/minimax-cac98058/-WSO_KEoennf5XoM/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Image Edit - MiniMax API Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Generate new images from 1 to 16 reference images and a text description with MiniMax-H3-Image.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"MiniMax API Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://platform.minimax.io/docs/api-reference/image-generation-h3-edits\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://minimax-cac98058.mintlify.site/docs/_mintlify/api/og/v2?division=MiniMax-H3-Image\u0026amp;title=Image+Edit\u0026amp;description=Generate+new+images+from+1+to+16+reference+images+and+a+text+description+with+MiniMax-H3-Image.\u0026amp;theme=329045bc9618e343e09b4393\u0026amp;signature=2adfd286b4a5097143737791aae352cefca59e553f70ff5edfb728470349b9cd\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Image Edit - MiniMax API Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Generate new images from 1 to 16 reference images and a text description with MiniMax-H3-Image.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://minimax-cac98058.mintlify.site/docs/_mintlify/api/og/v2?division=MiniMax-H3-Image\u0026amp;title=Image+Edit\u0026amp;description=Generate+new+images+from+1+to+16+reference+images+and+a+text+description+with+MiniMax-H3-Image.\u0026amp;theme=329045bc9618e343e09b4393\u0026amp;signature=2adfd286b4a5097143737791aae352cefca59e553f70ff5edfb728470349b9cd\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/minimax-cac98058/-WSO_KEoennf5XoM/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"MiniMax API Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#181E25\">\u003cmeta data-mint-head name=\"charset\" content=\"UTF-8\">\u003cmeta data-mint-head name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\u003clink data-mint-head rel=\"canonical\" href=\"https://platform.minimax.io/docs/api-reference/image-generation-h3-edits\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/api-reference/image-generation-h3-edits.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://platform.minimax.io/#organization\",\"name\":\"MiniMax API Docs\",\"url\":\"https://platform.minimax.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/minimax-cac98058/XYzsL2L2ynonu2Q_/logo/light.svg?fit=max\u0026auto=format\u0026n=XYzsL2L2ynonu2Q_\u0026q=85\u0026s=9c99bb2678d62388d8a4e7cce1750858\"}},{\"@type\":\"WebSite\",\"@id\":\"https://platform.minimax.io/docs#website\",\"name\":\"MiniMax API Docs\",\"url\":\"https://platform.minimax.io/docs\",\"publisher\":{\"@id\":\"https://platform.minimax.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://platform.minimax.io/docs/api-reference/image-generation-h3-edits#webpage\",\"url\":\"https://platform.minimax.io/docs/api-reference/image-generation-h3-edits\",\"name\":\"Image Edit\",\"description\":\"Generate new images from 1 to 16 reference images and a text description with MiniMax-H3-Image.\",\"dateModified\":\"2026-11-10T12:56:24.457Z\",\"isPartOf\":{\"@id\":\"https://platform.minimax.io/docs#website\"},\"breadcrumb\":{\"@id\":\"https://platform.minimax.io/docs/api-reference/image-generation-h3-edits#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://platform.minimax.io/docs/api-reference/image-generation-h3-edits#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Image\",\"item\":\"https://platform.minimax.io/docs/api-reference/image-generation-h3-generations\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"MiniMax-H3-Image\",\"item\":\"https://platform.minimax.io/docs/api-reference/image-generation-h3-generations\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Image Edit\",\"item\":\"https://platform.minimax.io/docs/api-reference/image-generation-h3-edits\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://platform.minimax.io/docs/api-reference/image-generation-h3-edits#apireference\",\"headline\":\"Image Edit\",\"name\":\"Image Edit\",\"description\":\"Generate new images from 1 to 16 reference images and a text description with MiniMax-H3-Image.\",\"url\":\"https://platform.minimax.io/docs/api-reference/image-generation-h3-edits\",\"mainEntityOfPage\":{\"@id\":\"https://platform.minimax.io/docs/api-reference/image-generation-h3-edits#webpage\"},\"dateModified\":\"2026-11-10T12:56:24.457Z\",\"publisher\":{\"@id\":\"https://platform.minimax.io/#organization\"},\"isPartOf\":{\"@id\":\"https://platform.minimax.io/docs#website\"}}]}\u003c/script>","siteName":"MiniMax API Docs","nav":{"global":null,"tabs":[{"tab":"Developer Guides","pages":[{"title":"Developer Guides","href":"/guides/models-intro"}]},{"tab":"API","groups":[{"group":"Using the API","pages":[{"title":"API Overview","sidebarTitle":"API Overview","href":"/api-reference/api-overview"},{"title":"Rate Limits","href":"/guides/rate-limits"},{"title":"Error Codes","sidebarTitle":"Error Code Reference","href":"/api-reference/errorcode"}]},{"group":"Text","icon":"text-align-start","pages":[{"title":"Anthropic SDK","sidebarTitle":"Anthropic SDK (Recommended)","href":"/api-reference/text-anthropic-api"},{"title":"OpenAI SDK","sidebarTitle":"OpenAI SDK","href":"/api-reference/text-openai-api"},{"title":"AI SDK","sidebarTitle":"AI SDK","href":"/api-reference/text-ai-sdk"},{"group":"Anthropic Messages API","pages":[{"title":"Create Message","sidebarTitle":"Create Message","openapi":"api-reference/text/api/openapi-chat-anthropic.json POST /anthropic/v1/messages","href":"/api-reference/text-chat-anthropic"}]},{"group":"OpenAI Chat Completions API","pages":[{"title":"Create Chat Completion","sidebarTitle":"Create Chat Completion","openapi":"api-reference/text/api/openapi-chat-openai.json POST /v1/chat/completions","href":"/api-reference/text-chat-openai"}]},{"group":"OpenAI Responses API","pages":[{"title":"Create Response","sidebarTitle":"Create Response","openapi":"api-reference/text/api/openapi-responses.json POST /v1/responses","href":"/api-reference/responses-create"},{"title":"Estimate Input Tokens","sidebarTitle":"Estimate Input Tokens","openapi":"api-reference/text/api/openapi-responses.json POST /v1/responses/input_tokens","href":"/api-reference/responses-input-tokens"}]}]},{"group":"Video","icon":"video","pages":[{"group":"MiniMax-H3","pages":[{"title":"Create Video Generation Task","sidebarTitle":"Create Video Generation Task","openapi":"api-reference/video/generation/api/v2-video-generation.json POST /v2/video_generation","href":"/api-reference/video-generation-v2-create"},{"title":"Query Task","sidebarTitle":"Query Task","openapi":"api-reference/video/generation/api/v2-video-generation.json GET /v2/query/video_generation/{task_id}","href":"/api-reference/video-generation-v2-query"},{"title":"List Tasks","sidebarTitle":"List Tasks","openapi":"api-reference/video/generation/api/v2-video-generation.json GET /v2/query/video_generation","href":"/api-reference/video-generation-v2-list"},{"title":"Cancel or Delete Task","sidebarTitle":"Cancel or Delete Task","openapi":"api-reference/video/generation/api/v2-video-generation.json DELETE /v2/video_generation/{task_id}","href":"/api-reference/video-generation-v2-delete"},{"title":"Create H3-Context-IR Task","sidebarTitle":"Create H3-Context-IR Task","openapi":"api-reference/video/generation/api/v2-video-generation.json POST /v2/h3_context_ir","href":"/api-reference/video-generation-v2-h3-context-ir"},{"title":"Create Video Regeneration Task","sidebarTitle":"Create Video Regeneration Task","openapi":"api-reference/video/generation/api/v2-video-generation.json POST /v2/video_regeneration","href":"/api-reference/video-generation-v2-regeneration"}]}]},{"group":"Image","icon":"image","pages":[{"group":"MiniMax-H3-Image","tag":"NEW","pages":[{"title":"Text-to-Image","sidebarTitle":"Text-to-Image","description":"Generate images from a text description with MiniMax-H3-Image. Supports `auto` or custom width and height, and up to 10 images per request.","openapi":"api-reference/image/generation/api/h3-image-generations.json POST /v1/images/generations","href":"/api-reference/image-generation-h3-generations"},{"title":"Image Edit","sidebarTitle":"Image Edit","openapi":"api-reference/image/generation/api/h3-image-edits.json POST /v1/images/edits","href":"/api-reference/image-generation-h3-edits"},{"title":"H3-Image-Context-IR","sidebarTitle":"H3-Image-Context-IR","description":"Run MiniMax-H3-Image prompt enhancement on its own and get the enhanced prompt synchronously, without generating images.","openapi":"api-reference/image/generation/api/h3-image-context-ir.json POST /v1/h3_image_context_ir","href":"/api-reference/image-generation-h3-context-ir"},{"title":"Streaming Events","sidebarTitle":"Streaming Events","href":"/api-reference/image-generation-h3-streaming"}]}]},{"group":"Speech","icon":"audio-lines","pages":[{"group":"Speech to Text","pages":[{"title":"Speech to Text","sidebarTitle":"Speech to Text","openapi":"api-reference/speech/speech-to-text/api/openapi.json POST /v1/speech_to_text","href":"/api-reference/speech-to-text"}]},{"group":"Text to Speech","pages":[{"title":"Synchronous Text to Speech","openapi":"api-reference/speech/t2a/api/openapi.json POST /v1/t2a_v2","href":"/api-reference/speech-t2a-http"},{"title":"Synchronous Text to Speech","asyncapi":"api-reference/speech/t2a/api/asyncapi.json t2a_v2_websocket","href":"/api-reference/speech-t2a-websocket"},{"title":"Bidirectional Streaming Text to Speech","asyncapi":"api-reference/speech/t2a/api/asyncapi-bidi.json t2a_v2_bidi_websocket","href":"/api-reference/speech-t2a-websocket-bidi"}]},{"group":"Async Text to Speech","pages":[{"title":"Create Speech Generation Task","openapi":"api-reference/speech/t2a-async/api/openapi.json POST /v1/t2a_async_v2","href":"/api-reference/speech-t2a-async-create"},{"title":"Query Speech Generation Task Status","openapi":"api-reference/speech/t2a-async/api/openapi.json GET /v1/query/t2a_async_query_v2","href":"/api-reference/speech-t2a-async-query"}]},{"group":"Voice Cloning","pages":[{"title":"Upload Audio for Voice Cloning","sidebarTitle":"Upload Audio File","openapi":"api-reference/speech/voice-cloning/api/upload-file.json POST /v1/files/upload","href":"/api-reference/voice-cloning-uploadcloneaudio"},{"title":"Upload Prompt Audio","sidebarTitle":"Upload Prompt Audio","openapi":"api-reference/speech/voice-cloning/api/upload-prompt.json POST /v1/files/upload","href":"/api-reference/voice-cloning-uploadprompt"},{"title":"Voice Clone","openapi":"api-reference/speech/voice-cloning/api/openapi.json POST /v1/voice_clone","href":"/api-reference/voice-cloning-clone"}]},{"group":"Voice Design","pages":[{"title":"Voice Design","openapi":"api-reference/speech/voice-design/api/openapi.json POST /v1/voice_design","href":"/api-reference/voice-design-design"}]},{"group":"Voice Management","pages":[{"title":"Get Voice","openapi":"api-reference/speech/voice-management/api/openapi.json POST /v1/get_voice","href":"/api-reference/voice-management-get"},{"title":"Delete Voice","openapi":"api-reference/speech/voice-management/api/openapi.json POST /v1/delete_voice","href":"/api-reference/voice-management-delete"}]}]},{"group":"File","icon":"file-code","pages":[{"group":"File Management","pages":[{"title":"Upload File","sidebarTitle":"Upload","openapi":"api-reference/file/management/api/openapi.json POST /v1/files/upload","href":"/api-reference/file-management-upload"},{"title":"List Files","sidebarTitle":"List","openapi":"api-reference/file/management/api/openapi.json GET /v1/files/list","href":"/api-reference/file-management-list"},{"title":"Retrieve File","sidebarTitle":"Retrieve","openapi":"api-reference/file/management/api/openapi.json GET /v1/files/retrieve","href":"/api-reference/file-management-retrieve"},{"title":"Retrieve Content","sidebarTitle":"Retrieve File Content","openapi":"api-reference/file/management/api/openapi.json GET /v1/files/retrieve_content","href":"/api-reference/file-management-retrieve-content"},{"title":"Delete File","sidebarTitle":"Delete","openapi":"api-reference/file/management/api/openapi.json POST /v1/files/delete","href":"/api-reference/file-management-delete"}]}]},{"group":"Models","icon":"boxes","pages":[{"group":"OpenAI Compatible","pages":[{"title":"List Models","openapi":"api-reference/models/openai/api/list-models.json GET /v1/models","href":"/api-reference/models/openai/list-models"},{"title":"Retrieve Model","openapi":"api-reference/models/openai/api/retrieve-model.json GET /v1/models/{model_id}","href":"/api-reference/models/openai/retrieve-model"}]},{"group":"Anthropic Compatible","pages":[{"title":"List Models","openapi":"api-reference/models/anthropic/api/list-models.json GET /anthropic/v1/models","href":"/api-reference/models/anthropic/list-models"},{"title":"Retrieve Model","openapi":"api-reference/models/anthropic/api/retrieve-model.json GET /anthropic/v1/models/{model_id}","href":"/api-reference/models/anthropic/retrieve-model"}]}]},{"group":"Legacy APIs","icon":"history","pages":[{"group":"Video Generation","pages":[{"title":"Create Text-to-Video Generation Task","sidebarTitle":"Text to Video","openapi":"api-reference/video/generation/api/text-to-video.json POST /v1/video_generation","href":"/api-reference/video-generation-t2v"},{"title":"Image-to-Video Task","sidebarTitle":"Image to Video","openapi":"api-reference/video/generation/api/image-to-video.json POST /v1/video_generation","href":"/api-reference/video-generation-i2v"},{"title":"Create First \u0026 Last Frame Video Generation Task","sidebarTitle":"Start / End to Video","openapi":"api-reference/video/generation/api/start-end-to-video.json POST /v1/video_generation","href":"/api-reference/video-generation-fl2v"},{"title":"Subject-Reference to Video Generation Task","sidebarTitle":"Subject Reference to Video","openapi":"api-reference/video/generation/api/subject-reference-to-video.json POST /v1/video_generation","href":"/api-reference/video-generation-s2v"},{"title":"Query Video Generation Task Status","openapi":"api-reference/video/generation/api/openapi.json GET /v1/query/video_generation","href":"/api-reference/video-generation-query"},{"title":"Video Download","sidebarTitle":"Download the Video File","openapi":"api-reference/video/generation/api/openapi.json GET /v1/files/retrieve","href":"/api-reference/video-generation-download"}]},{"group":"Image Generation","pages":[{"title":"Text to Image Generation","sidebarTitle":"Text-to-Image","openapi":"api-reference/image/generation/api/text-to-image.json POST /v1/image_generation","href":"/api-reference/image-generation-t2i"},{"title":"Image-to-Image Generation","sidebarTitle":"Image to Image","openapi":"api-reference/image/generation/api/image-to-image.json POST /v1/image_generation","href":"/api-reference/image-generation-i2i"}]}]}]},{"tab":"M Plan","pages":[{"title":"M Plan","href":"/m-plan/intro"}]},{"tab":"Pricing","pages":[{"title":"Pricing","href":"/pricing/overview"}]},{"tab":"Release Notes","pages":[{"title":"Release Notes","href":"/release-notes/models"}]},{"tab":"Developer Program","href":"https://platform.minimax.io/activity/contact-us-en"}]},"basePath":"","title":"Image Edit - MiniMax API Docs","buildId":"dpl_3pZeXn3XukjzFRgAX73A7GNDfRJ1","deploymentId":"dpl_3pZeXn3XukjzFRgAX73A7GNDfRJ1","dynamics":["10e4515597","c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["BannerMarkdown-CnC1a5XR.js","dist-BX6wab7q.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","clsx-DShopWo_.js","html-void-elements-mCSPHezU.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","OpenApiReferenceProvider-CW3yP2DK.js","utils-BN0nty2W.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-C8_MydSG.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Bsl5xDMQ.js","snippetPresets-DYv9OBej.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-9OnYPrVf.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-xr67xWGO.js","shallow-DO1aDdBF.js","getApiPlaygroundDisplay-o7cLzFL-.js","CodeSnippet-CGr2yOA8.js","CodeSnippets-CzBbqPNh.js","Page-CBlOSKZG.js","getPastedJson-dpi9sn5Y.js","icon-aIWHt8Pn.js","MethodPill-Bv2zLsGY.js","DuplicateIcon-DxFSz0J6.js","createIcon-uDNv6jwj.js","DynamicMarkdown-C91yhnNP.js","SectionHeading-DG_xjOLR.js","axios-vUo_bRtp.js","Markdown-B4M_Eo1P.js","AssistantPageLink-48h67xm_.js"]}