{"servers":[{"url":"https://api.modellix.ai/api/v1/openai/gpt-image-2-edit"}],"post":{"description":"[Core Function] GPT Image 2 Edit is a high-resolution image-to-image editing model. [Strengths] It excels at making high-fidelity edits and style transformations to a single source image based on a text prompt, preserving details at up to 4K resolutions. [Best For] Highly recommended for: professional photo retouching, upscaling style transfers, and modifying high-resolution concept art. [Limitations] Do NOT use this model for multi-image merging (it only accepts one input image). Do NOT use if you need precise input fidelity control or transparent backgrounds. [Routing] Use this model by default when the user wants to edit a single image and prioritize output resolution/quality. If they need to merge multiple images or control the strictness of the edit (fidelity), use GPT Image 1.5 Edit.","operationId":"gptImage2EditAsync","requestBody":{"content":{"application/json":{"examples":{"advanced_4k":{"summary":"4K high-resolution editing","value":{"images":["https://example.com/input.png"],"prompt":"Replace the sky with a dramatic sunset","quality":"high","size":"3840x2160"}},"basic":{"summary":"Basic image editing","value":{"images":["https://example.com/input.png"],"prompt":"Add a watercolor effect to this image"}}},"schema":{"description":"Request payload for GPT Image 2 Edit model.","properties":{"images":{"description":"Input image URL(s) to edit. Direct HTTPS URLs as string array. Supports up to 16 images for GPT Image models","example":["https://example.com/input.png"],"items":{"description":"Direct image URL (https only)","example":"https://example.com/image.png","type":"string"},"maxItems":16,"minItems":1,"type":"array"},"mask":{"description":"Optional mask URL. Must be PNG with alpha channel; dimensions must match the input image exactly. Transparent areas are edited, opaque areas locked, semi-transparent areas blend with the original.","example":"https://example.com/mask.png","type":"string"},"prompt":{"description":"Description of the desired edits, supports up to 32,000 characters","example":"Add a watercolor effect to this image","maxLength":32000,"minLength":1,"type":"string"},"quality":{"default":"low","description":"Output quality level. 'low': fast draft (default), 'medium': balanced, 'high': best quality","enum":["low","medium","high"],"example":"high","type":"string"},"size":{"default":"1024x1024","description":"Output size as width x height, or 'auto' for model-selected size. Presets are valid under OpenAI constraints (total pixels 655360-8294400, edges multiples of 16). Mapping: 1:1 1K/2K; 3:2 1K/2K; 2:3 1K/2K; 4:3 1K/2K; 3:4 1K/2K; 16:9 2K/4K; 9:16 2K/4K. No 1K for 16:9/9:16; no 4K for non-widescreen ratios.","enum":["auto","1024x1024","2048x2048","1536x1024","3072x2048","1024x1536","2048x3072","1024x768","2048x1536","768x1024","1536x2048","2048x1152","3840x2160","1152x2048","2160x3840"],"example":"1024x1024","type":"string"}},"required":["images","prompt"],"type":"object"}}},"description":"Request payload for GPT Image 2 Edit model.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"description":"Response object for asynchronous task submission.","properties":{"code":{"description":"Response code, 0 indicates success","example":0,"type":"integer"},"data":{"description":"Detailed data about the submitted asynchronous task.","properties":{"model_id":{"description":"Model identifier used for this task","example":"gpt-image-2-edit","type":"string"},"status":{"description":"Task status","enum":["pending","processing","completed","failed"],"example":"pending","type":"string"},"task_id":{"description":"Unique task identifier for status polling","example":"task_abc123xyz","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":{"schema":{"description":"Standard error response object.","properties":{"code":{"description":"Error code","example":400,"type":"integer"},"details":{"additionalProperties":true,"description":"Additional error details","type":"object"},"message":{"description":"Error message","example":"Invalid request parameters","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"schema":{"description":"Standard error response object.","properties":{"code":{"description":"Error code","example":400,"type":"integer"},"details":{"additionalProperties":true,"description":"Additional error details","type":"object"},"message":{"description":"Error message","example":"Invalid request parameters","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"Authentication required or invalid"},"429":{"content":{"application/json":{"schema":{"description":"Standard error response object.","properties":{"code":{"description":"Error code","example":400,"type":"integer"},"details":{"additionalProperties":true,"description":"Additional error details","type":"object"},"message":{"description":"Error message","example":"Invalid request parameters","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"description":"Standard error response object.","properties":{"code":{"description":"Error code","example":400,"type":"integer"},"details":{"additionalProperties":true,"description":"Additional error details","type":"object"},"message":{"description":"Error message","example":"Invalid request parameters","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"Internal server error"}},"summary":"GPT Image 2 Edit","tags":["GPT Image Edit"],"x-mint":{"href":"openai/gpt-image-2-edit"}}}