Skip to main content
Post

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

Vercel added Microsoft's MAI-Image-2.7 and MAI-Image-2.7-Flash to AI Gateway in public preview. You can generate or edit images with one AI Gateway API key and no Microsoft account.

Both models go up to 2048 x 2048 pixels and can output transparent backgrounds. They handle photorealistic images, text rendering, and targeted edits to products, portraits, and layouts. For edits, you can pass up to five reference images to guide a change or combine subjects.

MAI-Image-2.7 (microsoft/mai-image-2.7) is the one for final assets where quality matters most. MAI-Image-2.7-Flash (microsoft/mai-image-2.7-flash) is meant for faster, lower-cost generation when you're exploring prompts or making variations.

Set AI_GATEWAY_API_KEY and use either model ID with AI SDK 6 or later. For a transparent PNG, set providerOptions.azure.background to 'transparent'. To edit, pass the existing image as a reference with a prompt like "Place the bottle on a marble counter." The same models and key also work from the terminal with the AI CLI.

Loading replies