Media · Image · Replace image background
Replace ONLY the background behind the detected subject — with a solid
color, another image, or transparency. Set replace_type to color
(needs replace_color), image (needs replace_image), or transparent.
To blur rather than replace use blurBackground; to cut the subject out
entirely use removeBackground. Async — returns a task_id (auto-polled).
Authentication
AuthorizationApi-Key
Header authentication of the form Api-Key <token>
OR
AuthorizationBearer
Bearer authentication of the form Bearer <token>, where token is your auth token.
Request
This endpoint expects an object.
image_url
URL of the source image.
replace_type
What to replace the background with.
Allowed values:
replace_color
Hex color for replacement (required when replace_type=color).
replace_image
URL of background image (required when replace_type=image).
Response
Async task queued.
task_id
Poll GET /api/v1/tasks/{task_id} until SUCCESS or FAILURE.
