Skip to main content

ToothFairyAI โ€” Decision Models API (Drex)

A decision model is not a chat model. It does not write prose: you give it the facts of a case (state) and one or more typed questions, and it scores every option you supplied in a single forward pass. The answer is a calibrated probability per option โ€” nothing else can come back.

Use it when you want a number you can compare against a threshold, not a sentence you must parse.

API-only models

Decision models are intentionally excluded from /models_list and /v1/models, so they can never be selected as a chat model in the app or in TF Code. The authoritative list lives in the Decisions API reference and here.

Available modelsโ€‹

AliasSize ยท contextModalitiesBest for
drex-max27B ยท 262Ktext, JSON, images (โ‰ค 8)Flagship general decisions; computer-use screenshots
drex-max-finance27B ยท 262Ktext, JSON, images (โ‰ค 8)Banking, accounting, payments, insurance, credit, compliance, filings, markets

Endpointโ€‹

POST https://ais.toothfairyai.com/decisions
POST https://ais.toothfairyai.com/v1/decisions # OpenAI-style path alias

Auth is the same workspace key used by every other inference endpoint โ€” x-api-key: <key> or Authorization: Bearer <key>. The workspace is resolved from the key, so no workspaceid body field is needed.

Question typesโ€‹

typeYou sendYou get back
noulA yes/no questionnoul = P(true) in [0,1]
choicecriteria: a map of {option: description}choice, confidence, probabilities{option: p}
scorecriteria: an ordered array of levels (โ‰ฅ 2)score (expected level index), confidence, probabilities{"0": p, โ€ฆ}, legend{"0": level}

Several questions about one state share one pass over that state: asking three questions costs one decision, not three.

Quickstartโ€‹

curl -s -X POST "https://ais.toothfairyai.com/decisions" \
-H "x-api-key: $TF_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "drex-max",
"state": "Invoice #4471 for 12,340 EUR, due 2026-10-01, paid 2026-10-14.",
"questions": {
"category": {
"type": "choice",
"instructions": "Classify the payment event",
"criteria": {
"paid_on_time": "Payment received on or before the due date",
"paid_late": "Payment received after the due date",
"unpaid": "No payment received"
}
},
"risk": {
"type": "score",
"instructions": "How risky is this account?",
"criteria": ["very_low", "low", "medium", "high", "very_high"]
},
"fraud": {"type": "noul", "instructions": "Is there any indication of fraud?"}
}
}' | python3 -m json.tool
{
"id": "decision-9f2b1c0a4d5e6f708192a3b4",
"object": "decision",
"created": 1763412789,
"model": "drex-max",
"answers": {
"category": {
"type": "choice",
"choice": "paid_late",
"confidence": 0.99995,
"probabilities": {
"paid_on_time": 0.00002,
"paid_late": 0.99996,
"unpaid": 0.00002
}
},
"risk": {
"type": "score",
"score": 1.55,
"confidence": 0.44,
"probabilities": {"0": 0.057, "1": 0.438, "2": 0.412, "3": 0.082, "4": 0.011},
"legend": {"0": "very_low", "1": "low", "2": "medium", "3": "high", "4": "very_high"}
},
"fraud": {"type": "noul", "noul": 0.103}
},
"usage": {
"prompt_tokens": 323,
"completion_tokens": 374,
"total_tokens": 697,
"prompt_tokens_details": {"cached_tokens": 0},
"completion_tokens_details": {"reasoning_tokens": 0},
"uoi": 1
},
"latency_ms": 39.58
}

Imagesโ€‹

Pass up to 8 images in images as data URLs (data:image/png;base64,โ€ฆ) or public https:// URLs. Images are billed as input tokens and reported separately as usage.prompt_tokens_details.image_tokens, already included in prompt_tokens.

{
"model": "drex-max",
"state": "What should the agent click next?",
"images": ["data:image/png;base64,iVBORw0KGgo..."],
"questions": {
"next": {
"type": "choice",
"instructions": "Pick the next action",
"criteria": {"click_checkout": "The checkout button", "click_cart": "The cart icon"}
}
}
}

Thresholding the answerโ€‹

The value of a decision model is the calibrated probability, not the argmax. The usual pattern is:

answer = resp["answers"]["fraud"]
if answer["noul"] >= 0.9:
auto_reject()
elif answer["noul"] <= 0.1:
auto_approve()
else:
send_to_human_review() # the model says it is unsure โ€” route it

Region โ€” global onlyโ€‹

Decision models run on a single global pool. There is no regional pool, no cross-region failover and no data-residency guarantee.

region therefore accepts only null (just omit it) or "global". Any other value โ€” "au", "us", "eu" โ€” is rejected with a 400 rather than quietly served from the global pool, so you can never believe you received regional routing:

{"error": {"message": "Decision models are global-only; region 'eu' is not available. Omit 'region' or send 'global'.", "type": "invalid_request_error", "code": 400}}

Billingโ€‹

  • Billed per request in UoI (1 UoI = $0.01), reported as usage.uoi.
  • Decision models are metered on input tokens; output is never billed.
  • A typical decision costs a fraction of a cent, so each request is floored at 1 UoI.
  • usage.prompt_tokens is the exact count (image tokens included). There is no token-buffer markup on this path.
  • Workspace rate limits and the monthly UoI budget apply exactly as on /predictions.

Strict request schemaโ€‹

Unknown fields are rejected with a 400 that names the field โ€” including every chat-shaped parameter (messages, stream, tools, tool_choice, temperature, top_p, top_k, max_tokens, stop, reasoning_effort, response_format). A decision request has none of them.

SituationResponse
Chat alias sent to /decisions (e.g. sorcerer)400 pointing at /predictions
Decision alias sent to /predictions400 pointing at /decisions
Invalid question definition (e.g. choice with a list criteria)400, message names the question
More than 8 images / inline payload > 10MB400
Any region other than global (au / us / eu)400 โ€” decision models are global-only

Further readingโ€‹