We use cookies. Cookies and browser storage keep you signed in and remember your preferences. With your permission we also measure how the site is used. You can any time. See our cookie policy.
Decision model API
Decision models read a state and a typed question and return a choice or a score instead of free text. They are smaller and cheaper than general LLMs and give predictable, machine-readable answers for routing, moderation and evaluation.
- Routing requests to the right tool or model
- Classifying tickets, intents and content
- Scoring conversations against a rubric
- Guardrails before an action runs
Results will appear here.
Settings
Decision model API · 30 models
How to call the Decision model API API
- Create an API key in your dashboard.
- Install the official openai SDK for your language.
- Set baseURL to https://api14.com/api/v1 and model to "liquid/d1".
How do I call a decision model?
Through POST /api/v1/decisions with a state and typed questions (choice, yes/no or score). The answer comes back as probabilities, not free text.
Why not use a normal LLM?
A decision model answers in a fixed shape, so you skip prompt tricks and output parsing, and it usually costs less per call.
Are there free decision models?
Some have a :free variant with stricter upstream rate limits. The table below shows the price of each.
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api14.com/api/v1",
apiKey: process.env.API14_API_KEY,
});
const result = await client.post("/decisions", { body: {
"model": "liquid/d1",
"state": "Customer: I was charged twice for my order and want my money back.",
"questions": {
"team": {
"type": "choice",
"instructions": "Which team should handle this message?",
"criteria": {
"billing": "Payments, refunds, invoices",
"support": "Product questions and bugs",
"sales": "Pricing and new purchases"
}
},
"urgent": {
"type": "noul",
"instructions": "Does this need a reply today?",
"criteria": {
"true": "Money, outage or legal risk",
"false": "Can wait"
}
}
}
} });
console.log(result.answers);