Edit Image
client.images.edit(params)/v1/images/editsEdit one or more uploaded images through SandBase's synchronous OpenAI Images-compatible multipart endpoint.
Request body
ImageEditParamsOne of gpt-image-2, gpt-image-2.5-flare, or gpt-image-2.5-sunburst.
Text description of the requested edit.
One or more source image files. Repeat the multipart field for multiple images.
Optional mask image for inpainting.
Number of edited images to return when supported.
Output dimensions supported by the model.
Output quality supported by the model.
Output background setting.
How closely supported models should preserve source-image details.
Output encoding such as png, webp, or jpeg.
Output compression level from 0 to 100.
Provider-compatible end-user identifier.
Multipart uploads
Send model, prompt, and image as multipart/form-data. Repeating the image field preserves multiple source files.
Synchronous only
stream=true, mode=stream, and mode=async are rejected.
Errors
Invalid multipart body, unsupported model, streaming mode, or provider request.
Missing or invalid API key.
Organization or API Key spending limit reached.
API key scope does not authorize this endpoint.
The routed image-edit model is unavailable.
Rate limit exceeded.
Request persistence or response processing failed.
The provider returned an invalid native response.
No provider route succeeded.