Skip to content

Edit Images (Edits)

  • Endpoint: POST https://api.olddog.shop/v1/images/edits
  • Content-Type: multipart/form-data

Edit an input image (e.g. inpainting, background replacement, adding elements). Compatible with the OpenAI Images Edits multipart upload style.

Request parameters

NameTypeRequiredDescription
imagefileYesSource image file (PNG/JPG, etc., subject to server support).
maskfileNoMask image (typically PNG). Transparent areas indicate editable regions.
promptstringYesEdit prompt.
modelstringNoImage model ID (if supported).
nintegerNoNumber of outputs. Default 1.
sizestringNoSize, e.g. 1024x1024.
response_formatstringNourl or b64_json. Default url.
userstringNoEnd-user identifier.

cURL example (with mask)

bash
curl --request POST "https://api.olddog.shop/v1/images/edits" \
  --header "Authorization: Bearer $OLD_DOG_API_KEY" \
  --form "image=@./input.png" \
  --form "mask=@./mask.png" \
  --form "prompt=把天空替换成晚霞,并在右上角添加一只风筝" \
  --form "size=1024x1024"