---
title: "MAI Image 2.6 Flash"
description: "微软面向快速出图的图片生成与编辑模型"
seo:
  title: "MAI Image 2.6 Flash API 文档：参数与调用示例"
  description: "MAI Image 2.6 Flash API 文档：模型 ID microsoft/mai-image-2.6-flash、输入模式、参数取值与默认值，附请求示例。微软面向快速出图的图片生成与编辑模型。"
---

{/* 由 scripts/generate-model-pages.mjs 根据 openapi/model-contracts.json 生成，请勿手改；补充说明写在 docs/zh/models/_notes/ */}

| 模型 ID | 别名 | 接口 |
| --- | --- | --- |
| `microsoft/mai-image-2.6-flash` | `mai-image-2.6-flash` | [图片生成](/zh/docs/guides/image-generation) |

## 输入模式

| 模式 | 参考数量 | 参考角色 |
| --- | --- | --- |
| `text` 纯文本 | — | — |
| `image` 图片输入 | 1–5 | `reference_image` |

## 参数

| 参数 | 说明 | 取值 | 默认值 | 必填 |
| --- | --- | --- | --- | --- |
| `resolution` | 分辨率：输出内容的分辨率。 仅 `text` 模式。 | `1K`、`2K` | `1K` | 否 |
| `resolution` | 分辨率：输出内容的分辨率。 仅 `image` 模式。 | `auto` | `auto` | 否 |
| `aspect_ratio` | 画幅：输出内容的宽高比。 2K 时仅支持 1:1, 4:3, 3:4。 仅 `text` 模式。 | `1:1`、`4:3`、`3:4`、`16:9`、`9:16` | `1:1` | 否 |
| `aspect_ratio` | 画幅：输出内容的宽高比。 仅 `image` 模式。 | `auto` | `auto` | 否 |
| `size` | 精确尺寸：精确输出像素，仅选择明确支持的渠道；与分辨率档位或画幅冲突时拒绝。 仅 `text` 模式。 | `1024x1024`、`1152x864`、`864x1152`、`1536x864`、`864x1536`、`1536x1536`、`1536x1152`、`1152x1536` | 不设置 | 否 |
| `n` | 单次请求输出数量：单次 API 请求（一个 Job）的输出数量，不是应用的批量张数。应用可提交多个独立请求组成一批；n=1 不表示应用只能生成一张。 | `1` | `1` | 否 |

## 示例

`text` 输入：

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

`image` 输入：

```json
{
  "model": "microsoft/mai-image-2.6-flash",
  "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
  }
}
```

完整合同以 `GET /v1/models/microsoft/mai-image-2.6-flash?view=contract` 为准。参数合法不代表每个渠道都能执行，请对完整请求[报价](/zh/docs/concepts/billing#获取报价)。价格与渠道见[模型市场](https://yir.ai/zh/models)。
