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 伴隨問答
針對這篇報導有疑問?可直接點選快捷問題或向 AI 追問背景脈絡與技術細節:
本文說明 Microsoft MAI-Image-2.7 及其 Flash 版可在 AI Gateway 直接使用,支援 2048×2048 解析度與透明背景,適合需要高品質或快速生成影像的應用。
# MAI-Image-2.7 和 MAI-Image-2.7-Flash 現已在 AI Gateway 推出 - Vercel
跳至內容
[](https://vercel.com/home)
複製字標 複製標誌
下載品牌素材 品牌指南
產品
代理程式技術堆疊
核心平臺
工具
資源
學習
建置
探索
詢問 AI儀錶板
- * *
產品
代理程式技術堆疊
核心平臺
工具
資源
學習
建置
探索
MAI-Image-2.7 和 MAI-Image-2.7-Flash 現已在 AI Gateway 推出



Kevin Dawkins、Jerilyn Zheng、Zachary Chen
2026 年 11 月 17 日
1 分鐘閱讀
複製
Microsoft 的 MAI-Image-2.7 和 MAI-Image-2.7-Flash 現已在 AI Gateway 開放公測。兩款模型都將最大輸出尺寸提高至 2048 x 2048 畫素,並為生成及編輯的圖片新增透明背景。
使用一組 AI Gateway API 金鑰,即可從文字生成圖片或編輯現有圖片,無須 Microsoft 帳戶。兩款模型都支援寫實圖片、文字呈現,以及對產品、肖像和版面配置進行指定編輯。最多可使用五張參考圖片來引導編輯或組合主體。
- MAI-Image-2.7 (
microsoft/mai-image-2.7):適用於優先考量圖片品質的最終素材
- MAI-Image-2.7-Flash (
microsoft/mai-image-2.7-flash):適用於探索提示詞或製作不同版本,生成速度更快、成本更低
設定 AI_GATEWAY_API_KEY 環境變數,然後搭配任一模型 ID 使用AI SDK 6 或更新版本。若要生成透明 PNG,請將 providerOptions.azure.background 設為 '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);
複製給代理程式檢視模型詳細資訊 ↗
若要編輯圖片,請將圖片作為參考素材提供,並描述要變更的內容:
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);
複製給代理檢視模型詳細資訊 ↗
你也可以透過終端機使用 AI CLI 生成及編輯圖片,並沿用相同的 API 金鑰和模型 ID:
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"
複製給代理檢視模型詳細資訊 ↗
在模型 Playground 中試用 MAI-Image-2.7 或 MAI-Image-2.7-Flash,或參閱圖片生成指南。
代理程式堆疊
核心平臺
安全性
工具
框架
SDK
建置
學習
探索
公司
法律與信任
社群平臺
選擇顯示佈景主題:系統、淺色、深色