The rule-based signals elsewhere in this API — typo correction, the gmail dot trick, suspicious-pattern detection — each catch one specific shape of abuse. humaneness takes a different approach: a machine-learning model reads the local part of the address and scores, from 0 to 1, how much it looks like something a person actually chose for themselves. ivan.ivanov@mail.ru scores close to 1. fjweowenfmewjewk@mail.ru scores close to 0.
How it works
The score comes from a model trained with CatBoost, a gradient-boosting library, on a mix of real confirmed mailbox local parts and synthetically generated ones — random letters, shuffled characters, dot-trick spellings, consonant strings, keyboard-walk patterns. The trained model is exported to ONNX and runs directly inside the validation backend through onnxruntime-node, so every request is scored in-process, with no separate Python service to call out to.
The full write-up of the feature set, training data, and model evaluation is public:
habr.com — model article ↗The model scores the raw local part exactly as it was sent, before normalization — so a heavily dotted Gmail alias still scores low even though normalization would fold its dots away for deduplication. humaneness and the rule-based risk signals are independent and can disagree: an address can be well-formed enough to pass every rule-based check while still scoring low on how human it looks, or the reverse.
Example
curl -H "X-API-Key: <your-key>" \
"https://api.cleancontact.ru/validate?email=fjweowenfmewjewk@mail.ru"{
"value": "fjweowenfmewjewk@mail.ru",
"normalized": "fjweowenfmewjewk@mail.ru",
"result": {
"status": "Good",
"detail": "Mailbox accepts mail"
},
"humaneness": 0.0421
}humaneness is a plain number field, a sibling of result rather than something nested inside risk. It is present whenever scoring succeeds, and omitted on the rare request where it could not run — treat its absence as “no score available,” not as a signal of anything by itself.
What it does for you
- A continuous score instead of a yes/no flag — set your own threshold for what counts as suspicious enough to review, block, or just log.
- Catches shapes no fixed rule describes — the model was not told “reject three dots” or “reject random consonants”; it learned the general difference between a chosen name and a generated one.
- Works on every domain — unlike the gmail- and yandex-specific rules, scoring does not depend on which provider the address uses.