MAI Image 2.5

Developer documentation

MAI Image 2.5

MAI Image 2.5 for image generation or editing workflows.

Model Reference

Image generation and editing models

Prompt-to-image, image editing, image merging, upscaling, and background removal. Endpoint: http://omixa.cloud/api/v1/images/generations

MAI Image 2.5

MAI-Image-2.5

MAI Image 2.5 for image generation or editing workflows.

Image Streaming Context window: 32,000 tokens Streaming supported
input per 1m tokens $5.000000
output per 1m tokens $33.000000
image per unit $0.033000
Integration reference

Connect MAI Image 2.5

Use Omixa's unified endpoint and your workspace API key. Provider routing, billing, failover, and usage records are handled by Omixa.

POST http://omixa.cloud/api/v1/images/generations
  • Provider: azure-foundry
  • Endpoint type: azure_foundry_image_generation
  • Context window: 32,000 tokens
  • Streaming supported
Request schema

Request fields

Only send options supported by this model. Required fields and accepted values are listed below.

Field Type Required Accepted values Description
model string Yes MAI-Image-2.5 Use `MAI-Image-2.5`. Omixa resolves the active provider route and failover key automatically.
prompt string Yes Any valid value Natural language instruction for the generated or edited image.
n integer No 1-10 Number of images to request. Omixa caps the value by provider limits.
output_format string No png, jpeg, webp Preferred output file format.
size string No auto, 1024x1024, 1024x1536, 1536x1024 Output size.
quality string No auto, low, medium, high Image quality tier. Higher quality costs more and takes longer.
background string No auto, transparent, opaque Background handling for compatible GPT image models.
moderation string No auto, low Provider moderation mode where supported.
input_images array No Any valid value Reference/source images for edit and merge workflows. Use inline data URLs in OpenAI-compatible image part format.
input_fidelity string No auto, low, high How closely to preserve source images for GPT image edits when supported.
mask image data No Any valid value Optional edit mask for compatible image edit routes.
Ready to send

Payload and response

Start with this model-safe payload and expect the normalized Omixa response shape shown beside it.

Example JSON payload
{
    "model": "MAI-Image-2.5",
    "prompt": "A premium black and white product dashboard, clean glass UI, high contrast.",
    "n": 1,
    "output_format": "png",
    "size": "1024x1024",
    "quality": "auto",
    "background": "auto",
    "input_images": [
        {
            "type": "image_url",
            "image_url": {
                "url": "data:image/png;base64,<base64-reference>"
            }
        }
    ]
}
Response shape
{
    "created": 1780660800,
    "data": [
        {
            "b64_json": "<base64-image>",
            "url": null
        }
    ],
    "usage": {
        "billed_amount": "0.039000"
    }
}
Language examples

Copy-ready integration code

Replace the example API key with a workspace key and keep model-specific fields unchanged unless the table above marks them optional.

cURL
curl -X POST http://omixa.cloud/api/v1/images/generations \
  -H "Authorization: Bearer omx_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "MAI-Image-2.5",
    "prompt": "A premium black and white product dashboard, clean glass UI, high contrast.",
    "n": 1,
    "output_format": "png",
    "size": "1024x1024",
    "quality": "auto",
    "background": "auto",
    "input_images": [
        {
            "type": "image_url",
            "image_url": {
                "url": "data:image/png;base64,<base64-reference>"
            }
        }
    ]
}'
JavaScript fetch
const response = await fetch('http://omixa.cloud/api/v1/images/generations', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer omx_live_xxx',
    'Content-Type': 'application/json'
  },
  body: "{\n    \"model\": \"MAI-Image-2.5\",\n    \"prompt\": \"A premium black and white product dashboard, clean glass UI, high contrast.\",\n    \"n\": 1,\n    \"output_format\": \"png\",\n    \"size\": \"1024x1024\",\n    \"quality\": \"auto\",\n    \"background\": \"auto\",\n    \"input_images\": [\n        {\n            \"type\": \"image_url\",\n            \"image_url\": {\n                \"url\": \"data:image/png;base64,<base64-reference>\"\n            }\n        }\n    ]\n}"
});
const data = await response.json();
Python requests
import requests

response = requests.post(
    'http://omixa.cloud/api/v1/images/generations',
    headers={'Authorization': 'Bearer omx_live_xxx', 'Content-Type': 'application/json'},
    json={
    "model": "MAI-Image-2.5",
    "prompt": "A premium black and white product dashboard, clean glass UI, high contrast.",
    "n": 1,
    "output_format": "png",
    "size": "1024x1024",
    "quality": "auto",
    "background": "auto",
    "input_images": [
        {
            "type": "image_url",
            "image_url": {
                "url": "data:image/png;base64,<base64-reference>"
            }
        }
    ]
}
)
print(response.json())
PHP cURL
$ch = curl_init('http://omixa.cloud/api/v1/images/generations');
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_HTTPHEADER => ['Authorization: Bearer omx_live_xxx', 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => '{
    "model": "MAI-Image-2.5",
    "prompt": "A premium black and white product dashboard, clean glass UI, high contrast.",
    "n": 1,
    "output_format": "png",
    "size": "1024x1024",
    "quality": "auto",
    "background": "auto",
    "input_images": [
        {
            "type": "image_url",
            "image_url": {
                "url": "data:image/png;base64,<base64-reference>"
            }
        }
    ]
}',
    CURLOPT_RETURNTRANSFER => true,
]);
$response = curl_exec($ch);
C# HttpClient
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", "omx_live_xxx");
var json = @"{
    ""model"": ""MAI-Image-2.5"",
    ""prompt"": ""A premium black and white product dashboard, clean glass UI, high contrast."",
    ""n"": 1,
    ""output_format"": ""png"",
    ""size"": ""1024x1024"",
    ""quality"": ""auto"",
    ""background"": ""auto"",
    ""input_images"": [
        {
            ""type"": ""image_url"",
            ""image_url"": {
                ""url"": ""data:image/png;base64,<base64-reference>""
            }
        }
    ]
}";
var response = await client.PostAsync("http://omixa.cloud/api/v1/images/generations", new StringContent(json, System.Text.Encoding.UTF8, "application/json"));
var body = await response.Content.ReadAsStringAsync();
Go net/http
payload := []byte(`{
    "model": "MAI-Image-2.5",
    "prompt": "A premium black and white product dashboard, clean glass UI, high contrast.",
    "n": 1,
    "output_format": "png",
    "size": "1024x1024",
    "quality": "auto",
    "background": "auto",
    "input_images": [
        {
            "type": "image_url",
            "image_url": {
                "url": "data:image/png;base64,<base64-reference>"
            }
        }
    ]
}`)
req, _ := http.NewRequest("POST", "http://omixa.cloud/api/v1/images/generations", bytes.NewReader(payload))
req.Header.Set("Authorization", "Bearer omx_live_xxx")
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
Production checklist

Operational notes

  • Authenticate with `Authorization: Bearer omx_live_xxx`.
  • Omixa handles provider keys, routing, billing, failover, and usage recording behind this endpoint.
  • For edits and reference workflows, send inline image data URLs. Omixa does not fetch arbitrary remote image URLs for providers that require inline media.
Copied Markdown