AI Models
MAI-Image-2.6 Flash
Microsoft's MAI-Image-2.6 Flash. Lower-latency, lower-cost AI image generation and editing.
POST
from $0.05/image/v1/media/queueOverview
Lower-latency, lower-cost image generation and editing via Microsoft's MAI-Image-2.6 Flash. Async operation — submit a job, poll for completion.
| Property | Value |
|---|---|
| Model ID | microsoft/mai-image-2.6-flash |
| Alias | mai-image-2-6-flash |
| Provider | Microsoft |
| Category | Image Generation |
| Output Formats | png |
| Reference Images | Supported |
| Billing | Dynamic (actual cost per job) |
| Typical Cost | ~$0.05 per image |
Usage
All media models use the async job queue. Submit a job, then poll for the result.
Step 1: Submit Job
Text-to-Image
const res = await fetch('https://api.yepapi.com/v1/media/queue', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
model: 'microsoft/mai-image-2.6-flash',
prompt: 'White running shoes on a pale concrete step, morning side light',
}),
});
const { data } = await res.json();
// data.jobId — use this to poll for resultscurl -X POST https://api.yepapi.com/v1/media/queue \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "microsoft/mai-image-2.6-flash", "prompt": "White running shoes on a pale concrete step, morning side light"}'Image-to-Image (Edit / Transform)
Pass a reference image via imageData alongside your prompt to edit or transform an existing image.
const res = await fetch('https://api.yepapi.com/v1/media/queue', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
model: 'microsoft/mai-image-2.6-flash',
prompt: 'Make the sky purple and add northern lights',
imageData: {
mimeType: 'image/png',
base64: '...', // Base64-encoded image
},
}),
});Step 2: Poll for Result
const status = await fetch(`https://api.yepapi.com/v1/media/status/${data.jobId}`, {
headers: { 'x-api-key': 'YOUR_API_KEY' },
});
const { data: job } = await status.json();
// job.status — "pending" | "processing" | "completed" | "failed"
// job.result.image — { mimeType, base64 } when completedcurl https://api.yepapi.com/v1/media/status/JOB_ID \
-H "x-api-key: YOUR_API_KEY"Request Body
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
model | string | Yes | microsoft/mai-image-2.6-flash or alias mai-image-2-6-flash | — |
prompt | string | Yes | Text description of the image to generate or edit | — |
options.outputFormat | string | No | png | png |
imageData.mimeType | string | No | MIME type of input image (image/png, image/jpeg, image/webp) | — |
imageData.base64 | string | No | Base64-encoded input image for image-to-image editing | — |
Features
- Lower-latency, lower-cost tier of MAI-Image-2.6
- Built for high-throughput production
- Reference-image editing via
imageData - PNG output
Pricing
Billing is dynamic — each job is billed from the actual cost of that generation.
| Metric | Cost |
|---|---|
| Typical cost per image | ~$0.05 |
Info
Image jobs typically complete in 5–60 seconds. Results retained for 1 hour.
Under the Hood
Powered by Microsoft's MAI-Image-2.6 Flash via our AI provider.