Start here

Why a decisions model

Where a small typed decisions model beats a prompt, and where it does not.

An LLM prompt can answer “is this ticket urgent?”. It also writes prose and invents fields you never asked for. decision-machine-1 does one job: it turns text into a typed decision with a number attached.

This page states where that trade pays, and where it costs you.

The four wins

1. Latency you can put in a request path

A call makes one pass over the text. Nothing is generated, so the time does not grow with the answer.

Measured end to end from a laptop on 2026-09-16, against production, with short inputs of 55 to 198 characters:

CallObserved
yes-no, one statement0.75 s – 1.25 s
classify, 3 labels1.18 s
rate, 4 levels1.02 s
answer, 1 question0.56 s
entities, 3 types0.50 s
verify0.48 s
extract, 9 properties0.72 s
Every 400 / 4040.07 s – 0.19 s

The numbers include TLS, internet transit and the API hop. Classification calls land near 1 s. Extraction calls land near 0.5 s.

Batching costs almost nothing. Several statements or questions ride in one call: 2 statements took 1.12 s, and 3 questions took 0.56 s. Batching covers the rules.

2. No parsing, no repair step

The response is typed JSON from a schema, not a string you have to trust. You write no fallback parser for a code fence or a stray sentence.

curl -s https://api.milliseconds.ai/v1/decision-machine-1/classify \
-H "content-type: application/json" \
-d '{
"text": "I was charged twice for my subscription this month and support has not replied.",
"labels": {
"billing": "payments, invoices, charges, refunds",
"shipping": "delivery, tracking, returns",
"account": "login, password, profile settings"
}
}'

Real response from that call:

{"label":"billing","probability":0.995,"confidence":0.972,"scores":{"billing":0.995,"shipping":0,"account":0.005}}

No API key is required during the launch period.

3. Probabilities you can threshold

A prompt gives you a verdict. This gives you a verdict and its distribution.

  • probability is the winner’s normalized share on classify and rate.
  • confidence is 1 − normalized entropy. A single peak scores 1. A flat distribution scores 0.
  • scores carries the full distribution, so you can see the runner-up.

That lets you set one bar per action instead of trusting every answer equally. Read Decisions and probabilities, then Thresholds and confidence routing.

A rate call over the scale ["Calm","Annoyed","Frustrated","Threatening to leave"] reports its own disagreement:

{"score":1.585,"level":2,"confidence":0.371,"scores":[0,0.471,0.472,0.057]}

The winning level beat level 1 by 0.001. The score of 1.585 sits between the two levels. The confidence of 0.371 reports that ambiguity. A prompt would have named one level and stopped.

4. Cost that tracks your input, not the output

Every capability response carries x-input-chars, the number of input characters, and x-input-tokens, the input tokens billed for this call. You pay $0.04 per million input tokens and $0 per output token. See Pricing. The label count does not change the cost, and the answer length does not change it either.

Texts over 2,000 characters are split into chunks, so cost stays proportional to what you send: the text plus the labels, questions, or schema. Long text and chunking explains the split.

What it cannot do

decision-machine-1 decides. It does not write, reason, or hold a conversation. Do not reach for it when you need any of the three.

It cannotWhat that means
Generate textanswer returns a span of your input with start and end offsets, never new prose. The answer is null when nothing fits.
Reason in stepsThere is no chain of thought and no planning. One pass, one decision.
ChatPlain chat on the OpenAI-compatible surface returns 400 unsupported_request on purpose.
Follow a system promptThe OpenAI facade drops system, developer, assistant and tool roles. It reads only user turns.
Stream tokensstream: true returns one content chunk, one finish chunk, then [DONE], after the work finishes.
Summarize or rewriteThere is no such capability. Send that to a large model.

Two more honest limits. An array-of-objects property in an extract schema is accepted and returned empty for now. And required in an extract schema is read, never enforced.

The practical answer: use both

Run the cheap typed decision first. Escalate only the uncertain cases to a large model. The Cascade to an LLM pattern does the cost math with the latencies above.

Use decision-machine-1 when you need one of these:

  • A routing decision in front of tools, agents or queues.
  • A guardrail on messages going into or out of an LLM app.
  • A field pulled out of a document, with a check that the document really says it.
  • A score you can threshold, log and tune.

Use a large model when you need prose, a plan or a conversation. Use it also when the judgment needs world knowledge outside the text you sent.

Next