{"servers":[{"url":"https://api.modellix.ai/api/v1/microsoft/mai-image-2.6-edit"}],"post":{"description":"[Core Function] MAI Image 2.6 Edit is Microsoft's latest prompt-guided image editing model in the MAI Image family. [Strengths] It applies targeted edits to a single source image with the same quality gains as MAI Image 2.6 generation. [Best For] Highly recommended for: object edits, layout changes, text cleanup, and iterative photorealistic retouching. [Limitations] Do NOT use this if the caller provides more than one source image, a data URI, or a URL that is not publicly reachable over HTTP or HTTPS. It accepts exactly one JPEG or PNG image URL, and output is always PNG. auto_aspect_ratio and web_grounding are optional booleans; omit them unless the caller sets them. [Routing] Use this model when the latest MAI edit quality is required. For faster or lower-cost edits, route to MAI Image 2.6 Flash Edit.","operationId":"maiImage26EditAsync","requestBody":{"content":{"application/json":{"examples":{"basic":{"summary":"Single source image","value":{"images":["https://example.com/photo.png"],"prompt":"Convert this photo into a cinematic film still with dramatic lighting"}},"with_optional_flags":{"summary":"Optional auto aspect ratio and web grounding","value":{"auto_aspect_ratio":true,"images":["https://example.com/photo.png"],"prompt":"Convert this photo into a cinematic film still with dramatic lighting","web_grounding":true}}},"schema":{"description":"Microsoft MAI Image 2.6 edit request. Shared by MAI Image 2.6 Edit and 2.6 Flash Edit. Accepts exactly one source image (JPEG or PNG); output is always PNG. auto_aspect_ratio and web_grounding are optional; omit them to leave upstream defaults (do not send the fields).","properties":{"auto_aspect_ratio":{"description":"Optional. When true, the model chooses the output aspect ratio from the prompt and source image. Omit this field unless the caller explicitly wants model-directed framing.","type":"boolean"},"images":{"description":"Exactly one source image. The item must be a publicly accessible HTTP or HTTPS image URL (JPEG or PNG only).","example":["https://example.com/photo.png"],"items":{"minLength":1,"type":"string"},"maxItems":1,"minItems":1,"type":"array"},"prompt":{"description":"Text description of the edit to apply. Platform limit is 32,000 UTF-8 bytes, not Unicode characters.","example":"Turn this photo into a watercolor painting","maxLength":32000,"minLength":1,"type":"string"},"web_grounding":{"description":"Optional. When true, the model may retrieve current public information (Bing) as extra context. Omit this field unless the caller explicitly wants web-grounded editing.","type":"boolean"}},"required":["prompt","images"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"code":0,"data":{"get_result":{"method":"GET","url":"https://api.modellix.ai/api/v1/tasks/task-mai-i2i-26-001"},"model_id":"microsoft/mai-image-2.6-edit","status":"pending","task_id":"task-mai-i2i-26-001"},"message":"success"},"schema":{"properties":{"code":{"description":"Response code, 0 indicates success","example":0,"type":"integer"},"data":{"description":"Detailed data about the submitted asynchronous task.","properties":{"get_result":{"description":"API information to query the task result","properties":{"method":{"example":"GET","type":"string"},"url":{"example":"https://api.modellix.ai/api/v1/tasks/task-abc123","type":"string"}},"type":"object"},"model_id":{"description":"Model ID in `provider/model` format","example":"microsoft/mai-image-2.5-edit","type":"string"},"status":{"description":"Task status","enum":["pending","processing"],"example":"pending","type":"string"},"task_id":{"description":"Unique task identifier for polling","example":"task-abc123","type":"string"}},"required":["status","task_id","model_id"],"type":"object"},"message":{"description":"Response message","example":"success","type":"string"}},"required":["code","message","data"],"type":"object"}}},"description":"Task submitted successfully"},"400":{"content":{"application/json":{"example":{"code":400,"message":"Invalid parameters: parameter 'images' is required"},"schema":{"properties":{"code":{"example":400,"type":"integer"},"message":{"example":"Invalid parameters: parameter 'images' is required","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"example":{"code":401,"message":"Authentication failed: invalid API key"},"schema":{"properties":{"code":{"example":400,"type":"integer"},"message":{"example":"Invalid parameters: parameter 'images' is required","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"Unauthorized - Invalid or missing API Key"},"429":{"content":{"application/json":{"example":{"code":429,"message":"Rate limit exceeded: 100 requests per minute, retry after 60 seconds"},"schema":{"properties":{"code":{"example":400,"type":"integer"},"message":{"example":"Invalid parameters: parameter 'images' is required","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"Too many requests - Rate limit exceeded","headers":{"X-RateLimit-Limit":{"description":"Maximum requests per minute","schema":{"example":100,"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining quota in current window","schema":{"example":0,"type":"integer"}},"X-RateLimit-Reset":{"description":"Rate limit window reset time (Unix timestamp)","schema":{"example":1704067260,"type":"integer"}}}},"500":{"content":{"application/json":{"example":{"code":500,"message":"Internal server error"},"schema":{"properties":{"code":{"example":400,"type":"integer"},"message":{"example":"Invalid parameters: parameter 'images' is required","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"Internal server error"}},"summary":"MAI Image 2.6 Edit","x-mint":{"href":"microsoft/mai-image-2-6-edit"}}}