{"slug": "mai-image-2-7-and-mai-image-2-7-flash-now-available-on-ai-gateway", "title": "MAI-Image-2.7 and MAI-Image-2.7-Flash now available on AI Gateway", "summary": "Vercel added Microsoft's MAI-Image-2.7 and MAI-Image-2.7-Flash to AI Gateway in public preview, raising the maximum output size for both models to 2048 x 2048 pixels and adding transparent backgrounds for generated and edited images. Developers can call either model with a single AI Gateway API key and no Microsoft account, using model IDs microsoft/mai-image-2.7 and microsoft/mai-image-2.7-flash with AI SDK 6 or later, and can supply up to five reference images to guide edits. MAI-Image-2.7 targets final assets where image quality is the priority, while MAI-Image-2.7-Flash targets faster, lower-cost generation for prompt exploration and variations.", "body_md": "Microsoft’s [MAI-Image-2.7](https://vercel.com/ai-gateway/models/mai-image-2.7) and [MAI-Image-2.7-Flash](https://vercel.com/ai-gateway/models/mai-image-2.7-flash) are now available in public preview on [AI Gateway](https://vercel.com/ai-gateway). Both increase the maximum output size to 2048 x 2048 pixels and add transparent backgrounds for generated and edited images.\n\nGenerate images from text or edit existing images with one AI Gateway API key, without a Microsoft account. Both models support photorealistic images, text rendering, and targeted edits to products, portraits, and layouts. Use up to five reference images to guide edits or combine subjects.\n\n**MAI-Image-2.7** (`microsoft/mai-image-2.7`): for final assets where image quality is the priority\n\n**MAI-Image-2.7-Flash** (`microsoft/mai-image-2.7-flash`): for faster, lower-cost generation when exploring prompts or creating variations\n\nSet the `AI_GATEWAY_API_KEY` environment variable, then use either model ID with [AI SDK 6 or later](https://vercel.com/docs/ai-gateway/modalities/image-generation/ai-sdk). To generate a transparent PNG, set `providerOptions.azure.background` to `'transparent'`:\n\nTo edit an image, provide it as a reference and describe what to change:\n\nYou can also generate and edit images from the terminal with the [AI CLI](https://github.com/vercel-labs/ai-cli), using the same API key and model IDs:\n\nTry [MAI-Image-2.7](https://vercel.com/ai-gateway/models/mai-image-2.7) or [MAI-Image-2.7-Flash](https://vercel.com/ai-gateway/models/mai-image-2.7-flash) in the model playground, or follow the [image generation guide](https://vercel.com/docs/ai-gateway/modalities/image-generation).", "url": "https://wpnews.pro/news/mai-image-2-7-and-mai-image-2-7-flash-now-available-on-ai-gateway", "canonical_source": "https://vercel.com/changelog/mai-image-2-7-and-mai-image-2-7-flash-now-available-on-ai-gateway", "published_at": "2026-11-17 00:00:00+00:00", "updated_at": "2026-11-17 20:33:06.053983+00:00", "lang": "en", "topics": ["generative-ai", "ai-products", "ai-tools", "developer-tools", "artificial-intelligence"], "entities": ["Vercel", "AI Gateway", "Microsoft", "MAI-Image-2.7", "MAI-Image-2.7-Flash", "AI SDK 6", "AI CLI"], "also_reported_by": [], "takeaway": "Both models now output up to 2048 x 2048 pixels and support transparent PNGs via providerOptions.azure.background set to 'transparent', and accept up to five reference images for edits, callable with AI SDK 6 or later using one AI Gateway API key.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/mai-image-2-7-and-mai-image-2-7-flash-now-available-on-ai-gateway", "markdown": "https://wpnews.pro/news/mai-image-2-7-and-mai-image-2-7-flash-now-available-on-ai-gateway.md", "text": "https://wpnews.pro/news/mai-image-2-7-and-mai-image-2-7-flash-now-available-on-ai-gateway.txt", "jsonld": "https://wpnews.pro/news/mai-image-2-7-and-mai-image-2-7-flash-now-available-on-ai-gateway.jsonld"}}