POST /api/v1/_predict + /_search
Each prediction fans out to three Aito calls: _predict success_bucket for the 5-class distribution, _predict front_page for the binary headline, and _search for similar past submissions. The search runs on the input's rarest tokens and the hits are re-ranked by IDF weight — matching on “rust” should count for more than matching on “why”. Token rarity comes from cached _search counts, so a cold token costs one extra call and nothing thereafter. No training step and no model file — Aito infers directly from its index. The front-page number is checked against a 2,600-submission holdout; on this corpus the raw output is already close to calibrated, so the correction is small. Both figures are shown.
Example query
{
"method": "POST",
"path": "/api/v1/_predict",
"body": {
"from": "hn_submissions",
"where": {
"title": "...",
"is_show_hn": false
},
"predict": "success_bucket"
}
}