MAI Image 2.7 API

microsoft/mai-image-2.7/text-to-image
1K · 2K · WIDTHxHEIGHT

The MAI Image 2.7 API runs Microsoft AI's newest image model for photorealistic text to image, legible in-image text and transparent PNG or WebP, at 1K, 2K or an exact custom size. Vidgo bills the MAI Image 2.7 API by actual tokens, about 7.0 credits ($0.035) per 1K image.

Get API Key
Input
Required448/32000
Optional
Optional
Optional
Optional
OutputReady

Maximum upfront charge: 7.5104 credits · $0.03755

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

Continue using

Examples

output-f2b59c6dd514.png

Close-up photograph of a weathered enamel bus-stop sign on a wooden post in rural Iceland, light drizzle, a moss-covered lava field and a red-roofed church blurred in the background. The sign is white with a dark blue border. Large text at the top reads exactly "HÓLMAVÍK". Below it, smaller text reads exactly "Mán–Fös 07:40 · 16:15" and on the last line "Lau 11:00". These are the only words on the sign. Raindrops on the enamel, slight rust around the screw holes.

output-d2bb97e6570d.webp

Wide panoramic documentary photograph of a floating market on the Mekong Delta at dusk: wooden sampans loaded with pineapples, dragon fruit and green coconuts drift side by side, vendors in conical hats pass fruit between boats, strings of warm paper lanterns hang between stilt houses on the riverbank, and the last orange light reflects on the brown water. Rich detail from edge to edge.

What is the MAI Image 2.7 API?

MAI Image 2.7 is Microsoft AI's in-house image model, released on November 17, 2026 with text to image and the faster MAI Image 2.7 Flash, three weeks after an editing preview on October 27. Microsoft describes it as a 20-billion-parameter diffusion model for creative generation and production editing. The MAI Image 2.7 API on this page turns a prompt into one image per request, with seven aspect ratios at 1K or 2K, custom sizes up to 4,194,304 pixels and transparent backgrounds.

Why Choose the MAI Image 2.7 API?

The MAI Image 2.7 API is built for photoreal images with exact in-image text, fixed layout sizes and transparent output, billed by actual tokens.

  • Photorealism down to textureSkin, feathers, fabric and natural light render with fine detail, as the eagle huntress example shows at 1K.

  • Text rendered as writtenQuote the exact words and the MAI Image 2.7 API places them on signs, labels and posters, accented letters such as "HÓLMAVÍK" included.

  • Exact sizes for real layoutsSend a custom WIDTHxHEIGHT such as 1536x768 or 3840x1088 for banners and headers, and the image comes back at exactly that size.

  • Transparent PNG and WebPSet background to transparent with png or webp to receive an alpha channel for stickers, icons and product cutouts.

  • Token billing with a known ceilingYou pay actual output tokens, width × height ÷ 1024. The upfront hold is the most a task can cost, and the unused part returns after completion.

What parameters does the MAI Image 2.7 API accept?

This API needs one field, prompt. Optional size, resolution, background and output_format shape the image.

ParameterRequirementDescription
promptRequired

Non-blank text, up to 32,000 characters. Put on-image text in straight double quotes.

sizeOptional

Default 1:1. 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.

Default1:1
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 API?

Send a prompt to the API, choose a size and format, then read the image URL when the task is finished.

  1. Write the promptDescribe the subject, setting, light and lens. Put every word that should appear in the image in straight double quotes.

  2. Choose the sizePick 1:1, 4:3, 3:4, 3:2, 2:3, 16:9 or 9:16, or type an exact WIDTHxHEIGHT for a fixed layout.

  3. Set resolutionUse 1K for drafts and web images, or 2K for about 4 megapixels on ratio sizes.

  4. Pick background and formatChoose transparent with png or webp for cutouts, or jpeg for lighter photo files.

  5. Run and collectSubmit the task and read the image URL once the status is finished.

How much does the MAI Image 2.7 API cost?

A 1K image on the MAI Image 2.7 API costs about 7.0 credits ($0.035). Billing follows actual text input, image input and image output tokens per 1M; 1 credit = $0.005.

Output tokens equal width × height ÷ 1024, so a 1K square image uses about 7.0 credits ($0.035) and a 2K square image about 27.9 credits ($0.14). At submission the MAI Image 2.7 API holds a cap from the prompt length (UTF-8 bytes ÷ 4), 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 API cost?
UsageCredits / 1M tokensUSD / 1M tokens
Text input1,000$5.00
Image output6,800$34.00

What is the MAI Image 2.7 API best for?

This API suits product photos, signs and posters with real text, banners at exact sizes and transparent assets.

  • Product and lifestyle photographyCreate catalog shots, scene photos and ad drafts with realistic materials and light at 1K or 2K.

  • Signs, posters and labelsRender headlines, timetables, menus and packaging copy from quoted text in the prompt.

  • Website banners at exact sizesGenerate hero images and headers at the pixel dimensions your layout already uses.

  • Stickers, icons and cutoutsExport transparent PNG or WebP assets ready to place on any background.

Pro Tips

  • Quote exact text and state that it is the only text, as in the Hólmavík bus-stop example.
  • Describe lens, light and time of day for photorealism, for example 85mm, blue hour or soft window light.
  • Use multiples of 16 for custom sizes, such as 1536x768 or 2048x1152.
  • Draft with MAI Image 2.7 Flash, which takes the same fields, then render the final image on the MAI Image 2.7 API.

Notes

  • Each MAI Image 2.7 API request returns one image; prompt accepts up to 32,000 characters.
  • resolution applies to ratio sizes; custom sizes are used exactly as given.
  • To edit photos or combine up to 5 reference images, use MAI Image 2.7 Edit.
  • Tasks run asynchronously: submission returns a task_id, and the finished status carries the image URL. A callback_url can receive the result.

Sources

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

“MAI Image 2.7 combines exceptional photorealism, reliable prompt adherence, and advanced editing capabilities for everyday creative and commercial workflows.”

— 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 API FAQ

What is the MAI Image 2.7 API?

The MAI Image 2.7 API gives developers MAI Image 2.7, the image model Microsoft AI released on November 17, 2026 for text to image and image editing. Microsoft describes it as a 20-billion-parameter diffusion model built for photorealistic scenes, in-image text and precise edits. On Vidgo the text-to-image endpoint returns one image per request at 1K, 2K or a custom size, with optional transparent backgrounds. You can call it programmatically or try it from the playground above.

When was MAI Image 2.7 released?

Microsoft AI previewed MAI Image 2.7 for image editing on October 27, 2026, and released it with text to image and MAI Image 2.7 Flash on November 17, 2026. The MAI Image 2.7 API on Vidgo serves both endpoints today.

What is the difference between MAI Image 2.7 and MAI Image 2.7 Flash?

MAI Image 2.7 Flash is Microsoft's faster, lower-cost version and accepts exactly the same fields. A 1K square image costs about 2.0 credits on Flash and 7.0 on the MAI Image 2.7 API. Use Flash for drafts and volume, and MAI Image 2.7 for the final render.

What sizes does the MAI Image 2.7 API support?

Seven ratios, 1:1, 4:3, 3:4, 3:2, 2:3, 16:9 and 9:16, at 1K (about 1 megapixel) or 2K (about 4 megapixels, 2720×1536 at 16:9). For a custom WIDTHxHEIGHT, use multiples of 16, at least 768 per side and up to 4,194,304 pixels; the MAI Image 2.7 API returns that exact size.

Can the MAI Image 2.7 API create transparent images?

Yes. Set background to transparent and output_format to png or webp, and the MAI Image 2.7 API returns an image with an alpha channel, ready for stickers, icons and product listings.

How well does the MAI Image 2.7 API render text?

Microsoft reports improved text rendering for labels, posters, packaging and signage. Put the words in straight double quotes and say they are the only text, as in the Hólmavík timetable example, then check small print before publishing.