Background Remove
Background Remove enables you to cleanly remove backgrounds from images, creating transparent PNG cutouts of foreground subjects. This classic background removal tool automatically detects and preserves the main subject while eliminating the background.
Lifecycle: Experimental · Released: August 15, 2025
Request body
Every call uses the universal POST /v1/run request body:
| Field | Type | Required | Description |
|---|---|---|---|
model_name | string | Yes | Must be background-remove. |
inputs | object | Yes | Contains the endpoint-specific parameters documented under Input parameters. |
Place all endpoint parameters inside inputs; they are not top-level request fields.
Request
Remove image backgrounds by submitting the source image to the universal /v1/run endpoint:
Input parameters
imageRequiredimage URL | data URI
Source image to remove the background from. The AI will automatically detect the main subject and create a clean cutout with transparent background.
return_base64boolean
When set to true, the API will return the generated image as a base64-encoded string instead of a CDN URL. The base64 string will be prefixed data:image/png;base64,....
Privacy benefit: Outputs are available for up to 60 minutes instead of the standard three-day window. Request history contains only a <base64> placeholder.
Default: false
Technical limitations
Minimum image dimensions are 128 × 128 px. Smaller images fail with InputValidationError.
Credit cost
Background Remove costs 1 credit per output image.
Processing time
Background removal typically completes in 1–3 seconds. Actual latency may vary with image complexity and current server load.
Response polling
After submitting your request, poll the status endpoint using the returned prediction ID. See API Fundamentals for complete polling details.
Successful response
When your background removal completes successfully, the status endpoint will return:
The output array contains either URLs or, if return_base64 is set to true, base64-encoded strings of your processed PNG images with backgrounds removed.
Runtime errors
Runtime errors for Background Remove use the shared set in Error Handling.
Related guides
For detailed implementation guidance and best practices:
- Image Preprocessing Best Practices - Optimize your source images for background removal