Edit images
Edit or combine uploaded reference images with a multipart request; streaming is not supported.
Authentication
AuthorizationBearer
Your production key sent as a bearer token.
Request
This endpoint expects a multipart form with multiple files.
prompt
Text description of the edit.
model
Image model, for example openai/gpt-image-2.
image
One to 16 reference images (PNG, JPEG, or WebP).
image[]
OpenAI SDK spelling of image for multiple uploads.
mask
Mask whose transparent areas mark where the first image is edited.
vendor
Pin the vendor that runs this request.
customer
Customer ID (UUID) to scope this request to, applying that customer’s routing policy, provider keys, budget, and usage attribution.
n
Number of images, 1 to 10.
size
quality
background
input_fidelity
response_format
output_format
output_compression
moderation
user
End-user identifier forwarded to the provider.
stream
Not supported; true returns 400 stream_unsupported.
Response
Successful Response
created
Unix timestamp in seconds.
data
Generated images.
usage
Token usage reported by the provider; absent for flat per-image models.
images_generated
Number of images generated.
cost
Cost of the request in USD; null when the route is unpriced.
Errors
422
Unprocessable Entity Error