Skip to content

Guide

What is a decision API? A plain-English guide

A plain-English guide to decision APIs: what they are, how calibrated probabilities work, and when to pick one over an LLM for classification, routing, and triage.

Laya Studio7 min readUpdated

On this page (10 sections)

A decision API is an endpoint that answers typed questions about text—choice, yes/no, or score—returning a calibrated probability for each answer in a single forward pass, rather than generating free text. At Laya, that happens in about 120 milliseconds from Europe, and the model never generates a label it can't back up. It is built for routing, triage, and moderation pipelines where a guess isn't good enough.

Key takeaways

  • A decision API returns structured probabilities, not generated paragraphs.
  • Calibrated probabilities mean the score reflects how often the model is right.
  • Laya runs in Switzerland with zero data retention, and the first 100,000 questions per month are free.
  • You can ask choice, yes/no, and scored questions in the same request.
  • It is an LLM alternative for classification when you need auditable decisions, not creative writing.

What is a decision API, and how is it different from a text classification API?

A decision API is an interface that takes a piece of text—or a JSON object—and answers specific, pre-defined questions about it. Instead of returning a single category label, it returns a probability for every question you ask. If you ask "Is this a refund request?" you get back a number like 0.84, not just the word "refund."

A text classification API usually sorts text into one bucket from a fixed list. A decision API is closer to a structured questionnaire: you choose the questions, the types (choice, score, yes/no), and the thresholds that trigger action. Because it does not generate text, there is no prompt to tune and no string to parse. The underlying model is an open System 1 decision model, and the hosted version is available through Laya's Hugging Face model page.

In practice, this means your support router can ask three questions at once—urgency, billing-related, and churn-risk—and get three numbers back in one call. You decide what to do with each number.

How do calibrated probabilities work?

A calibrated probability is a number between zero and one that reflects how often the model is right when it says that number. If the API returns 0.80 for "this ticket is urgent," then on similar tickets it should be correct about 80 percent of the time. That is different from a raw model score, which might look like a probability but is not tied to actual accuracy.

This matters because you can build rules around thresholds. For example:

  • Below 0.50: route to a general queue.
  • Between 0.50 and 0.80: flag for human review.
  • Above 0.80: auto-assign to a specialist team.

If the probabilities are not calibrated, those thresholds are arbitrary. You might treat 0.60 as a sure thing when the model is only right 40 percent of the time at that score. With calibrated probabilities, the number itself is the decision input.

I learned this the hard way: the first time I built a triage pipeline, I treated model confidence as fact and over-routed low-confidence cases to senior engineers. Switching to calibrated scores cut that noise because the number actually meant something.

Is a decision API an AI classification API?

Yes, but it is a specific kind. An AI classification API generally accepts text and returns a label or set of labels. A decision API accepts text and questions, then returns a probability for each question. You are not limited to the labels the vendor chose; you define the questions yourself.

For example, a support team might use it as an AI classification API for intent detection, asking "Is this a bug report?" and "Is this a feature request?" in the same call. Because the output is numeric, you can combine the results with business logic—like escalating only when both probabilities are above 0.70—without writing fragile regex over generated text.

Can a decision API replace an LLM for classification?

Often, yes. If your job is to classify, route, score, or moderate text, a decision API is usually faster, cheaper, and easier to audit than prompting an LLM and parsing its reply. You do not have to coax the model into outputting valid JSON, and you do not have to worry that it will invent a category that does not exist.

There are limits. A decision API will not summarize a thread, draft a reply, or extract free-form entities. If you need generative work, use an LLM. If you need a reliable yes/no on whether a message contains a refund request, the decision API is the better tool. I use both in the same pipeline sometimes: the decision API triages the ticket, and an LLM drafts the response only after routing is settled.

What does it cost, and where does my data go?

Pricing is per question. The first 100,000 questions each month are free, then it is $5 per million. There are no token surcharges for long prompts, because no text is generated.

Data residency is straightforward: the hosted API runs in Switzerland, with zero data retention. Your text is processed and forgotten. For health-tech or finance teams subject to GDPR or similar rules, that removes a whole category of vendor-risk questions. It is an independent service, not affiliated with Convai Innovations or TypeSafe.

Here is what a month might look like for a mid-sized support desk:

VolumeCost
50,000 questions$0 (free tier)
250,000 questions$0.75
1,000,000 questions$4.00

How does Laya compare to TypeSafe Jev?

Laya is compatible with TypeSafe Jev's /v1/systemone protocol, so you can often switch by changing a single endpoint URL. That makes migration low-risk: you send the same request shape and receive the same shape of response.

I should be honest about the numbers. On the Banking77 benchmark, Laya scores 0.425 while Jev scores 0.870. That is a real gap, and if your use case is banking intent classification, Jev may be the better fit. Laya's strengths are different: Swiss hosting, zero retention, per-question pricing, and support for English plus 100+ languages. The benchmark details are published in the project's BENCHMARKS.md.

What does a real integration look like?

You send a POST request with the text and an array of typed questions. Here is the shape of a typical request and response:

json
// Request
{
 "text": "I was charged twice and I can't reach support",
 "questions": [
 { "id": "urgency", "type": "score", "min": 0, "max": 1 },
 { "id": "refund", "type": "yes_no" },
 { "id": "channel", "type": "choice", "options": ["email", "chat", "phone"] }
 ]
}

// Response
{
 "urgency": 0.91,
 "refund": 0.88,
 "channel": "chat"
}

No prompt engineering. No parsing markdown code blocks out of the model output. You get numbers you can threshold and act on immediately.

When should you not use a decision API?

Do not use a decision API if you need open-ended generation, summarization, or entity extraction without a predefined schema. It is also the wrong tool if your questions change every week—defining new questions is easy, but the model works best when the question set is stable enough to measure.

And if your task is pure classification with no downstream thresholding, a simpler text classification API may be all you need. The decision API shines when the probability itself is the product.

When to use what: a quick framework

TaskDecision APILLM promptRules engine
Route tickets by urgencyYesOverkillOnly if static
Moderate user contentYesExpensiveBrittle at scale
Score lead intentYesOverkillSometimes
Summarize a conversationNoYesNo
Extract free-form entitiesNoYesNo

If you are checking more than one "Yes" in the decision API column, it is probably worth a trial.

Before you commit, run this checklist:

  • I have a fixed set of questions to ask about each text.
  • I need a number I can threshold, not just a label.
  • I want to avoid writing prompts and parsing responses.
  • Data residency or zero retention matters to my team.
  • I do not need the model to generate text.

If you answered yes to most of these, a decision API is likely the right tool. You can try the endpoint at laya.studio, where the first 100,000 questions are free.

FAQ

What does "calibrated probability" mean in plain English?

It means the score reflects real-world accuracy. A probability of 0.80 should be correct about 80 percent of the time on similar inputs, so you can use it to set routing thresholds.

Is a decision API the same as a text classification API?

Not exactly. A text classification API usually returns a label; a decision API returns a probability for each question you define, giving you more control over downstream logic.

Can I use this instead of prompting an LLM to classify tickets?

Yes, for classification, routing, and triage. It is faster, cheaper, and does not hallucinate categories, though it cannot generate summaries or replies.

Where does Laya process data, and is it retained?

It runs in Switzerland with zero data retention. Your text is processed and not stored or used for training.

How do I migrate from TypeSafe Jev?

Laya supports the same /v1/systemone protocol, so you can often switch by updating the endpoint URL. Note that on Banking77, Jev scores 0.870 versus Laya's 0.425, so check your benchmark first.

Topics

  • decision API
  • AI classification API
  • calibrated probabilities
  • text classification API
  • LLM alternative for classification

Keep reading

Live demo

Reading is good. Trying is better.

See real answers on five example messages, with a calibrated probability for every answer in about a tenth of a second. Sign up and your first 5 runs on your own messages are free.

Example answer, captured live

Answered in Switzerland

“Hi, I was charged twice for order #4821 ($129.00). Please refund the duplicate charge before Friday, our books close then. This is the second billing mistake this quarter and we're starting to look at other vendors.”

What does the customer want?

  • refund100%
  • other<0.1%
  • cancel0%
Is it urgent: 17.7%Might they leave: 30.3%

0 words generated · 3 questions in one pass · 354 ms round trip when captured