mai-image-2.7-flash — API, Pricing & Image Tokens | Vivgrid
MAI Image 2.7 Flash on Vivgrid for low-latency generation and editing, with separate text input, image input, and image output pricing.
MAI Image 2.7 Flash is a Microsoft image generation and editing model for low-latency generation and editing. Use it for interactive revisions and high-volume image generation.
Specifications
| Provider | Microsoft |
| Model ID | mai-image-2.7-flash |
| Best for | Image generation |
| Context window | 32,000 tokens |
| Max output | 4,096 tokens |
| Modalities | Text, Image |
| Tool / function calling | No |
| Knowledge cutoff | — |
| Acceleration | 🌐 Global (Centralized) |
Pricing
Pricing in USD per 1M tokens.
| Token type | Input | Cached input | Output |
|---|---|---|---|
| Text | $1.75 | — | $0.00 |
| Image | $2.50 | — | $10.00 |
API surfaces
Generate a PNG with /v1/images/generations or edit an image with /v1/images/edits. Both endpoints use the same Vivgrid API key.
Quick start
Get an API key from the Vivgrid Console. These examples require curl, jq, and base64. Each request saves the JSON response and decodes the PNG.
export VIVGRID_API_KEY='YOUR_VIVGRID_API_KEY'Generate an image
curl --silent --show-error --fail-with-body \
--request POST https://api.vivgrid.com/v1/images/generations \
--header "Authorization: Bearer ${VIVGRID_API_KEY}" \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-binary '{
"model": "mai-image-2.7-flash",
"prompt": "A single centered blue circle on a white background, simple flat geometric illustration, no text.",
"size": "768x768"
}' \
--output mai-image-2.7-flash-generation.json &&
jq -er '.data[0].b64_json' mai-image-2.7-flash-generation.json |
base64 --decode > mai-image-2.7-flash-generated.pngEdit the generated image
This example uploads the PNG from the previous step as multipart form data. You can send up to five JPEG or PNG reference images by repeating the image field.
curl --silent --show-error --fail-with-body \
--request POST https://api.vivgrid.com/v1/images/edits \
--header "Authorization: Bearer ${VIVGRID_API_KEY}" \
--header 'Accept: application/json' \
--form 'model=mai-image-2.7-flash' \
--form 'prompt=Change the blue circle to orange. Keep the white background.' \
--form '[email protected];type=image/png' \
--output mai-image-2.7-flash-edit.json &&
jq -er '.data[0].b64_json' mai-image-2.7-flash-edit.json |
base64 --decode > mai-image-2.7-flash-edited.pngThe usage object in each saved JSON response contains the token counts.
Text input, reference images, and generated images are metered separately. The model supports images up to 2,048 × 2,048 pixels.
Related models
mai-image-2.7New
MAI Image 2.7 on Vivgrid for precise edits and visual consistency across iterations, with separate text input, image input, and image output pricing.
gpt-image-2.5-flare
gpt-image-2.5-flare on Vivgrid: OpenAI's gpt-image-2.5 image model via the OpenAI-compatible Images API, with per-token text and image pricing.