MAI-Image 2.5 API

MAI-Image 2.5 is an image generation model from Microsoft, served via Azure AI Foundry. It produces photorealistic and artistic images from text prompts with support for multiple aspect ratios.
Output
$6.5 / 1M tokens
Released
Jun 3, 2026

How to use MAI-Image 2.5 API

Install any OpenAI-compatible SDK, point it at api.aimlapi.com/v1, and set the model to microsoft/mai-image-2.5.
import requests

r = requests.post(
    "https://api.aimlapi.com/v1/images/generations",
    headers={"Authorization": "Bearer " + AIMLAPI_KEY},
    json={
      "model": "microsoft/mai-image-2.5",
      "prompt": "A cat holding a sign that says hello"
    },
)
print(r.json())
const r = await fetch("https://api.aimlapi.com/v1/images/generations", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.AIMLAPI_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "model": "microsoft/mai-image-2.5",
    "prompt": "A cat holding a sign that says hello"
  }),
});
console.log(await r.json());
curl -X POST https://api.aimlapi.com/v1/images/generations \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"microsoft/mai-image-2.5","prompt":"A cat holding a sign that says hello"}'

OpenAI-compatible — swap the base URL and it works with your existing SDK.

MAI-Image 2.5 API Pricing

TypePrice
Input
$6.5 / 1M tokens
Output
$6.5 / 1M tokens tokens

MAI-Image 2.5 Benchmarks

BenchmarkScoreWhat it measures
Text-to-Image Arena
1268 (Elo)
Human pairwise preference Elo for image generators

MAI-Image 2.5 vs other models

ModelInputOutputContextBest for
MAI-Image 2.5
This page
$6.5 / 1M
$6.5 / 1M tokens
Image generation at scale
$0.325 / 1M
$1.95 / 1M
Image generation at scale
$6.5 / 1M
$10.4 / 1M tokens
Image generation at scale
$0 / 1M
$0 / 1M
Image generation at scale
$0.0195 / MP (variable)
Image generation at scale

Start building with MAI-Image 2.5

Get API Key
1000+ models, one API.