Skip to main content
POST
/
v1
/
images
/
edits
curl https://gateway.bud.studio/v1/images/edits \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "image=@original.png" \
  -F "mask=@mask.png" \
  -F "prompt=Add a red hat to the person" \
  -F "model=dall-e-2" \
  -F "n=1" \
  -F "size=1024x1024"
{
  "created": 1699000000,
  "data": [
    {
      "url": "https://storage.example.com/edited_image_abc123.png",
      "b64_json": null
    }
  ]
}
curl https://gateway.bud.studio/v1/images/edits \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "image=@original.png" \
  -F "mask=@mask.png" \
  -F "prompt=Add a red hat to the person" \
  -F "model=dall-e-2" \
  -F "n=1" \
  -F "size=1024x1024"
{
  "created": 1699000000,
  "data": [
    {
      "url": "https://storage.example.com/edited_image_abc123.png",
      "b64_json": null
    }
  ]
}

Headers

ParameterTypeRequiredDescription
AuthorizationstringYesBearer authentication header

Body

ParameterTypeRequiredDescription
imagefileYesImage to edit (PNG only, must have transparency)
maskfileNoMask image indicating areas to edit (PNG with transparency)
promptstringYesText description of the desired edit
modelstringYesModel identifier (e.g., dall-e-2)
nintegerNoNumber of images to generate (1-10). Default: 1
sizestringNoImage size: 256x256, 512x512, 1024x1024. Default: 1024x1024
response_formatstringNoResponse format: url or b64_json. Default: url
userstringNoUnique identifier for end-user

Supported Providers

OpenAI

DALL-E 2 for image editing with masks

Azure OpenAI

Enterprise DALL-E 2 image editing