---
title: "Cut the background out of a photo"
method: POST
path: "/images/remove-background"
---

# Cut the background out of a photo

`POST /images/remove-background`

## Request

- Base URL: `https://rendry.io/api/v1`
- URL: `https://rendry.io/api/v1/images/remove-background`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer

Returns a transparent PNG saved to your assets (an asset slot; when every slot is taken the oldest previous cutout is evicted to make room). Costs 1 credit, refunded when the cutout fails.

## Headers

- `X-Rendry-Account` string

## Request body

- object
  - `url` string: Public https image URL
  - `storage_key` string: storage_key of your own uploaded image (from GET /assets)
  - `filename` string

## Response `200`

Cutout saved to assets

- Cutout: A cutout saved to the account's files (asset_type image, created_via derived).
  - `url` string, required: Absolute URL of the PNG; served to the owner only, like every user asset
  - `storage_key` string, required
  - `file_name` string, required
  - `hint` string
  - `evicted_note` string: Sent when the asset slots were full and the OLDEST previous cutout was removed to make room
  - `image_base64` string: A JPEG preview of the cutout
  - `mime_type` string

## Other responses

- `400`: `unknown_field`, `invalid_input`, `url_rejected` (the url is not a public http(s) address that resolves), `download_failed` (with `upstream_status` when the address answered), `file_too_large`. A storage_key outside this account is 404 `not_found`.
- `401`: Missing/invalid API key
- `402`: Not enough credits: the body carries error, balance, required and packages_url.
- `429`: Too many renders at once — concurrency limit, not a monthly quota. Retry in a moment.

---

[API](https://skmtc.dev/rendry/apis/rendry-api.md) · [All operations](https://skmtc.dev/rendry/apis/rendry-api/llms.txt) · [OpenAPI document](https://skmtc.dev/rendry/apis/rendry-api/revisions/c4fb572c26c9?raw)
