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
/v1/checkSemantic 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
}/v1/redactRegex + 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
}/v1/stats/publicNo authTotal requests processed today, across all tools. Powers the site's live nav badge.
Response
{ "requestsToday": 1847 }Error codes
| 400 | Missing/empty 'text', or text over 2000 characters. |
| 401 | Missing, invalid, or revoked API key. |
| 429 | Rate limit exceeded for this key/IP. |
| 500 | Internal 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.