Edit an existing image with GPT Image 2 using a text prompt. Accepts a multipart/form-data body.
Documentation Index
Fetch the complete documentation index at: https://docs.anyfast.ai/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Source image file to edit. Common formats (png, jpeg, webp) are accepted.
Model ID. Use gpt-image-2 for the official model, or gpt-image-2-c for the reverse-engineered variant (supports response_format).
gpt-image-2, gpt-image-2-c "gpt-image-2"
Text description of the edit you want to apply.
"Generate a cartoon-style avatar of this character with a humorous tone, on a rectangular background colored RGB(153, 162, 212)"
Mask image file with an alpha channel. Indicates which areas of the source image to edit. Must be the same format and same size as the source image (< 50MB). Requires selecting the Direct group.
Number of images to return. Supports 1–10. Default: 1. Requires selecting the Direct group in the console.
1 <= x <= 101
Output image size in {width}x{height} format. Same flexible-resolution constraints as image generation.
"1024x1024"
Response format. Only supported by gpt-image-2-c (reverse-engineered variant). Currently only url is supported.
url "url"
Image edited successfully.
Array of edited images.