Skip to main content
POST
/
openai
/
images
/
edits
Openai Images Edits
curl --request POST \
  --url https://api.acedata.cloud/openai/images/edits \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'image=<string>' \
  --form 'prompt=<string>' \
  --form background=auto \
  --form input_fidelity=high \
  --form mask='@example-file' \
  --form model=dall-e-3 \
  --form n=1 \
  --form output_compression=100 \
  --form output_format=png \
  --form partial_images=0 \
  --form quality=auto \
  --form response_format=url \
  --form size=1024x1024 \
  --form 'callback_url=<string>' \
  --form image.items='@example-file'
{
  "data": [
    {
      "url": "<string>",
      "b64_json": "<string>",
      "revised_prompt": "<string>"
    }
  ],
  "created": 123
}

Authorizations

Authorization
string
header
required

Headers

accept
enum<string>

Specifies the response format. Only application/json is supported.

Available options:
application/json
Content-Type
enum<string>
required

Upload uses multipart form data.

Available options:
multipart/form-data

Body

multipart/form-data
image
file[]
required

Image(s) to edit. GPT image models: up to 16 images (png/webp/jpg) <50MB each. dall-e-2: single square PNG <4MB.

Maximum array length: 16
prompt
string
required

Text description of the desired edit. Max 1000 characters for dall-e-2, 32000 for GPT image models.

background
enum<string>
default:auto

GPT image models only. Transparency handling: transparent, opaque, or auto (default). Use png/webp output when requesting transparency.

Available options:
transparent,
opaque,
auto
input_fidelity
enum<string>

How strongly to match input style/features. Supported for gpt-image-1; not supported for gpt-image-1-mini.

Available options:
high,
low
mask
file

Optional mask (PNG <4MB, same dimensions as first image). Transparent areas indicate editable regions.

model
enum<string>
default:dall-e-3

Model for image editing. Only dall-e-3 and GPT image models are supported.

Available options:
dall-e-3,
gpt-image-1,
gpt-image-1.5
n
integer
default:1

Number of images to generate (1-10).

Required range: 1 <= x <= 10
output_compression
integer
default:100

Compression level (0-100%) for GPT image models when using webp or jpeg output.

Required range: 0 <= x <= 100
output_format
enum<string>
default:png

Return format for GPT image models: png, jpeg, or webp.

Available options:
png,
jpeg,
webp
partial_images
integer
default:0

Number of partial images in streaming responses (0-3). 0 returns only the final image event.

Required range: 0 <= x <= 3
quality
enum<string>
default:auto

Image quality. GPT image models: auto (default), high, medium, low. dall-e-2: standard only.

Available options:
auto,
high,
medium,
low,
standard
response_format
enum<string> | null
default:url

Format for dall-e-2 responses: url or b64_json. GPT image models always return base64.

Available options:
url,
b64_json
Example:

"url"

size
enum<string> | null
default:1024x1024

Image size. GPT image models: 1024x1024, 1536x1024 (landscape), 1024x1536 (portrait), or auto. dall-e-2: 256x256, 512x512, or 1024x1024.

Available options:
1024x1024,
1536x1024,
1024x1536,
256x256,
512x512,
auto
Example:

"1024x1024"

callback_url
string

Optional callback URL. When provided, the API returns a task_id immediately and POSTs the result to this URL once image editing completes. The callback payload includes task_id, trace_id, success (boolean), and the full response data or error.

Response

Image generated successfully or operation performed successfully.

data
object[]
required
created
number
required