API
One endpoint, three ways to pay for it.
Free preview
curl -F file=@photo.jpg https://bg0ne.com/api/cutout > cutout.png
No account. Capped at 640px on the long edge and rate limited; over the limit you get a 402 with an offer rather than a 429.
Full resolution, with a key
curl -H "authorization: Bearer bg_live_…" \
-F file=@photo.jpg -F tier=hd \
https://bg0ne.com/api/cutout > cutout.png
Spends one credit. x-credits-remaining comes back on every
response. With no credits left you get 402 and the top-up URL, never a
silently downgraded image.
Full resolution, as an agent
coinpay x402 pay https://bg0ne.com/api/cutout
curl -H "x-crawl-pass: $PASS" -F file=@photo.jpg -F tier=hd https://bg0ne.com/api/cutout
No account and no key. The 402 carries the offer, CoinPay settles it straight to the merchant, and the pass covers 60 minutes.
Response headers
| Header | Meaning |
|---|---|
x-cutout-tier | preview or hd |
x-cutout-model | which model answered |
x-cutout-ms | end to end milliseconds |
x-credits-remaining | after this call, when credits were spent |
Self-hosting
git clone https://github.com/profullstack/bg0ne.com
cd bg0ne.com && docker compose up
Set DATABASE_URL and you have the whole thing. Leave the
CoinPay variables unset and payments are simply off, which is the right configuration
for a private instance.