---
title: "MAI Image 2.7"
description: "Microsoft image generation and multi-reference editing model with up to 2K output"
seo:
  title: "MAI Image 2.7 API Documentation: Parameters & Examples"
  description: "MAI Image 2.7 API documentation: model ID microsoft/mai-image-2.7, input modes, parameters, defaults and request examples. Microsoft image generation and multi-reference editing model with up to 2K output."
---

{/* 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.7` | `mai-image-2.7` | [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. 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`, `2048x2048`, `2048x1536`, `1536x2048`, `2560x1440`, `1440x2560` | 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.7",
  "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.7",
  "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.7?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).
