Microsoft Mai Image 2.5 Pro Text To Image API Documentation

Microsoft Mai Image 2.5 Pro Text To Image API Documentation

Playground

Try it on WaveSpeedAI!

Microsoft MAI Image 2.5 Pro Text-to-Image generates polished, detailed images from natural-language prompts, with strong prompt understanding, clean composition, and high-quality visual output for creative designs, product visuals, marketing assets, and production workflows. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.

Features

Microsoft MAI Image 2.5 Pro Text to Image generates polished, detailed images from natural-language prompts. It supports flexible aspect ratios and common image output formats for creative, marketing, and production workflows.


Why Choose This?

  • High-quality image generation
    Create polished and detailed images from text prompts.

  • Flexible aspect ratios
    Use auto to let the model choose a suitable ratio, or select a fixed layout when needed.

  • Readable typography support
    Generate images that can include text, labels, posters, or layout-driven visual elements.

  • Simple output controls
    Choose the output format based on your workflow needs.

  • Standard image output
    Generated images are returned as URLs in the standard WaveSpeed prediction response.


Parameters

ParameterRequiredDescription
promptYesText description of the image to generate.
aspect_ratioNoOutput aspect ratio. Use auto to let the model choose a suitable ratio.
output_formatNoOutput format: jpeg, png, or webp.

How to Use

  1. Write your prompt — Describe the subject, composition, style, lighting, and any text that should appear in the image.
  2. Choose aspect ratio — Select a fixed aspect ratio or use auto for model-selected framing.
  3. Choose output format — Select jpeg, png, or webp when needed.
  4. Submit — Generate the image and retrieve the output URL.

Pricing

Pricing includes a base image generation cost plus a prompt length surcharge.

ItemPrice
Base image generation$0.18

Example Costs

Prompt LengthPrice
10 characters$0.180075
100 characters$0.18075
500 characters$0.18375
1,000 characters$0.1875
2,000 characters$0.195

Best Use Cases

  • Marketing visuals — Generate campaign images, social graphics, and promotional assets.
  • Product concepts — Create product scenes, branded creative assets, and visual mockups.
  • Detailed illustrations — Generate polished scenes with strong composition and visual detail.
  • Typography-led images — Create images that include readable text, labels, posters, or graphic layouts.
  • Creative production — Produce high-quality images for design, content, and advertising workflows.

Pro Tips

  • Describe the subject, composition, lighting, and style in one focused prompt.
  • Put exact wording in quotation marks when text must appear in the image.
  • Use auto when composition matters more than a fixed canvas ratio.
  • Use png for high-quality general output, jpeg for smaller files, and webp for web-friendly images.
  • Keep prompts clear and specific when layout or typography accuracy matters.

## Authentication

For authentication details, please refer to the [Authentication Guide](/api-authentication).

## API Endpoints

### Submit Task & Query Result

<ApiTabs submitUrl={model.submitUrl} resultUrl={model.resultUrl} payload={model.defaultValues} />

## Parameters

### Task Submission Parameters

#### Request Parameters

<RequestParams params={model.params} />

#### Response Parameters

<SubmitResponse />

#### Result Request Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| id | string | Yes | - | Task ID |

#### Result Response Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., "success") |
| data | object | The prediction data object containing all details |
| data.id | string | Unique identifier for the prediction |
| data.model | string | Model ID used for the prediction |
| data.outputs | array&lt;string \| object&gt; | Array of generated outputs (empty when status is not completed). Items are usually URL strings, but may be text strings or structured result objects, depending on the model. |
| data.urls | object | Object containing related API endpoints |
| data.urls.get | string | URL to poll for the prediction result |
| data.status | string | Status: `created`, `processing`, `completed`, or `failed` |
| data.created_at | string | ISO timestamp of when the request was created |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |
© 2026 WaveSpeedAI. All rights reserved.