Get started
PixMatte API quickstart
Upload an image, get back a transparent PNG. One
POST with a multipart body and an X-Api-Key header — base URL https://api.pixmatte.com.1. Get an API key
Create a key from Get API key. Keys start with pm_live_ (production) or pm_test_ (sandbox, watermarked results, no credits charged). Store it as an environment variable:
Shell
export PIXMATTE_API_KEY="pm_live_your_key_here"2. Send a request
Send the image as image_file in a multipart/form-data body. size=auto returns the highest resolution your plan allows.
curl -X POST https://api.pixmatte.com/v1.0/removebg \
-H "X-Api-Key: $PIXMATTE_API_KEY" \
-F "[email protected]" \
-F "size=auto" \
-o product-cutout.png3. Read the response
A successful call returns the cutout as binary image data. Response headers tell you what it cost and what you got:
Response headers
HTTP/1.1 200 OK
Content-Type: image/png
X-Credits-Charged: 1
X-Width: 2048
X-Height: 2048
X-Request-Id: req_7Hc2kQ9mPzKeep X-Request-Id in your logs — it's the fastest way for support to trace a request. Failed requests return JSON with an errors array and are not charged; see Errors & rate limits.
Next steps
- Authentication — key types, rotation, and the
X-Api-Keyheader. - Remove background — every parameter, output formats, and JSON responses.
- Migrate from remove.bg — map existing requests to PixMatte.