OpenAI Image Editing
Interface description: Compatible endpoint of OpenAI Images API /v1/images/edits (image-to-image). The request, response and error formats fully comply with the OpenAI specifications: application/json and multipart/form-data are supported (images and mask files can be uploaded directly), OpenAI original ImagesResponse is returned, and the AiToEarn universal response package is not used; the image link is the original return from the upstream and is not transferred. Authentication uses Authorization: Bearer <API Key> (OpenAI SDK carries it by default). Existing OpenAI SDK or ecological tools only need to replace the baseURL and API Key to access, and billing is based on AiToEarn points.
The model value comes from data[n].name returned by the “Image Editing Model” interface. If you need the AiToEarn universal response format (code === 0) and the stable image link after dumping, please use the “Edit Image” interface instead.
Authorizations
Used by OpenAI-compatible endpoints. Example: Bearer .
Body
Image editing model name. First call the "Image Editing Models" interface (GET /api/ai/models/image/edit) and pass in the data[n].name returned by it; the size, maximum number of input images and price supported by each model shall be subject to the return of this interface.
Picture list
prompt word
Mask image URL for partial redraw (optional). It needs to be a PNG image with the same size as image: the completely transparent area (alpha is 0) represents the part that needs to be redrawn according to the prompt word, and the opaque area remains unchanged. Edit the entire image when not uploading.
Generate quantity
1 <= x <= 9007199254740991Image size. The optional values vary from model to model, and are subject to the data[n].sizes returned by the "Image Editing Models" interface; the prices for different sizes are different, see data[n].pricing.
Return format
url, b64_json Response
Native third-party protocol response or SSE data, not wrapped in the AiToEarn common response envelope.
Native third-party protocol response, not wrapped in the AiToEarn common response envelope.

