跳到正文
Vercel Blog(vercel.com)· Kevin Dawkins·· 6 天前精選品質評分68

MAI-Image-2.7 與 MAI-Image-2.7-Flash 於 AI Gateway 正式上線

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

重點導讀

Microsoft 推出的 MAI‑Image‑2.7 與 MAI‑Image‑2.7‑Flash 兩款影像生成模型,已在 Vercel 的 AI Gateway 進入公開預覽。

  • 它們可產出最大 2048×2048 畫素、支援透明背景的 PNG,並能用同一 API key 進行文字生成或圖片編輯。
  • MAI‑Image‑2.7 針對高品質最終素材,MAI‑Image‑2.7‑Flash 則提供更快、成本更低的變體。
  • 開發者只需設定 AI_GATEWAY_API_KEY,即可透過 Vercel AI SDK 或 AI CLI 直接呼叫。

AI 伴隨問答

自備 Key 深度分析

針對這篇報導有疑問?可直接點選快捷問題或向 AI 追問背景脈絡與技術細節:

推薦理由

本文說明 Microsoft MAI-Image-2.7 及其 Flash 版可在 AI Gateway 直接使用,支援 2048×2048 解析度與透明背景,適合需要高品質或快速生成影像的應用。

正文 · 原文

# MAI-Image-2.7 and MAI-Image-2.7-Flash now available on AI Gateway - Vercel
Skip to content

[](https://vercel.com/home)

Copy Wordmark Copy Logo

Download Brand Assets Brand Guidelines

Products

Agent Stack

Core Platform

Tools

Resources

Learn

Build

Explore

EnterprisePricing

Get a DemoLog InSign Up

Ask AIDashboard

Image 1

  • * *

Products

Agent Stack

Core Platform

Tools

Resources

Learn

Build

Explore

Enterprise

Pricing

Get a Demo

Log InSign Up

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

Image 2Image 3Image 4

Kevin Dawkins, Jerilyn Zheng, Zachary Chen

BlogChangelog

17 Nov 2026

1 min read

Copy

Microsoft’s MAI-Image-2.7 and MAI-Image-2.7-Flash are now available in public preview on AI Gateway. Both increase the maximum output size to 2048 x 2048 pixels and add transparent backgrounds for generated and edited images.

Generate 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.

  • MAI-Image-2.7 (microsoft/mai-image-2.7): for final assets where image quality is the priority
  • MAI-Image-2.7-Flash (microsoft/mai-image-2.7-flash): for faster, lower-cost generation when exploring prompts or creating variations

Set the AI_GATEWAY_API_KEY environment variable, then use either model ID with AI SDK 6 or later. To generate a transparent PNG, set providerOptions.azure.background to 'transparent':

AI SDK

AI SDK AI SDK

1import { generateImage } from 'ai';2import { writeFileSync } from 'node:fs';3
4const { image } = await generateImage({5  model: 'microsoft/mai-image-2.7',6  prompt: 'A glass perfume bottle, studio product shot',7  size: '2048x2048',8  providerOptions: {9    azure: { background: 'transparent' },10  },11});12
13writeFileSync('bottle.png', image.uint8Array);

Copy for agentView model details ↗

To edit an image, provide it as a reference and describe what to change:

AI SDK

AI SDK AI SDK

1import { generateImage } from 'ai';2import { readFileSync, writeFileSync } from 'node:fs';3
4const { image } = await generateImage({5  model: 'microsoft/mai-image-2.7-flash',6  prompt: {7    text: 'Place the bottle on a marble counter',8    images: [readFileSync('bottle.png')],9  },10});11
12writeFileSync('counter.png', image.uint8Array);

Copy for agentView model details ↗

You can also generate and edit images from the terminal with the AI CLI, using the same API key and model IDs:

AI CLI

AI CLI AI CLI

1npm install -g ai-cli2ai image -m microsoft/mai-image-2.7 --size 2048x2048 -o bottle.png "A glass perfume bottle, studio product shot"3ai image -m microsoft/mai-image-2.7-flash -i bottle.png -o counter.png "Place the bottle on a marble counter"

Copy for agentView model details ↗

Try MAI-Image-2.7 or MAI-Image-2.7-Flash in the model playground, or follow the image generation guide.

Agent Stack

Core Platform

Security

Tools

Frameworks

SDKs

Build

Learn

Explore

Company

Legal & Trust

Social

  • Image 5: VercelImage 6: Vercel

Loading status…

Select a display theme:system light dark

來源: Vercel Blog (vercel.com)
開啟原文

讀者討論

理性交流 · 即時討論