From key to cutout in one line.
The PixelGlows API uses simple field names, the X-Api-Key header and returns a ready PNG — plus Magic edit, where you describe any change in plain words.
1. Get a key
Sign in, open your account and create a key under Developer API keys. Keys start with pg_live_ and are shown once. Send it in the X-Api-Key header (or Authorization: Bearer).
2. Send your first request
One POST, one image, one header:
POST https://www.pixelglows.com/api/public/v1/removebgcurl -H "X-Api-Key: pg_live_YOUR_KEY" \
-F "image_file=@photo.jpg" \
-F "bg_color=ffffff" \
-o no-bg.png \
https://www.pixelglows.com/api/public/v1/removebgPOST /removebg
| Field | Description |
|---|---|
image_file | Uploaded JPG, PNG or WebP, up to 10 MB. |
image_file_b64 | Base64 image instead of a file. |
image_url | Public link to an image instead of a file. |
bg_color | Optional hex (81d4fa) or color name. Omit for a transparent PNG. |
Fields like size, type and format are accepted and ignored, so existing code keeps working. Multipart or JSON bodies both work.
POST /edit — Magic edit
Send an image and a prompt describing the change.
curl -H "X-Api-Key: pg_live_YOUR_KEY" \
-F "image_file=@portrait.jpg" \
-F "prompt=Change the background to a sunny beach at golden hour" \
-o edited.png \
https://www.pixelglows.com/api/public/v1/editNode.js
const form = new FormData();
form.append('image_file', new Blob([await fs.promises.readFile('photo.jpg')]), 'photo.jpg');
const res = await fetch('https://www.pixelglows.com/api/public/v1/removebg', {
method: 'POST', headers: { 'X-Api-Key': process.env.PIXELGLOWS_API_KEY }, body: form,
});
if (!res.ok) throw new Error((await res.json()).errors[0].title);
await fs.promises.writeFile('no-bg.png', Buffer.from(await res.arrayBuffer()));Python
import requests
r = requests.post('https://www.pixelglows.com/api/public/v1/removebg',
files={'image_file': open('photo.jpg', 'rb')},
headers={'X-Api-Key': 'pg_live_YOUR_KEY'})
r.raise_for_status()
open('no-bg.png', 'wb').write(r.content)Responses
By default you get image/png bytes. Send Accept: application/json to receive {"data":{"result_b64":"…"}}. The X-Credits-Charged header shows credits used.
Errors use a simple JSON shape: {"errors":[{"title":"…","code":"…"}]}
400invalid image or parameters402free calls used up and no credits left403missing or invalid key429rate limit — 10 requests per hour per account (no limit on bundle calls)502/503the edit failed — you are not charged
Pricing
50 free calls every month, reset on the 1st (UTC). Then calls come from your monthly bundle if you have one, otherwise each successful request uses one credit ($0.99, or less with credit packs). PixelGlows Studio Pro members get API requests included. Failed requests are never charged. See all pricing
Monthly call bundles
Predictable monthly pricing for steady volume. Bundle calls are used after your 50 free calls, reset every billing month and skip the 10-per-hour limit. Unused calls don't carry over; cancel any time.
Over your bundle? Extra calls use credits at $0.99 each, and Studio Pro members are covered.
Your usage
Sign in to see your monthly calls, daily chart and estimated costs.