Vercel Adds Microsoft’s MAI Image Models to AI Gateway

Microsoft’s MAI-Image-2.7 and MAI-Image-2.7-Flash are now available in public preview on Vercel’s AI Gateway. The models support image generation and editing through one AI Gateway API key, without requiring a Microsoft account.
- MAI-Image-2.7 and MAI-Image-2.7-Flash are in public preview on AI Gateway.
- Both models support outputs up to 2048 x 2048 pixels.
- Generated and edited images can use transparent backgrounds.
- Users can provide up to five reference images.
- The models work with AI SDK 6 or later and the AI CLI.
Larger images and transparent backgrounds
Both models increase the maximum output size to 2048 x 2048 pixels and add transparent backgrounds for generated and edited images. Developers can create images from text or modify existing images through the AI Gateway.
Vercel says the models support photorealistic images, text rendering, and targeted edits to products, portraits, and layouts. Users can provide up to five reference images to guide edits or combine subjects.
Two models for different workflows
MAI-Image-2.7, identified as microsoft/mai-image-2.7, is intended for final assets where image quality is the priority. MAI-Image-2.7-Flash, identified as microsoft/mai-image-2.7-flash, is designed for faster, lower-cost generation when users are exploring prompts or creating variations.
To use either model with AI SDK 6 or later, developers set the AI_GATEWAY_API_KEY environment variable and use the relevant model ID. A transparent PNG can be generated by setting providerOptions.azure.background to 'transparent'.
Available through the SDK, CLI and playground
Vercel’s example uses the AI SDK’s generateImage function to create a 2048 x 2048 image of a glass perfume bottle. Developers can then provide that image as a reference and describe an edit, such as placing the bottle on a marble counter.
The same API key and model IDs can be used from the terminal with the AI CLI. The announcement also directs users to try MAI-Image-2.7 or MAI-Image-2.7-Flash in the model playground or follow Vercel’s image generation guide. The public preview gives developers a single Gateway-based path for testing Microsoft’s image models, generating transparent assets, and iterating on image variations.


