Remove or replace objects in images using mask-based editing.
POSThttps://api.aitronos.com/v1/images/cleanup
provider string required
Provider to use. Values: openai, clipdrop.
organization_id string required
Organization ID (org_ prefixed string).
image_file file required
Image file to process (PNG, JPEG, WebP).
mask_file file required
Mask file (PNG with alpha channel) indicating areas to clean up.
mode string optional
Mode for Clipdrop. Values: fast, quality.
prompt string optional
Prompt for OpenAI describing desired changes.
Returns raw image bytes (PNG format) with provider metadata in response headers.
X-Provider- Provider that processed the requestX-Provider-Request-Id- Provider's request IDX-Provider-Credits-Consumed- Credits consumed (Clipdrop only)
Bash
- Bash
- Python
- JavaScript
curl -X POST "https://api.aitronos.com/v1/images/cleanup" \
-H "X-API-Key: $FREDDY_API_KEY" \
-F "provider=clipdrop" \
-F "organization_id=org_abc123" \
-F "image_file=@photo.jpg" \
-F "mask_file=@mask.png" \
-F "mode=quality" \
--output cleaned.pngResponse:
Returns raw image bytes (PNG format).
Response Headers:
Content-Type: image/png
X-Provider: clipdrop
X-Provider-Request-Id: req_abc123
X-Provider-Credits-Consumed: 1