Vercel News

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

6.7内容质量

TL;DR · AI 摘要

MAI-Image-2.6 and MAI-Image-2.6-Flash now available on AI Gateway - Vercel MAI-Image-2.6 and MAI-Image-2.6-Flash from Mi...

核心要点

  • 主题聚焦:MAI-Image-2.6 and MAI-Image-2.6-Flash now availa
  • 来源:Vercel News,建议结合原文判断细节。
  • AI 分析暂不可用,本条为保底评分与摘要。
#AI#后端#产品
打开原文

MAI-Image-2.6 and MAI-Image-2.6-Flash now available on AI Gateway - Vercel

MAI-Image-2.6 and MAI-Image-2.6-Flash from Microsoft are now available on AI Gateway . Generate images from text or edit existing images through the AI SDK or the AI CLI , with one API key and no provider account.

Both models support photorealistic imagery, text rendering, and targeted edits to products, portraits, and layouts. You can provide up to five reference images to guide edits or combine subjects, with output sizes up to 1536 × 1536.

  • MAI-Image-2.6 ( microsoft/mai-image-2.6 ) for final assets, when image quality matters more than speed.
  • MAI-Image-2.6-Flash ( microsoft/mai-image-2.6-flash ) for faster generation at a lower cost, when you need many iterations, such as exploring prompts or generating variations.

Use microsoft/mai-image-2.6 or microsoft/mai-image-2.6-flash as the model ID. To generate an image, call generateImage with a text prompt:

AI SDK

OpenAI Compatible

AI CLI

code
1
import
{
writeFile
}
from
'node:fs/promises'
;
2
import
{
generateImage
}
from
'ai'
;
3
4
const
{
image
}
=
await
generateImage
(
{
5
model
:
'microsoft/mai-image-2.6'
,
6
prompt
:
'A blue ceramic vase with wildflowers on a sunlit wooden table.'
,
7
size
:
'1024x1024'
,
8
}
)
;
9
10
await
writeFile
(
'image.png'
,
image
.
uint8Array
)
;

Copy for agent

View model details

↗

Edit images by passing it as input with an instruction:

code
1
import
{
writeFile
}
from
'node:fs/promises'
;
2
import
{
generateImage
}
from
'ai'
;
3
const
{
image
:
editedImage
}
=
await
generateImage
(
{
4
model
:
'microsoft/mai-image-2.6'
,
5
prompt
:
{
6
text
:
'Change the vase to terracotta and keep the flowers and setting.'
,
7
images
:
[
image
.
uint8Array
]
,
8
}
,
9
}
)
;
10
11
await
writeFile
(
'edited-image.png'
,
editedImage
.
uint8Array
)
;

Try MAI Image 2.6 and MAI Image 2.6 Flash in the model playground , or see the image generation guide .