GPT Image 2 Edit
[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.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Request payload for GPT Image 2 Edit model.
Request payload for GPT Image 2 Edit model.
Description of the desired edits, supports up to 32,000 characters
1 - 32000"Add a watercolor effect to this image"
Input image URL(s) to edit. Direct HTTPS URLs as string array. Supports up to 16 images for GPT Image models
1 - 16 elementsDirect image URL (https only)
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.
auto, 1024x1024, 2048x2048, 1536x1024, 3072x2048, 1024x1536, 2048x3072, 1024x768, 2048x1536, 768x1024, 1536x2048, 2048x1152, 3840x2160, 1152x2048, 2160x3840 "1024x1024"
Output quality level. 'low': fast draft (default), 'medium': balanced, 'high': best quality
low, medium, high "high"
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.
"https://example.com/mask.png"