API docs
Base https://reflex-api.reflex-api.workers.dev. Every classifier call needs Authorization: Bearer rk_… — mint one on the home page. Unknown top-level fields are ignored; unknown fields inside questions are rejected with 422.
Endpoints
| Method · path | What it does |
|---|---|
| POST /v1/classifier | Score 1–20 questions against one state. Returns typed answers with probabilities. |
| POST /v1/systemone | Exact alias of /v1/classifier. |
| GET /v1/models | Lists reflex-1. No key needed. |
| GET /health | {"status":"ready"}. No key needed. |
| POST /v1/signup | {"name":"…"} → {"api_key":"rk_…"}, shown once. No key needed. |
Question types
| Type | Criteria | Answer |
|---|---|---|
| choice | object, 2–50 candidates with optional descriptions | winning id, confidence, full distribution |
| score | array, 2–50 ordered levels, low → high | expected zero-based index, confidence, distribution, legend |
| noul | optional true/false descriptions | truth estimate 0.01–0.99 |
Example
request
curl https://reflex-api.reflex-api.workers.dev/v1/classifier \
-H "Content-Type: application/json" \
-H "Authorization: Bearer rk_…" \
-d '{
"model": "reflex-1",
"state": "Mia was charged twice. Refund the duplicate.",
"questions": {
"route": {
"type": "choice",
"instructions": "Which team handles this?",
"criteria": {
"billing": "Payments, invoices, refunds",
"technical": "Errors using the product"
}
}
}
}'
response
{
"model": "reflex-1",
"answers": {
"route": {
"type": "choice",
"choice": "billing",
"confidence": 0.75,
"probabilities": { "billing": 0.75, "technical": 0.25 }
}
},
"usage": { "input_tokens": 44, "output_tokens": 0 }
}'
Probabilities come from repeated single-pass judgments with smoothing — sharp on easy calls, near-uniform when the model is uncertain. Route low-confidence answers to a human.