851-labs — Background Remove API
Cheap, fast background removal for high volume.
Integrate 851-labs — Background Remove with a single API call — one key, one unified endpoint, and shared billing across every model on Apiframe.
model: "851-bg-remove" What's special about 851-labs — Background Remove
- Image-to-image editing and reference-image support.
- Fast turnaround — about 2s per generation on average.
- Pay-as-you-go pricing with no 851 Labs account required — you only pay for successful generations.
- One API key, unified billing, idempotency and webhooks across every Apiframe model.
Made with 851-labs — Background Remove
A few outputs generated through the 851-labs — Background Remove API on Apiframe.
Overview
- Endpoint
- POST /v2/images/background-remove
- Model ID
- 851-bg-remove
- Params key
- lab851BgRemoveParams
- Modality
- image
- Provider
- 851 Labs
- Pricing
- Pay-as-you-go
- Avg. completion
- ~2s
Capabilities
Quick start
Send a single POST /v2/images/background-remove request with your API key to
generate with 851-labs — Background Remove. The call returns a jobId you can poll or
receive via webhook.
curl -X POST https://api.apiframe.ai/v2/images/background-remove \
-H "X-API-Key: afk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"model": "851-bg-remove",
"lab851BgRemoveParams": {
"image": "https://example.com/input.jpg",
"format": "png",
"threshold": 0,
"background_type": "rgba"
}
}'import requests
response = requests.post(
"https://api.apiframe.ai/v2/images/background-remove",
headers={
"X-API-Key": "afk_your_api_key_here",
"Content-Type": "application/json",
},
json={
"model": "851-bg-remove",
"lab851BgRemoveParams": {
"image": "https://example.com/input.jpg",
"format": "png",
"threshold": 0,
"background_type": "rgba"
}
},
)
print(response.json()) # { "jobId": "...", "status": "QUEUED" }const response = await fetch("https://api.apiframe.ai/v2/images/background-remove", {
method: "POST",
headers: {
"X-API-Key": "afk_your_api_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "851-bg-remove",
"lab851BgRemoveParams": {
"image": "https://example.com/input.jpg",
"format": "png",
"threshold": 0,
"background_type": "rgba"
}
}),
});
const { jobId } = await response.json();
console.log(jobId);Response & job lifecycle
Generation is asynchronous. A successful submission returns 202 Accepted
with a jobId. Poll GET /v2/jobs/{id} (or supply a
webhook_url) until the status is COMPLETED; the
result field then holds the output URL(s).
1. Submission response (202)
{
"jobId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
"status": "QUEUED"
}2. Poll for the result
curl https://api.apiframe.ai/v2/jobs/JOB_ID \
-H "X-API-Key: afk_your_api_key_here"import requests, time
while True:
job = requests.get(
"https://api.apiframe.ai/v2/jobs/JOB_ID",
headers={"X-API-Key": "afk_your_api_key_here"},
).json()
if job["status"] in ("COMPLETED", "FAILED"):
break
time.sleep(2)
print(job["result"])let job;
do {
await new Promise((r) => setTimeout(r, 2000));
job = await fetch("https://api.apiframe.ai/v2/jobs/JOB_ID", {
headers: { "X-API-Key": "afk_your_api_key_here" },
}).then((r) => r.json());
} while (job.status !== "COMPLETED" && job.status !== "FAILED");
console.log(job.result);Input schema
Request parameters accepted by the 851-labs — Background Remove endpoint. Model-specific options are nested under the params object shown below.
| Parameter | Type | Required | Default | Allowed / range | Description |
|---|---|---|---|---|---|
| model | string | required | "851-bg-remove" | "851-bg-remove" | The model identifier for this endpoint. |
| lab851BgRemoveParams.image | string (URL) | optional | — | — | Source image (URL) |
| lab851BgRemoveParams.format | string | optional | "png" | "png", "jpg" | Output format |
| lab851BgRemoveParams.threshold | number | optional | 0 | min 0, max 1, step 0.05 | Higher = more aggressive cutout. |
| lab851BgRemoveParams.background_type | string | optional | "rgba" | "rgba", "map", "green", "white", "blur", "overlay" | Background |
Frequently Asked Questions
Common questions about the 851-labs — Background Remove API.
Is there an API for 851-labs — Background Remove?
Yes. Apiframe exposes 851-labs — Background Remove through a single REST endpoint (`POST /v2/images/background-remove` with `model: "851-bg-remove"`). You get one unified API, key, and billing across every supported model — no separate 851 Labs account required.
How much does the 851-labs — Background Remove API cost?
851-labs — Background Remove uses simple pay-as-you-go pricing on Apiframe — you only pay for successful generations. See the pricing page for plans and volume discounts.
How do I call the 851-labs — Background Remove API?
Send a POST request to `/v2/images/background-remove` with your `X-API-Key` and a JSON body containing `model: "851-bg-remove"`. The call returns a `jobId`; poll `GET /v2/jobs/{id}` or use a webhook to receive the result.
What parameters does 851-labs — Background Remove support?
851-labs — Background Remove accepts 4 model-specific parameters (nested under `lab851BgRemoveParams`) plus the common `prompt` and `webhook_url` fields. See the input schema above for the full list with types and defaults.
Still have questions?
Start building with the 851-labs — Background Remove API
Get your API key and integrate 851-labs — Background Remove in minutes — Pay-as-you-go.
Questions? Join our Discord or contact sales.