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 · pathWhat it does
POST /v1/classifierScore 1–20 questions against one state. Returns typed answers with probabilities.
POST /v1/systemoneExact alias of /v1/classifier.
GET /v1/modelsLists 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

TypeCriteriaAnswer
choiceobject, 2–50 candidates with optional descriptionswinning id, confidence, full distribution
scorearray, 2–50 ordered levels, low → highexpected zero-based index, confidence, distribution, legend
nouloptional true/false descriptionstruth 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.