BazaarLinkBazaarLink
Sign in
DocsAPI ReferenceSDK ReferenceAgentic UsageAI Skills
Images

Edit an image

Uploads source images as multipart/form-data and edits them with a text prompt — compatible with OpenAI client.images.edit(). Reuses the image-to-image pipeline internally; the response is always sync JSON. mask is not supported yet, and response_format only supports URLs (b64_json is rejected).

POST/api/v1/images/edits

Authorizations

Authorizationrequired
string · header

API key as bearer token in the Authorization header.

Body

imagerequired
file

Source image file(s) to edit. Repeat the image field (or use image[]) for multiple files — up to 8, 10 MB each, MIME must be image/*.

≤ 8 files, ≤ 10 MB each, image/*
promptrequired
string

Text description of the edit to apply.

minLength: 1
Example: "change the background to a night city"
model
string

The image edit model. When omitted, the server default applies (currently gpt-5.4-image-2).

Example: "openai/gpt-5.4-image-2"
n
integer

Number of results to generate, 1–10.

1–10
Example: 1
size
string

Output size, must be a "<width>x<height>" pixel string (e.g. 1024x1024); values in any other format are silently ignored.

format: <width>x<height>
Example: "1024x1024"

Deep guide →

POST /api/v1/images/edits
curl https://bazaarlink.ai/api/v1/images/edits \
  -H "Authorization: Bearer $BAZAARLINK_API_KEY" \
  -F model="openai/gpt-5.4-image-2" \
  -F image=@cat.png \
  -F prompt="change the background to a night city"
Response examples

Success. Always returns sync JSON (the SSE stream is drained internally) — compatible with client.images.edit().

{
  "created": 1753500000,
  "data": [
    {
      "url": "https://bazaarlink.ai/api/v1/images/proxy/eyJhbGciOi..."
    }
  ]
}
Support
Support
Hi! How can we help you?
Send a message and we'll get back to you soon.
Edit an image — BazaarLink API