[KongchangAI]
· 2 min read· 1,177 words

Microsoft MAI-Image-2.7 Series Launches on AI Gateway: 2048px and Transparent Background Support

Microsoft MAI-Image-2.7 Series Launches on AI Gateway: 2048px and Transparent Background Support

Microsoft MAI-Image-2.7 dual versions launch on AI Gateway with 2048px and transparent background support.

Microsoft has launched MAI-Image-2.7 and MAI-Image-2.7-Flash in public preview on AI Gateway. Developers don't need a Microsoft account—just one AI Gateway API Key for text-to-image and image editing. The two models are layered by quality and speed/cost: the standard version targets final deliverable assets, while Flash is for prompt exploration and batch variants. Shared upgrades include 2048x2048 max output and native transparent background support for both generation and editing. Editing supports up to five reference images across product, portrait, and layout scenarios. Integration works via AI SDK 6+ or AI CLI.

Microsoft's image generation model family welcomes new members. MAI-Image-2.7 and MAI-Image-2.7-Flash are now available in public preview on AI Gateway. Developers don't need a Microsoft account—just a single AI Gateway API Key to access text-to-image and image editing capabilities.

MAI-Image-2.7 and MAI-Image-2.7-Flash now available on AI Gateway

Two Versions, Two Trade-offs

The core of this release is splitting "quality" and "speed/cost" into two product lines, letting developers choose based on their use case:

  • MAI-Image-2.7 (Model ID: microsoft/mai-image-2.7): Aimed at final deliverable assets, prioritizing image quality.
  • MAI-Image-2.7-Flash (Model ID: microsoft/mai-image-2.7-flash): Aimed at prompt exploration and batch variant generation, emphasizing faster, lower-cost output.

This dual-tier strategy is already quite common in the image model market—high quality for finished products, lightweight for experimentation. For teams, the practical workflow often involves using Flash to quickly run through dozens of prompt directions, then once a direction is locked in, using the standard version for final output—striking a balance between budget and results.

The so-called "dual-tier" layering in image generation is essentially making model scale and inference compute into a configurable product gradient. High-quality tiers typically use larger-parameter diffusion Transformers or longer sampling steps, with per-image inference costs reaching several times that of lightweight versions; lightweight tiers trade distillation, step compression, or smaller backbone networks for second-level image generation. The industry-standard approach is for high-quality versions to serve final delivery, while lightweight versions handle the "draft—screening—upscaling" front-end, concentrating expensive compute on a few confirmed candidates.

Key Capabilities: Larger Canvas and Transparent Backgrounds

Both models bring two practical capability upgrades:

Maximum output increased to 2048 x 2048 pixels. This resolution is already sufficient for e-commerce hero images, social media assets, product showcase images, and similar scenarios, reducing the need for post-generation upscaling.

Both generation and editing support transparent backgrounds. This is the update with the biggest impact on workflows—transparent PNGs mean generated results can be directly overlaid onto design files or composited onto other backgrounds without needing to remove backgrounds. In the AI SDK, simply set providerOptions.azure.background to 'transparent'.

Transparent backgrounds (alpha channels) have always been challenging in diffusion model training, because mainstream training data consists mostly of RGB three-channel images lacking reliable alpha annotations. Common engineering solutions include introducing an additional fourth channel in latent space, or using mask conditions to guide the model in distinguishing foreground from background, combined with post-processing to ensure natural semi-transparent edge transitions. Native output with alpha avoids one quality loss compared to generating on white backgrounds then cutting out—and also avoids edge artifacts when cutting out semi-transparent objects like hair, glass, or smoke. This is significantly meaningful for compositing workflows.

Editing Capabilities and Reference Image Mechanism

Beyond text-to-image, both models support targeted editing of existing images, covering three common needs: products, portraits, and layouts. The models support up to five reference images to guide editing direction or combine multiple subjects into a single frame.

The official example illustrates the usage well: first generate an image of "a glass perfume bottle, studio product shot" (conveniently set to transparent background), then use that image as a reference and input the prompt "place the bottle on a marble counter" to complete the scene replacement. The entire workflow uses just the same API Key and two calls.

Additionally, both models have realistic image generation and text rendering capabilities—text rendering has always been a weak point for image models, and whether text can be reliably rendered directly affects the usability of posters, banners, and other copy-containing assets.

Multi-reference image conditional injection typically relies on a reference image encoder to compress each image into several visual tokens, then feeds them alongside text tokens into attention layers, where the model implicitly decides "what to keep, what to change." More reference images mean longer context, which increases VRAM usage and latency—so five is often a compromise upper limit between expressiveness and cost. This capability differs from traditional inpainting (mask-based repainting): the latter requires users to precisely delineate modification areas, while the former relies more on prompt semantic localization—lower barrier to entry but slightly weaker control over complex spatial relationships.

How to Integrate

Integration maintains AI Gateway's lightweight style: set the AI_GATEWAY_API_KEY environment variable, then use either model ID through AI SDK 6 or higher.

import { generateImage } from 'ai';
import { writeFileSync } from 'node:fs';

const { image } = await generateImage({
  model: 'microsoft/mai-image-2.7',
  prompt: 'A glass perfume bottle, studio product shot',
  size: '2048x2048',
  providerOptions: {
    azure: { background: 'transparent' },
  },
});

writeFileSync('bottle.png', image.uint8Array);

For image editing, pass the original image as a reference and describe changes with a structured prompt:

const { image } = await generateImage({
  model: 'microsoft/mai-image-2.7-flash',
  prompt: {
    text: 'Place the bottle on a marble counter',
    images: [readFileSync('bottle.png')],
  },
});

Developers who prefer the command line can also use AI CLI. After installation, use the ai image command with parameters like -m, --size, -i, -o to accomplish the same generation and editing tasks without writing code.

Several Signals Worth Noting

No Microsoft account required is a key step in lowering the barrier. Previously, calling Azure-family image capabilities often required configuring Azure resources and credentials; now a single AI Gateway Key suffices—more friendly to individual developers and small teams.

Native transparent background support hints at workflow positioning. Making transparent PNG a first-class capability shows these models aren't just aimed at "generating a pretty image," but at being embedded into production pipelines for design, e-commerce, and advertising assets.

Dual-model layering reflects cost sensitivity. Cost pressure in image generation is real, and the Flash version's existence lets developers control spending without sacrificing exploration efficiency.

Both models are currently in public preview. Developers can try them directly in the model playground or refer to the official image generation guide for integration.

The role of aggregation layers like AI Gateway deserves separate mention: they provide unified authentication, billing, and calling protocols between applications and various model providers, so developers don't need to apply for credentials and integrate SDKs separately for each model. For a market with multiple coexisting models, this abstraction layer reduces migration costs—switching models only requires changing a model ID string. However, aggregation layers may also introduce an extra hop of latency and lag in feature pass-through; new provider features need gateway adaptation before use—a trade-off to consider when choosing.

One-line Summary

Microsoft MAI-Image-2.7 dual versions launch on AI Gateway with 2048px and transparent background support.

Paragraph Summary

Microsoft has launched MAI-Image-2.7 and MAI-Image-2.7-Flash in public preview on AI Gateway. Developers don't need a Microsoft account—just one AI Gateway API Key to access text-to-image and image editing. The two models are layered by "quality" and "speed/cost": the standard version targets final deliverable assets, while Flash is for prompt exploration and batch variant generation. Shared upgrades include maximum 2048x2048 pixel output and native transparent background support for both generation and editing, enabling direct compositing onto design files without background removal. Editing supports up to five reference images, covering product, portrait, and layout scenarios, with realistic generation and text rendering capabilities. Integration is available through AI SDK 6+ or AI CLI.

#MAI-Image-2.7#AI Gateway#Microsoft image generation#transparent background#2048x2048#MAI-Image-2.7-Flash#image editing#AI SDK
Share:

Related articles