
MAI-Image 2.6 Edit API by MICROSOFT
Microsoft AI's flagship image-to-image editing model, combining surgical instruction-driven edits with multi-reference composition across up to five images, ranked No. 1 for image editing on Artificial Analysis.
MAI-Image 2.6 Edit is developed by Microsoft. Atlas Cloud (operated by Atlas Cloud AI LLC) provides access to it and does not own it. All trademarks belong to their respective owners.
MAI-Image-2.6 Edit (Image-to-Image)
Overview
MAI-Image-2.6 is Microsoft AI's flagship image model, built for high-quality generation and precise, controllable editing. This endpoint exposes its image-to-image path: you supply 1–5 reference images plus a natural language instruction, and the model returns an edited or newly composed image.
MAI-Image-2.6 is a diffusion-based generative model that progressively refines an image from the prompt and the supplied references. It handles both surgical edits — remove, replace, recolor, reposition, inpaint, fix text, clean up artifacts — and multi-reference composition, where people, products, styles, and scenes from several different images are brought together into one coherent result. Compared with the previous MAI-Image-2.5 generation, version 2.6 delivers noticeably stronger in-image text rendering, better portraits and 3D imagery, and more polished commercial and photorealistic output. It also adds capabilities that were not available in the 2.5 series: up to five reference images per request, model-directed aspect ratio selection, and web-grounded generation.
microsoft/mai-image-2.6/edit and microsoft/mai-image-2.6/text-to-image are two entry points into the same underlying model, split by input type. Use this edit endpoint whenever you have reference imagery; use the text-to-image endpoint when you have only a prompt.
Key Capabilities
- Multi-reference composition — Accepts up to 5 reference images in a single request. A locked creative — a product, a character, a brand mark — stays consistent as you revise, recompose, and resize it. This is the defining capability of the 2.6 editing path.
- Surgical object editing — Remove, replace, recolor, or reposition specific elements without disturbing the rest of the frame.
- Inpainting and artifact cleanup — Fill missing regions, erase unwanted content, and remove blur, noise, and compression artifacts.
- In-image text updates — Rewrite signage, labels, packaging copy, and UI strings with legible, correctly spelled results. Microsoft measured a +91 Elo gain on text rendering over MAI-Image-2.5.
- Identity and layout preservation — Keeps faces, subject identity, and composition intact across edits.
- Style and layout transfer — References can act as content, layout, or style guides rather than only as the canvas being edited.
- Visual reasoning — Reasons across objects, scale, spatial positioning, lighting, and scene structure, so instructions applied to a real photograph come back physically plausible.
- Web-grounded editing — Optionally retrieves current information from the web and uses it as extra context when interpreting the instruction. Useful for real-world entities, places, and events.
- Model-directed aspect ratio — Either preserve the input image's aspect ratio, or let the model choose the framing best suited to the requested content and composition.
- Long prompts — Up to 32,000 tokens of instruction context, enough for detailed edit lists and brand guidelines.
Benchmark Performance
- No. 1 for image editing on Artificial Analysis' image leaderboard, and No. 2 for text-to-image.
- No. 2 on the Arena image-editing leaderboard and No. 2 on Arena text-to-image, ahead of leading models from Google, Meta, and xAI.
- +79 Elo overall over MAI-Image-2.5, with gains across every Arena category and the largest jumps in text rendering, portraits, and 3D imagery.
- Microsoft positions the model on the best price-per-Elo point in the world — near-frontier quality without frontier pricing.
- In head-to-head category scoring by Artificial Analysis, MAI-Image-2.6 sits within a few Elo points of GPT Image 2 on categories such as Lighting and UI/UX Design.
API Parameters
The request body is JSON. Parameters follow the model's OpenAPI schema exactly.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
model | string | Yes | microsoft/mai-image-2.6/edit | Model name. |
prompt | string | Yes | — | Text prompt describing the edit to perform on the input images. Maximum context length: 32,000 tokens. |
reference_images | string[] | Yes | — | The images to edit, also used as content, layout or style references. Accepts 1 to 5 images. Must be in JPEG or PNG format. Supports both a public URL and a base64-encoded image for each item. The total pixel size of each image should be less than 1,376,256 pixels. |
size | string | No | default | Controls the aspect ratio of the edited image. default preserves the aspect ratio of the input image, and auto lets the model evaluate the prompt and the provided image inputs and select the output aspect ratio it determines is best suited to the requested content, composition, and framing. |
enable_web_search | boolean | No | false | If enabled, the model will use web search to ground the generation with real-time information. This can improve accuracy for prompts involving real-world entities, places, or events. |
enable_base64_output | boolean | No | false | If enabled, the output will be encoded into a BASE64 string instead of a URL. This property is only available through the API. |
enable_sync_mode | boolean | No | false | If set to true, the function will wait for the result to be generated and uploaded before returning the response. It allows you to get the result directly in the response. This property is only available through the API. |
Notes on reference_images
- 1 to 5 items, each either a publicly reachable URL or a base64-encoded image. The two forms can be mixed within one array.
- JPEG or PNG only.
- Each image must be under 1,376,256 total pixels (for reference, 1376×1000 or 1173×1173 sit just inside the ceiling). Downscale larger source files before sending, or the request will be rejected.
- Order matters in practice: put the image that defines the canvas first, and refer to the others by role in the prompt ("keep the product from the second image, the lighting from the third").
Notes on size
The edit endpoint takes only the two enum values — it does not accept explicit width*height dimensions.
default— preserve the aspect ratio of the input image. The right choice for retouching, text swaps, and anything that must drop back into the original layout.auto— let the model pick the aspect ratio, judging from both the prompt and the supplied images. The right choice for recomposition, extending a scene, or turning a reference into a differently shaped asset.
Response Format
Requests return a prediction envelope. Poll the returned urls.get endpoint (or set enable_sync_mode to wait inline) until data.status is completed, then read the image URLs from data.outputs.
| Field | Type | Description |
|---|---|---|
code | integer | HTTP status code of the response. |
message | string | Human-readable message; non-empty on failure. |
data.id | string | Unique identifier for the prediction. |
data.model | string | Model ID used for the prediction. |
data.outputs | string[] | Array of URLs to the generated content. Null when status is not completed. |
data.urls.get | string | URL to poll for the prediction result. |
data.has_nsfw_contents | boolean[] | NSFW detection flag per output. Null if not applicable. |
data.status | string | created, processing, completed, timeout, or failed. |
data.created_at | string | ISO timestamp of when the request was created. |
data.error | string | Error message if the task failed, empty string otherwise. |
data.error_code | integer | Error code if the task failed. |
data.executionTime | number | Total execution time in milliseconds. |
data.timings.inference | number | Inference time in milliseconds. |
Pricing
This model uses a hold-then-settle billing mode. When the request is accepted, an estimated price is held against your balance; when the request finishes, the hold is released and you are charged the final settlement price computed from the upstream token usage actually consumed.
Note that on the edit endpoint the estimate scales with the number of reference images you send, since each one carries a fixed input-image fee.
Estimated Price (Hold)
SKUs
| SKU | Description | Unit Price |
|---|---|---|
sku_display | Price for display, including one input and one output image | $0.099 |
sku_output_image | Price for the output image | $0.088 |
sku_input_image | Price for each input image | $0.011 |
sku_input_1m_token | Price per 1M input tokens | $5.00 |
sku_web_search | Web search | $0.035 |
The sku_display value of 0.088) plus one input image ($0.011).
Parameters Used
| Parameter | Source | Type | Default |
|---|---|---|---|
prompt | request body prompt | string | "" |
reference_images | request body reference_images | array | [] |
enable_web_search | request body enable_web_search | boolean | false |
Formula
estimate = countTokens(prompt) / 1,000,000 × sku_input_1m_token + (enable_web_search ? sku_web_search : 0) + sku_output_image + sku_input_image × len(reference_images)
Substituting the unit prices:
estimate = countTokens(prompt) / 1,000,000 × $5.00 + (enable_web_search ? $0.035 : 0) + $0.088 + $0.011 × len(reference_images)
Worked Estimates
| Prompt tokens | Reference images | Web search | Token cost | Output image | Input images | Web search | Estimate |
|---|---|---|---|---|---|---|---|
| 50 | 1 | off | $0.000250 | $0.088 | $0.011 | $0 | $0.099250 |
| 500 | 1 | off | $0.002500 | $0.088 | $0.011 | $0 | $0.101500 |
| 500 | 3 | off | $0.002500 | $0.088 | $0.033 | $0 | $0.123500 |
| 500 | 5 | off | $0.002500 | $0.088 | $0.055 | $0 | $0.145500 |
| 500 | 5 | on | $0.002500 | $0.088 | $0.055 | $0.035 | $0.180500 |
| 2,000 | 2 | off | $0.010000 | $0.088 | $0.022 | $0 | $0.120000 |
For a typical single-reference edit with a short instruction and web search off, the estimated price is approximately $0.099 per edit.
Final Settlement Price
Settlement is token-based across three meters, priced per 1M tokens:
| Meter | Rate per 1M tokens |
|---|---|
input_price — text input tokens | $5.00 |
input_image_price — image input tokens | $8.00 |
output_image_price — image output tokens | $38.00 |
settled = (input_price × input + input_image_price × input_image + output_image_price × output_image) / 1,000,000
Substituting the rates:
settled = ($5.00 × input + $8.00 × input_image + $38.00 × output_image) / 1,000,000
Where input is the number of text input tokens, input_image the combined token count of all reference images you sent, and output_image the number of tokens in the returned image, as reported by the upstream usage record. Two consequences worth planning around: image input tokens scale with the resolution and the count of your references, so sending five full-size images costs meaningfully more than sending one; and image output tokens scale with the resolution of the result.
Illustrative settlement: a 200-token instruction with one reference billed at 1,000 image input tokens, returning an image billed at 1,000 output image tokens, settles at ($5.00 × 200 + $8.00 × 1,000 + $38.00 × 1,000) / 1,000,000 = $0.047. Actual token counts come from the upstream usage report, not from this document.
Best Use Cases
- Multi-reference brand composition — Combine a product shot, a model, and a style reference into a single on-brand campaign visual.
- Character and product consistency — Keep the same character or SKU identical across a whole series of images and formats.
- Product retouching — Swap backgrounds, fix lighting, change colorways, clean up blemishes.
- Marketing asset refresh — Update copy, logos, pricing, or seasonal elements in existing creatives without a reshoot.
- Content localization — Replace in-image text for different markets while leaving the design untouched.
- Photo restoration and cleanup — Remove artifacts and defects from archival or user-generated images.
- E-commerce variants — Generate every color and configuration from one base photograph.
- Reframing and resizing — Recompose one master asset into square, portrait, and wide formats with
size: "auto".
Prompting Tips
- Say what to change and what to preserve. "Change the red car to matte blue, keep the background and reflections unchanged" beats "make the car blue".
- Name your references by position. "Use the jacket from the second image on the person in the first image" gives the model an unambiguous mapping.
- Quote text exactly. For copy edits, give both the string to replace and its replacement, in quotation marks.
- Describe the target, not just the removal. "Replace the background with a clean white studio sweep" works better than "remove the background".
- Keep
sizeondefaultfor in-place edits so the result drops straight back into your existing layout; switch toautoonly when you actually want recomposition. - Send only the references you need. Each extra image adds cost on both the estimate and the settlement, and too many competing references can dilute the edit.
- Downscale before sending. Each reference must stay under 1,376,256 pixels, and smaller references also settle cheaper.
- Iterate on one axis at a time so you can tell what actually moved the result.
Technical Specifications
| Spec | Value |
|---|---|
| Model Developer | Microsoft AI |
| Model Family | MAI-Image-2.6 |
| Model Version | 2026-07-31 |
| Architecture | Diffusion-based generative model |
| Task | Image-to-image editing and multi-reference composition |
| Input | Text prompt (up to 32,000 tokens) + 1–5 reference images |
| Reference Image Formats | JPEG, PNG |
| Reference Image Delivery | Public URL or base64 string, per item |
| Max Pixels per Reference Image | Under 1,376,256 |
| Output | Image URL, or BASE64 when enable_base64_output is set |
| Aspect Ratio | Input ratio preserved (default), or model-selected (auto) |
| Web Grounding | Optional, via enable_web_search |
| Images per Request | 1 output |
| Billing Mode | Hold-then-settle |
Responsible Use
MAI image models apply data filtering and system-level content classifiers, and outputs are flagged through has_nsfw_contents. No generative model is immune to adversarial prompts, so add mitigations appropriate to your use case, avoid generating misleading or privacy-violating content or depictions of public figures and protected material, only edit imagery you have the rights to use, and disclose that images are AI-generated when you publish them.
Related Models
- MAI-Image-2.6 Text-to-Image — The same model, driven by a prompt alone, with explicit
width*heightcontrol. - MAI-Image-2.6-Flash Edit — Comparable editing quality at roughly half the price, tuned for latency-sensitive, high-throughput workloads.
- MAI-Image-2.6-Flash Text-to-Image — The faster, lower-cost generation variant.



















