Pro Account receiving 402 on Live Key

@Photoroom I have upgraded my account to the Pro account and now the Sandbox API Key works but the Live Key produces a 402 Error while the Photoroom dashboard says 0 images have been processed. It seems the free trial may be messing things up because it says “0 of 0 images left”.

Photoroom Bug Report — Live plan returns 402 “exhausted” despite dashboard showing 0/1000 used

Summary

Every API call to the live https://sdk.photoroom.com/v1/segment (Basic-plan)
and https://image-api.photoroom.com/v2/edit (Plus-plan) endpoints returns
HTTP 402 with the error body:

{"detail":"You have exhausted the number of images in your plan. Visit https://app.photoroom.com/api-dashboard to update your plan","status_code":402,"type":"unknown_error"}

However, my Photoroom dashboard shows:

  • Plan: 1000 images / month
  • Used: 0 images
  • Available: 1000 images

This is reproducible with two different live keys:

  • Original key
  • A brand-new live key I generated to rule out a key-specific issue

When the same key is prefixed with sandbox_ (i.e. submitted as
sandbox_<key>), the API returns HTTP 200 with a correctly
background-removed PNG. So the key authenticates fine — only the live
plan quota
is misreporting as exhausted.

Repro steps

set -e

KEY=“<YOUR_LIVE_KEY>” # ← paste the live key here
IMAGE=“./input-original.jpg”

echo "=== LIVE mode (key as-is, draws from production plan) ==="
curl -s -o ./live-output.bin -w “HTTP %{http_code}\n”
-X POST “https://sdk.photoroom.com/v1/segment
-H “x-api-key: $KEY”
-F “image_file=@$IMAGE”
echo “Response body (first 300 bytes):”
head -c 300 ./live-output.bin
echo “”
echo “”

echo “=== SANDBOX mode (same key with sandbox_ prefix, draws from sandbox quota) ===”
curl -s -o ./sandbox-output.bin -w “HTTP %{http_code}\n”
-X POST “https://sdk.photoroom.com/v1/segment
-H “x-api-key: sandbox_$KEY”
-F “image_file=@$IMAGE”
echo “Response body (first 300 bytes, or file type if binary):”
if file ./sandbox-output.bin | grep -q “image data”; then
file ./sandbox-output.bin
else
head -c 300 ./sandbox-output.bin
fi
echo “”

Observe:

  • Live mode: HTTP 402, live-output.bin contains the “exhausted” JSON.
  • Sandbox mode: HTTP 200, sandbox-output.bin is a valid PNG with the background removed.

Expected behavior

The live call should return HTTP 200 with a PNG identical (or close) to
expected-output-sandbox.png — same input photo with the background
removed (transparent alpha channel), since the dashboard reports the
plan has 1000 images of quota remaining.

Environment

  • Endpoint tested: https://sdk.photoroom.com/v1/segment
  • Endpoint also tested: https://image-api.photoroom.com/v2/edit (same 402)
  • Auth header: x-api-key: <key> (per Photoroom docs)
  • Image upload field: image_file (per Photoroom docs)
  • Test image: 1536×2048 JPEG, well within size limits

We have the same problem. How did you resolve it?

Hi jscruggs,

Thanks for reaching out - apologies for the delayed response!

After looking into this, the 402 error you encountered on May 28th was because an API plan subscription hadn’t been enabled for your Photoroom space yet. The 402 status code is returned when there’s no active API plan associated with the account making the request.

On May 29th, the API plan was purchased, and we can confirm that API calls have since been going through successfully - we can see a successful call from you as recently as June 8th.

Best regards,

-–

Robert Khau

Solutions Engineer @ Photoroom

Hi @ElectricInk ,

A 402 error from our API generally indicates a subscription or payment issue. To get this resolved, please make sure you’ve purchased an active API plan subscription.

If you’re still seeing the error afterwards, feel free to reach out to our support from the app (see Contact Photoroom) and we’ll dig into your account specifically.

Best regards,

Robert Khau

Solutions Engineer @ Photoroom