One endpoint — JSON in, JSON out. Score a writing sample and get an over/under-age verdict, an age-range estimate, and a confidence score. Base URL https://www.textmei.com.
The Age Prediction API infers age from text — passively, from writing style, with no selfie or ID. You send a writing sample; it returns an over/under-threshold gate decision, an age-range bucket, and a confidence score. Current model: age-v2.
curl -X POST https://www.textmei.com/api/v1/age-gate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "text": "ikr that movie was so cringe, my mom wont let me go out 😭" }'No key yet? The Free tier works with no signup (IP rate-limited), same model and response shape as paid.
Pass your API key as a bearer token in the Authorization header:
Authorization: Bearer YOUR_API_KEY
The Free tier requires no key (rate-limited by IP). Get a key on the pricing page.
Request body
| Field | Type | Description |
|---|---|---|
| text | string · required | The writing sample to score — a message, email, or post. Minimum 30 characters; longer samples raise confidence. |
Response · 200
| Field | Type | Description |
|---|---|---|
| verdict | string | The age-gate decision: over_18, under_18, or uncertain. |
| confidence | float | Model confidence in the verdict, 0–1. |
| predicted_age_range | string | Estimated age band, e.g. “14-17”. |
| model_version | string | The model that produced the result, e.g. “age-v2”. |
| decision_id | string | Unique id for the decision — keep it for your audit trail. |
| ms | integer | Server processing time, in milliseconds. |
| tier | string | Billing tier the call was served on: free or payg. |
Example response
{
"verdict": "under_18",
"confidence": 0.87,
"predicted_age_range": "14-17",
"model_version": "age-v2",
"decision_id": "agd_01HZK4PYR2X9JFQ8N4C0M",
"ms": 142,
"tier": "free"
}The API uses standard HTTP status codes.
| Status | Meaning |
|---|---|
| 400 | Bad request — missing text, or the sample is below the 30-character minimum. |
| 401 | Unauthorized — missing or invalid API key. |
| 403 | Forbidden — out of credits or over quota (pay-as-you-go). |
| 429 | Too many requests — rate limit exceeded (see limits below). |
No signup. IP rate-limited: 10/hour, 50/day. Same model and response shape as paid.
API key required, metered per call. See the pricing page for current rates.
The model is a calibrated classifier trained on confirmed-age users from a decade-long messaging corpus, using within-person history (the same writer at 15, 17, 20). It's tuned for specificity — adults pass without friction; only the suspected-minor subset is escalated.
| Metric | Value |
|---|---|
| Specificity — adults correctly cleared | 94% |
| Precision — minor flags that are correct | 91% |
| Recall — minors caught | 67% |
| Accuracy | ~82% |
Held-out evaluation against 3,400+ users with confirmed ages; retrained on 17,000+ users, roughly doubling minor recall versus the prior model.