MAI Image 2.7 Flash Edit API

microsoft/mai-image-2.7-flash/edit
image_urls · 1–5

The MAI Image 2.7 Flash Edit API applies written edits to 1–5 reference images at Flash speed and price: change seasons and light, remove objects, update text or turn a sketch into a product photo, while the rest of the image stays in place. A one-image 1K edit costs about 2.6 credits.

Get API Key
Input
Required274/32000
Required
Image Urls

Drag and drop files, paste from clipboard, or provide a URL. Provide 1–5 public HTTP(S) JPEG, PNG or WebP image URLs in the order the prompt refers to them. Each image is scaled to about 1 megapixel and adds up to 1,024 image input tokens.

1/5 files added

Optional
Optional
Optional
Optional
OutputReady

Maximum upfront charge: 2.71215 credits · $0.01356

Billed by actual tokens. A 1K square image costs about 2.0 credits; the difference is returned after completion.

Continue using

Examples

output-7701ccf9834d.png

Remove the red delivery scooter and the orange traffic cone from the alley and fill the space with the wooden wall and street surface behind them. Keep the woman, her bicycle, the lanterns and the soft light unchanged.

output-f155ccab870b.png

Turn the pencil teapot design in image 1 into a real handmade ceramic teapot glazed with the pale celadon crackle glaze from image 2, the glaze pooling darker in the carved details. Studio product photograph on light linen, soft daylight, three-quarter view.

What is the MAI Image 2.7 Flash Edit API?

MAI Image 2.7 Flash is the optimized, lower-cost version of Microsoft AI's MAI Image 2.7, released on November 17, 2026. Its edit endpoint takes the same fields as MAI Image 2.7 Edit: 1–5 reference images, an instruction, and optional size, resolution, background and output format. The MAI Image 2.7 Flash Edit API suits previews, batch edits and interactive apps, and the same request runs on MAI Image 2.7 for final output.

Why choose the MAI Image 2.7 Flash Edit API?

The MAI Image 2.7 Flash Edit API applies written edits to 1–5 images at Flash speed, about 2.6 credits for a one-image 1K edit.

  • Fast edits at Flash pricesFlash charges 500 credits per 1M image input tokens and 2,000 per 1M output tokens, about 2.6 credits for a one-image 1K edit.

  • Scene changes that keep the subjectTurn a summer fjord into a winter evening while the cabin, boat and shoreline stay the same.

  • Object removalRemove clutter such as a parked scooter and a traffic cone, and the alley behind them is filled in naturally.

  • Sketch to productCombine a pencil design with a glaze swatch to render a finished ceramic product photo from two references.

  • Same fields as MAI Image 2.7Move an edit to MAI Image 2.7 by changing the model ID when a final image needs more detail.

What parameters does the MAI Image 2.7 Flash Edit API accept?

This API needs prompt and image_urls (1–5 images); size, resolution, background and output_format are optional.

ParameterRequirementDescription
promptRequired

Edit instruction, up to 32,000 characters. Say what changes and what stays, and refer to references as image 1, image 2 and so on.

image_urlsRequired

1–5 public JPEG, PNG or WebP image URLs. One image is edited; several are combined in the order given.

sizeOptional

Follows image 1 at about 1 megapixel when empty. Ratios: 1:1, 4:3, 3:4, 3:2, 2:3, 16:9, 9:16, or custom WIDTHxHEIGHT with both sides multiples of 16, each side at least 768 and up to 4,194,304 pixels in total, used exactly.

resolutionOptional

1K or 2K for ratio sizes. 1K is about 1 megapixel (1024×1024 at 1:1); 2K is about 4 megapixels (2720×1536 at 16:9).

Default1K2K
backgroundOptional

opaque or transparent. transparent returns an alpha channel with png or webp.

Defaultopaquetransparent
output_formatOptional

png, jpeg or webp.

Defaultpngjpegwebp

How do you use the MAI Image 2.7 Flash Edit API?

Add 1–5 images to the API, state the change and what stays, then read the image URL once it finishes.

  1. Add reference imagesProvide 1–5 public JPEG, PNG or WebP URLs in the order the instruction mentions them.

  2. Write the instructionState the change and list what stays, such as the subject, layout and light.

  3. Choose the output sizeLeave size empty to follow image 1, or set a ratio, 2K or an exact WIDTHxHEIGHT.

  4. Pick background and formattransparent with png or webp for cutouts, jpeg for photos.

  5. Run and collectSubmit the edit and read the image URL once it finishes.

How much does the MAI Image 2.7 Flash Edit API cost?

A one-image 1K edit on the MAI Image 2.7 Flash Edit API costs about 2.6 credits. Billing follows actual tokens: 350 per 1M text input, 500 per 1M image input and 2,000 per 1M image output; 1 credit = $0.005.

Output tokens equal width × height ÷ 1024, so a 1K square image uses about 2.0 credits ($0.010) and a 2K square image about 8.2 credits ($0.041). At submission the MAI Image 2.7 Flash Edit API holds a cap from the prompt length (UTF-8 bytes ÷ 4), 1,024 tokens per reference image, 1,088 output tokens for 1K or unsized edits, 4,096 for 2K and the exact count for custom sizes. On completion you pay the actual tokens and the rest returns to your balance; failed tasks are refunded in full.

How much does the MAI Image 2.7 Flash Edit API cost?
UsageCredits / 1M tokensUSD / 1M tokens
Text input350$1.75
Image input500$2.50
Image output2,000$10.00

What is the MAI Image 2.7 Flash Edit API best for?

This API fits batch photo updates, object removal, sketch-to-product renders and in-app edit previews.

  • Batch photo updatesApply the same season, light or color change across many listing or travel photos.

  • Photo cleanupRemove distracting objects from street, real estate and event photos.

  • Design to renderTurn sketches and swatches into product visuals for reviews and pitches.

  • Interactive editing appsGive users quick edit previews at about 2.6 credits per 1K edit.

Pro Tips

  • List what to keep in the same sentence as the change, for example "keep the cabin, the boat and the fjord the same".
  • For removals, also say what should fill the space, such as the wall and street behind the object.
  • Refer to references by position, image 1 and image 2, when you combine a design with a material.
  • Preview on Flash, then rerun the chosen edit on MAI Image 2.7 for final detail.

Notes

  • image_urls takes 1–5 public JPEG, PNG or WebP URLs; each is scaled to about 1 megapixel before generation.
  • Each request returns one image; prompt accepts up to 32,000 characters.
  • When size is empty, the output follows image 1 at about 1 megapixel; resolution applies to ratio sizes.
  • Tasks run asynchronously: submission returns a task_id, and a callback_url can receive the finished result.

Sources

Model details on this page come from Microsoft AI's own publications:

“MAI Image 2.7 Flash delivers production-ready visuals with strong photorealism, prompt adherence, and creative flexibility at less than half the cost of our flagship model.”

— Microsoft AI, MAI Image 2.7 | Microsoft AI

“MAI Image 2.7, our latest image editing model, launches with even stronger control for edits that are hardest to get right.”

— Microsoft AI, MAI Image 2.7 debuts above GPT Image 2.5 Flare on Artificial Analysis and #3 on Arena,

MAI Image 2.7 Flash Edit API FAQ

What is the MAI Image 2.7 Flash Edit API?

The MAI Image 2.7 Flash Edit API is the editing endpoint of MAI Image 2.7 Flash, the faster, lower-cost version of the image model Microsoft AI released on November 17, 2026. It takes 1–5 reference images and an instruction, edits one image or combines several, and keeps the parts you name intact. You can call it programmatically or try it from the playground above.

Can the MAI Image 2.7 Flash Edit API remove objects from photos?

Yes. Name the objects to remove and what should fill their place. The Kyoto alley example removes a scooter and a traffic cone while the cyclist, lanterns and light stay as they were.

How many references does the MAI Image 2.7 Flash Edit API accept?

1 to 5 public JPEG, PNG or WebP URLs in image_urls, referred to as image 1, image 2 and so on. Each is scaled to about 1 megapixel and adds up to 1,024 image input tokens.

Should I edit with MAI Image 2.7 Flash or MAI Image 2.7?

Both take the same fields. The MAI Image 2.7 Flash Edit API costs about a third as much per output token and suits previews and batches; MAI Image 2.7 suits final edits with the most detail.

What size does a MAI Image 2.7 Flash Edit API edit return?

With size empty, the result follows image 1 at about 1 megapixel. Set a ratio with 1K or 2K, or a custom WIDTHxHEIGHT with multiples of 16, at least 768 per side and up to 4,194,304 pixels.