MAI-Image 2.5 API

microsoft/mai-image-2.5
MAI-Image 2.5 API is Microsoft's text-to-image model for generating high-quality visuals from natural language prompts.
Output
$6.5 / 1M
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
Output
$6.5 / 1M

MAI-Image 2.5 Benchmarks

BenchmarkScoreWhat it measuresSourceRetrieved
Text-to-Image Arena
1268 (Elo)
Human preference Elo from blind pairwise comparisons of generated images, measured independently by Artificial AnalysisSourceJuly 12, 2026

MAI-Image 2.5 vs other models

ModelInputOutputContextBest for
MAI-Image 2.5
This page
$6.5 / 1M
$6.5 / 1M
Image generation at scale
$0.325 / 1M tokens
$78 / 1M tokens
128K tokens
Image generation at scale
$6.5 / 1M tokens
$39 / 1M tokens
Image generation at scale
Image generation at scale
$0.0195 / MP (variable)
Image generation at scale

Frequently asked questions

MAI-Image 2.5 takes image, text as input and returns image.

MAI-Image 2.5 became available on June 3, 2026.

MAI-Image 2.5 is priced at $6.5 / 1M.

MAI-Image 2.5 is billed per generation — a fixed charge per output rather than by prompt length.

Yes, MAI-Image 2.5 accepts image input as well as a text prompt.

MAI-Image 2.5 was built by Microsoft.

Send a request to https://api.aimlapi.com/v1/images/generations with microsoft/mai-image-2.5 as the model id.

Yes. MAI-Image 2.5 is served through AI/ML API, so the same key and endpoint format used for other models applies.

Start building with MAI-Image 2.5

Get API Key
1000+ models, one API.