# MAI Image 2.7 API

> Microsoft's MAI Image 2.7: text to image and image editing, up to 2K. By Microsoft, on Revana from $0.04 per image.

- Model id: `mai-image-2.7`
- Kind: image
- Maker: Microsoft
- Tasks: Text to image, Image to image
- Resolutions: 1K, 2K
- Input images: up to 5
- Routes: 1
- Status: live on the API
- Page: https://revana.si/models/mai-image-2.7

## Price (per image, USD)

| Setting | Price | Credits |
|---|---|---|
| 1K | $0.04 | 4 |
| 2K | $0.14 | 14 |

100 credits = $1. Charged once, only for the route that succeeds; failed generations cost nothing.

## Request

POST https://api.revana.si/v1/generations with `Authorization: Bearer $REVANA_API_KEY` and an `Idempotency-Key` header: one key per request, made once and sent again on every resend after a timeout, a 429 or a 5xx, so the request is never made or charged twice. After a generation has failed, use a new key.

```json
{
  "model": "mai-image-2.7",
  "input": {
    "prompt": "A product photo of a ceramic coffee cup on a linen tablecloth, soft morning light",
    "resolution": "1K"
  },
  "max_cost_usd": 0.06
}
```

`max_cost_usd` is your cap, the most this request may cost (it lists at $0.04). Poll `GET /v1/generations/{id}` until `status` is `succeeded` or `failed`, then download `GET /v1/generations/{id}/content`. Full API: https://revana.si/llms.txt

## Similar models

- [MAI Image 2.6](https://revana.si/models/mai-image-2.6.md): from $0.04 per image
- [MAI Image 2.6 Flash](https://revana.si/models/mai-image-2.6-flash.md): from $0.02 per image
- [MAI Image 2.7 Flash](https://revana.si/models/mai-image-2.7-flash.md): from $0.02 per image
- [Nano Banana Pro](https://revana.si/models/nano-banana-pro.md): from $0.04 per image
- [Nano Banana 2](https://revana.si/models/nano-banana-2.md): from $0.03 per image
- [GPT Image 2](https://revana.si/models/gpt-image-2.md): from $0.03 per image

