Privacy LensIMAGE API / V1 CONTRACTTOP SECRET

For endpoint operators

One image in.
One verdict out.

The extension is local-first. This contract applies only after a user explicitly enables remote NSFW screening and chooses an endpoint.

POST/privacy-lens/api/v1/classify

Multipart request

image
Required JPEG file. The extension rasterizes and compresses it to a maximum edge of 512px at quality 0.62.
client_version
Extension version string.
max_dimension
The string 512.

The extension does not send the source URL, page URL, page title, page text, tab ID, browsing history, or user-entered redaction rules.

Required response

{
  "safe": false,
  "score": 0.97,
  "labels": { "nsfw": 0.97 },
  "model": "operator-model-name",
  "cached": true,
  "request_id": "optional-id"
}

Only safe is required. score must be between 0 and 1 when supplied. cached reports whether the operator reused an earlier verdict. Unknown fields are ignored.

Client behavior

Fail closed by design.

  1. PendingThe page image is blacked out before upload begins.
  2. SafeThe original page image is revealed without replacement.
  3. Unsafe or errorThe image stays blacked out. Timeouts occur after 12 seconds.

Operator requirements

Do less with the image.

Accept multipart/form-data and JPEG input. Return JSON with a boolean verdict.

Use HTTPS for every remote endpoint. Plain HTTP is accepted only when the configured hostname resolves to the user's own device.

Enforce authentication, request-size limits, rate limits, and short processing timeouts at the service.

Cache verdicts for repeated images when practical. Prefer a salted content fingerprint and a short-lived verdict over retaining uploaded image bytes.

Do not train on, retain, log, or redistribute uploaded images unless the operator separately discloses that practice and obtains an appropriate legal basis.

Status codes

400Malformed request401 / 403Authentication failed413Image too large415Unsupported media429Rate limited5xxService error; client keeps image concealed
OpenAPI 3.1 JSONPrivacy policyPrivacy Lens home