Get started
Authentication
Authenticate every request by sending your API key in the
X-Api-Key header.The X-Api-Key header
Add the header to each request. Keys are not accepted as query parameters or form fields.
curl
curl https://api.pixmatte.com/v1.0/removebg \
-H "X-Api-Key: $PIXMATTE_API_KEY" \
-F "image_file=@product.jpg" \
-o product-cutout.pngKey types
| Prefix | Use | Credits | Output |
|---|---|---|---|
| pm_live_ | Production traffic | Charged per image | Full result |
| pm_test_ | Development and CI | Not charged | Watermarked, reduced resolution |
Rotating keys
- You can have several active keys per account — one per service or environment is a good default.
- Create the new key, deploy it, then revoke the old one. Revocation takes effect within a minute.
- Usage and credits are reported per key in your dashboard.
Auth failures
| Status | Code | Meaning |
|---|---|---|
| 401 | missing_api_key | No X-Api-Key header was sent. |
| 401 | invalid_api_key | The key is malformed, revoked, or does not exist. |
| 403 | key_not_permitted | The key is valid but not allowed for this operation (for example a test key on a live-only feature). |
Auth failures are never charged. Full list in Errors & rate limits.