Lucenta

API Reference

Every tool on Lucenta is a thin frontend over this same API — anything the site's demo widgets can do, you can call directly. Base URL:

https://api.lucenta.dev

Authentication

Every endpoint except GET /v1/stats/public requires an API key, sent as an x-api-key header. Get one at /get-started — enter your email, click the sign-in link, and create a key from your dashboard. No password, and it's free for testing and small-scale use.

Rate limits

30 requests per 60 seconds, keyed by API key + caller IP. Exceeding it returns a 429.

Endpoints

POST/v1/check

Semantic profanity/toxicity check via Workers AI embeddings + Vectorize.

Request

{ "text": "you are so stupid" }

Response

{
  "flagged": true,
  "score": 0.85,
  "matches": [{ "term": "you are stupid", "score": 0.85 }],
  "latencyMs": 480
}
POST/v1/redact

Regex + Luhn-based PII detection (email, phone, SSN, IPv4, credit card). mode is "redact" (default, includes redactedText) or "detect" (entities only).

Request

{ "text": "email jane@example.com", "mode": "redact" }

Response

{
  "entities": [{ "type": "email", "value": "jane@example.com", "start": 6, "end": 22 }],
  "redactedText": "email [EMAIL]",
  "latencyMs": 1
}
GET/v1/stats/publicNo auth

Total requests processed today, across all tools. Powers the site's live nav badge.

Response

{ "requestsToday": 1847 }

Error codes

400Missing/empty 'text', or text over 2000 characters.
401Missing, invalid, or revoked API key.
429Rate limit exceeded for this key/IP.
500Internal error — the response body will not contain exception details.

Try it

Test with your own API key, directly against the live API — nothing here is proxied or logged beyond the same request counters every real call goes through.