Remove a background
Cut the subject out of an image and get it back on a transparent background, with no design involved.
POST/images/remove-backgroundAPI Reference
Sample request
bash
curl -X POST \
-H "x-api-key: {YOUR-API-KEY}" \
-H "Content-Type: application/json" \
-d '{
"image_url": "https://example.com/product.jpg",
"crop": true,
"callback_url": "https://webhook.mycompany.com/abyssale"
}' \
https://api.abyssale.com/images/remove-backgroundjavascript
// No SDK method yet — plain fetch (Node 18+). Set ABYSSALE_API_KEY before running.
const res = await fetch('https://api.abyssale.com/images/remove-background', {
method: 'POST',
headers: { 'x-api-key': process.env.ABYSSALE_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
image_url: 'https://example.com/product.jpg',
crop: true,
callback_url: 'https://webhook.mycompany.com/abyssale',
}),
});
const body = await res.json();
if (res.status !== 202) console.error(res.status, body.id, body.message);
else console.log(body.job_id);python
# No SDK method yet — plain requests. Set ABYSSALE_API_KEY before running.
import os
import requests
r = requests.post(
"https://api.abyssale.com/images/remove-background",
headers={"x-api-key": os.environ["ABYSSALE_API_KEY"]},
json={
"image_url": "https://example.com/product.jpg",
"crop": True,
"callback_url": "https://webhook.mycompany.com/abyssale",
},
timeout=30,
)
r.raise_for_status()
print(r.json()["job_id"])Inputs
| Field | Type | Required | Description |
|---|---|---|---|
image_url | string (uri) | Yes | Public http(s) URL of the image, up to 2 048 characters: PNG, JPEG, WebP or SVG, up to 20 MB. Downloaded when the job runs. |
model | string | No | Model id, from GET /ai-models?operation=images_remove_background. Omitted: the workspace's default. |
crop | boolean | No | Crop the transparent edges off the result. Default false. |
callback_url | string (uri) | No | http(s) URL that receives the ASSET_JOB_FINALIZED webhook when the job ends. |
Response
202, before anything is processed:
json
{ "job_id": "8f0c2a4e-4869-11f0-96f2-0a00d9eb8f78", "status": "PENDING" }Follow the job by polling or webhook.
Output
One image per job, a WebP: a completed job has exactly one entry in outputs, the image without its background.
json
{
"job_id": "8f0c2a4e-4869-11f0-96f2-0a00d9eb8f78",
"operation": "images_remove_background",
"status": "COMPLETED",
"outputs": [
{ "type": "image", "url": "https://production-banners.s3.eu-west-1.amazonaws.com/tmp_ai/d3b07384-d113-4ec6-a3b5-2f7c6e1a9b10/8f0c2a4e-4869-11f0-96f2-0a00d9eb8f78.webp", "mime_type": "image/webp" }
],
"credits": { "generation_credits": 0, "ai_credits": 3 },
"error": null,
"created_at": "2026-09-21T14:13:20Z",
"finalized_at": "2026-09-21T14:13:27Z"
}Every field is described under Poll the job.
Credits and errors
- AI credits, by model: 3 on the default
bria-rmbg-2-0, 12 onleonardo-remove-bg, 2 on every other model — see Credits → AI credits. Charged only once the job completes. - An image that cannot be downloaded or read ends the job
FAILEDwithinvalid_input_asset.
The other refusals and failures are shared by every action — see Errors.
Related
- Asset jobs — how jobs run, polling, models, limits
- Image element properties → Remove background — the same feature on an image layer inside a design
- API Reference: removeBackground
