POST /image/remove-background or mynth.image.removeBackground() to get a transparent version of a single existing image. Mynth picks the model, so the request has no model field. The API creates an async task and returns a taskId. The SDK waits for completion by default; use removeBackgroundAsync() when you want to poll yourself.
Pricing
/image/remove-background costs $0.02 per image. You are charged only when the task completes successfully.
The cost is reserved up front. If the task fails, the reserve is released. If your balance cannot cover the reserve, the request returns 422 INSUFFICIENT_BALANCE.
Remove a background with the SDK
Local files
Passfile instead of url when the image is local. The SDK uploads first, then calls /image/remove-background with the resulting URL. See Upload input images.
Output format
The result keeps the format the provider returned. Setoutput.format to always get png or webp. jpg is not accepted because it cannot store transparency.
Metadata, webhooks, and destinations
The request accepts the samemetadata, webhook, and destination fields as image generation:
image.url is the destination URL. If the upload fails, image.url is null and image.mynth_url still points at the Mynth CDN. See Use Destinations and Use webhooks.
Remove a background with REST
201):
/tasks/:id for the completed result. Full fields live in Image Remove Background Request.
Start now, wait later
UseremoveBackgroundAsync() when you want to create the task now and wait later. The task carries a Public Access Token, so browser code can poll it without your API key:
/tasks/:id/status and /tasks/:id, or listen for task.image.remove_background.completed / task.image.remove_background.failed webhooks.
See Async and polling and Browser Polling.
Task failures
If the background cannot be removed, the task status isfailed. The SDK’s wait() throws TaskAsyncTaskFailedError.