Cutstack API
The API removes the background from product photos, checks every result automatically, and gives you back the files sized for your marketplace. You pay one credit per photo that comes out clean; a photo our check flags is refunded on its own. Batches of up to 200 photos, or one photo in one call.
1. Create a key
Sign in and open Account → API keys. A key looks like csk_live_… and is shown once. It spends the credits of your account, so keep it on a server. New accounts start with 10 credits, enough to try everything below.
2. One photo, one call
POST/v1/images
curl -X POST https://trycutstack.com/v1/images \
-H "Authorization: Bearer $CUTSTACK_API_KEY" \
-F "file=@product.jpg" \
-F 'settings={"presetId":"amazon-main"}' \
-o product-cutout.jpgThe answer is the finished image. Its headers say what happened: X-Cutstack-Charged (1, or 0 when the automatic check flagged it and refunded you), X-Cutstack-Review (none or red) and X-Cutstack-Job-Id, the batch behind it. Add -F response=json to get a description with links instead of the bytes. Details on Single image.
3. A batch
Three steps: create, add photos, start. Then one call that waits, and the ZIP.
BASE=https://trycutstack.com
AUTH="Authorization: Bearer $CUTSTACK_API_KEY"
# 1. an empty batch with the settings every photo starts with
JOB=$(curl -s -X POST $BASE/v1/jobs -H "$AUTH" -H "Content-Type: application/json" \
-d '{"defaults":{"presetId":"amazon-main"}}' | jq -r .id)
# 2. photos: files, ZIPs, or links (as many requests as you like)
curl -s -X POST $BASE/v1/jobs/$JOB/items -H "$AUTH" \
-F "files=@a.jpg" -F "files=@b.jpg" -F "files=@more.zip" > /dev/null
# 3. start (one credit per photo is reserved now)
curl -s -X POST $BASE/v1/jobs/$JOB/start -H "$AUTH" \
-H "Idempotency-Key: my-batch-$(date +%s)" -H "Content-Type: application/json" -d '{}' > /dev/null
# wait until it is done (each call holds up to 60 s, then loop)
until [ "$(curl -s "$BASE/v1/jobs/$JOB?wait=60&fields=summary" -H "$AUTH" | jq -r .status)" = "done" ]; do :; done
# the ZIP, named your way
curl -s "$BASE/v1/jobs/$JOB/download?pattern={name}-{preset}" -H "$AUTH" -o results.zip
# and the photos worth a second look, if any
curl -s $BASE/v1/jobs/$JOB/review -H "$AUTH" | jq '.items[] | {name, kind, reason}'Results are kept for two hours after the batch finishes, then deleted. Download what you need; the API is not an archive.
What to read next
- Batches for every step in detail, including sample runs, stopping and resuming.
- Review queue: the part that makes this different from a plain background remover.
- Events and webhooks if you would rather be told than ask.
- Reference: the OpenAPI spec at
/v1/openapi.jsonand every endpoint on one page.
Next: Authentication. Keys, the header, revoking, what a key cannot do.