---
title: "MAI Image 2.6"
description: "Microsoft image generation and reference image editing model"
seo:
  title: "MAI Image 2.6 API Documentation: Parameters & Examples"
  description: "MAI Image 2.6 API documentation: model ID microsoft/mai-image-2.6, input modes, parameters, defaults and request examples. Microsoft image generation and reference image editing model."
---

{/* Generated by scripts/generate-model-pages.mjs from openapi/model-contracts.json. Do not edit; write notes in docs/models/_notes/ */}

| Model ID | Alias | Endpoint |
| --- | --- | --- |
| `microsoft/mai-image-2.6` | `mai-image-2.6` | [Image generation](/docs/guides/image-generation) |

## Input modes

| Mode | References | Reference roles |
| --- | --- | --- |
| `text` Text only | — | — |
| `image` Image input | 1 to 5 | `reference_image` |

## Parameters

| Parameter | Description | Values | Default | Required |
| --- | --- | --- | --- | --- |
| `resolution` | Resolution: Output resolution. Only in `text`. | `1K`, `2K` | `1K` | No |
| `resolution` | Resolution: Output resolution. Only in `image`. | `auto` | `auto` | No |
| `aspect_ratio` | Aspect ratio: Output aspect ratio. At 2K, use 1:1, 4:3, 3:4. Only in `text`. | `1:1`, `4:3`, `3:4`, `16:9`, `9:16` | `1:1` | No |
| `aspect_ratio` | Aspect ratio: Output aspect ratio. Only in `image`. | `auto` | `auto` | No |
| `size` | Exact size: Exact output pixels; only explicitly compatible supplies are eligible. Conflicting resolution/aspect ratio is rejected. Only in `text`. | `1024x1024`, `1152x864`, `864x1152`, `1536x864`, `864x1536`, `1536x1536`, `1536x1152`, `1152x1536` | Not set | No |
| `n` | Outputs per request: Number of outputs from one API request (one Job), not the application batch size. For multiple Jobs, submit separate requests; n=1 does not prevent application-managed batching. | `1` | `1` | No |

## Examples

`text` input:

```json
{
  "model": "microsoft/mai-image-2.6",
  "input": {
    "type": "text",
    "prompt": "A watercolor fox reading a map in a pine forest"
  },
  "parameters": {
    "resolution": "1K",
    "aspect_ratio": "1:1",
    "n": 1
  }
}
```

`image` input:

```json
{
  "model": "microsoft/mai-image-2.6",
  "input": {
    "type": "image",
    "prompt": "A watercolor fox reading a map in a pine forest",
    "references": [
      {
        "role": "reference_image",
        "file_id": "file_..."
      }
    ]
  },
  "parameters": {
    "resolution": "auto",
    "aspect_ratio": "auto",
    "n": 1
  }
}
```

The authoritative contract is `GET /v1/models/microsoft/mai-image-2.6?view=contract`. A valid parameter does not mean every channel can run it, so [quote](/docs/concepts/billing#get-a-quote) the complete request. Prices and channels are listed in [Model Market](https://yir.ai/models).
