create a task to generate image
image field is absent or null, it performs text-to-image generation.image field is present, it performs image editing based on the provided image.prompt
1model
gpt-image-2 image size
auto, 1024x1024, 1024x1536, 1536x1024 Generation quantity (currently only supports 1)
quality grade
auto, low, medium, high, standard background transparency
transparent, opaque, auto Output file format
png, jpeg, webp JPEG/WebP compression level 0-100
Audit intensity
auto, low Response format (compatible with DALL · E; The gpt image series always returns b64_json)
url, b64_json Input image fidelity (newly added in gpt-image-2, only effective for editing scenes); Generate can be ignored)
high, low Enter an image (URL or base64 data URL). If provided, go through image editing; If not provided, use text and images. Support single or multiple sheets
mask image (only for editing scenes, URL or base64 data URL); transparent areas will be redrawn