SandboxAPI notes

Minimal surface. Clear contracts.

The public sandbox calls a server-side Next.js proxy at /api/filter. The underlying FastAPI service is protected for server-side traffic and wraps OpenAI's openai/privacy-filter model.

GET

/health

Returns service status, configured model, load state, and runtime mode.

POST

/v1/filter

Runs text through the privacy filter and returns filtered text plus detected spans.

Filter request

{
  "text": "My name is Alice Smith and my email is [email protected].",
  "mode": "mask",
  "mask_token": "[REDACTED]",
  "include_spans": true
}

Supported modes are mask, remove, and annotate.

Supported labels

account_numberprivate_addressprivate_emailprivate_personprivate_phoneprivate_urlprivate_datesecret