Last refreshed 2026-11-18. Next refresh: weekly.
Why use MAI-Image-2.7 on Vercel AI Gateway?
Vercel AI Gateway offers MAI-Image-2.7 with pay-as-you-go pricing at $5.00/1M input tokens. Vercel AI Gateway is a unified AI proxy providing a single OpenAI-compatible API endpoint to 275+ models from 25+ providers including Anthropic, OpenAI, Google, Meta, Mistral, DeepSeek, xAI, Alibaba, Amazon, ByteDance, Cohere, MiniMax, MoonshotAI, KwaiPilot, Black Forest Labs, Recraft, Voyage AI, NVIDIA, and more.
Compare MAI-Image-2.7 across 4 providers to find the best fit for your use caseSetup recipe
Python + curlpip install openaiexport AI_GATEWAY_API_KEY=...import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["AI_GATEWAY_API_KEY"],microsoft/mai-image-2.7Request example
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["AI_GATEWAY_API_KEY"],
base_url="https://ai-gateway.vercel.sh/v1"
)
response = client.chat.completions.create(
model="microsoft/mai-image-2.7",
messages=[{"role": "user", "content": "Hello"}]
)
print(response.choices[0].message.content)Gotchas
- Use provider model ID "microsoft/mai-image-2.7", not the LLMReference slug "mai-image-2-7".
- creator/model-name e.g. kwaipilot/kat-coder-pro-v2
- The examples expect AI_GATEWAY_API_KEY; rename it only if your application config maps the new variable.
Compare MAI-Image-2.7 Across Providers
| Provider | Input (per 1M) | Output (per 1M) |
|---|---|---|
| OpenRouter | $5.00 | $34.00 |
| Vercel AI Gateway | $5.00 | $34.00 |
| Microsoft Foundry | $5.00 | $34.00 |
| fal API | $5.00 | $34.00 |
Pricing
| Type | Price (per 1M) |
|---|---|
| Input tokens | $5.00 |
| Output tokens | $34.00 |
Capabilities
About MAI-Image-2.7
MAI-Image-2.7 is Microsoft AI's image editing model, launched in preview on October 27, 2026. It improves on MAI-Image-2.6 for restyling and relighting scenes, editing text and symbols inside images, restoring and enhancing assets, and reasoning-based edits. It can be tried on Arena and MAI Playground; Microsoft says text-to-image generation is coming soon.