The request path, Cloudflare bindings, and image data handling.
Your backend
| POST image
v
nobg Worker (Hono)
| IP quotas, validation, monthly budget
v
Cloudflare Images binding
| segment: foreground
v
Transparent PNG or WebP returned to your backendsegment: "foreground".The service uses the Cloudflare Images binding to process uploaded bytes without a public image URL. Background removal uses foreground segmentation.
nobg does not save uploads or outputs to R2, D1, KV, or Cloudflare Images storage. It buffers a bounded upload for validation and returns the processed stream with Cache-Control: no-store. Cloudflare processes the bytes under its service policies.
Unexpected application errors log an event name and request ID. These logs do not include image bytes, filenames, raw IPs, or provider error messages. Cloudflare may record platform request metadata through observability.
Quota records contain counts and expiry times. Object names use hashed IPs. Alarms remove expired records, and stored counters survive Worker restarts and deployments. See quota settings.
apps/api/src/index.ts contains the handler. apps/api/wrangler.jsonc declares its Images and Durable Object bindings. packages/contracts supplies formats, limits, and error types used by the handler and OpenAPI document.
This is a single Worker deployment. There is no dependency on the documentation website at runtime.