Skip to main content
Decision models are a new class of AI model purpose-built for structured decisions. Instead of generating text token by token, a decision model evaluates a situation and returns calibrated probabilities across a fixed set of outcomes in a single call with zero generated tokens. Liquid’s decision model evaluates text, images, or both. Use the same Noul, Choice, and Score questions to classify an image, inspect a part for defects, or make a decision from a screenshot.

Primitives

Every question you ask a decision model uses one of three types:
  • Noul: A yes/no question that returns a probability between 0 and 1. Think of it as a boolean on a sliding scale. “Is this message spam?” might return 0.92, meaning a 0.92 probability that the answer is yes.
  • Choice: A pick-one-from-many question that returns a probability distribution over named options. “Which department should handle this?” might return {"billing": 0.65, "technical": 0.30, "account": 0.05}.
  • Score: A rate-on-a-scale question that returns a probability-weighted position on an ordered rubric. “How urgent is this?” with three levels might return a score of 1.85 (between “Medium” and “High”), with a probability distribution over each level.
Pick the type that matches the shape of the answer your code needs. Noul vs Score: A Noul at 0.5 means maximum uncertainty between yes and no. It says nothing about degree or intensity. If you want to measure degree (skill level, frustration, severity), use a Score with defined levels. If you need a yes/no gate, use a Noul. When the answer could fit more than one type, think about what your code does next. If it branches on a category, use a Choice. If it compares against a threshold on a continuum, use a Score. If it gates on a boolean, use a Noul.

Setup

  1. Go to console.liquid.ai. If you don’t have an account yet, register and join an organization.
  2. Navigate to Dashboard > API Keys.
  3. Create a new key and copy it. Keys are prefixed with liquid_.
Set the key as an environment variable:
Install the SDK and create a client:
For text-only inputs:
For image inputs, the SDK does not support images yet, so the image examples use requests:
You can also use the following prompt to give your agent to enable it to use Liquid AI’s decision models.

Your First Call

A single API call contains the following fields:
  1. Model: which decision model to use.
  2. State: the context the model should evaluate. This can be plain text (a customer message, an email, a log entry) or a JSON object with structured fields.
  3. Questions: one or more typed questions, each with a name, a type, and instructions. Choice and Score questions also take criteria that define the options or levels. You can ask multiple questions in the same call, and the model evaluates them all at once.
  4. Images (optional): images to evaluate alongside the state. Pass them in the top-level images array. See Image Inputs for the request format and examples.
Response:
Reading the response:
  • answers.is_complaint.noul: The probability that the answer is “yes.” Here, 0.999 means a 0.999 probability that this is a complaint.
  • usage.output_tokens: Always 0. Decision models do not generate tokens.
  • usage.input_tokens: The total input tokens across all questions, including image tokens when images are provided. Each question is charged for its text and all supplied images.
The response contains one answer per question, keyed by the question name. A Noul answer is a single probability. Choice and Score answers also include a full probability distribution and a confidence value.

Usage Examples

Noul

A Noul question returns a single probability between 0 and 1. Your code receives a float that you can threshold to make a binary decision, use as a weight, or pass directly to downstream logic. Values near 0 or 1 express a clear answer; values near 0.5 express genuine uncertainty.
Response (answers field):
Using the result:

Choice

A Choice question returns the selected option, a probability distribution over all options, and a confidence value. confidence summarizes how clear-cut the answer is: high when one option clearly wins, lower when the probability is spread across several options. The distribution tells you not just the top pick but how much probability mass sits on the runner-up, which is useful for flagging ambiguous cases or routing to a fallback.
Response (answers field):
Using the result:

Score

A Score question returns a continuous value across an ordered rubric you define, plus the probability distribution over each level. The value is the probability-weighted position on the scale: if you define four levels (0 through 3), a score of 2.9995 means the model places nearly all weight on the top level.
Response (answers field):
Using the result:

Combining All Three Primitives

You can ask multiple questions of different types in the same call. The model evaluates all of them at once against the same state, so you get a complete decision in one round trip. This is useful when a single piece of input needs to be classified, routed, and prioritized together.
Response (answers field):
Using the result:

Image Inputs

Send images to the decision model through the same /decisions/v1/systemone endpoint used for text decisions. Add an images array alongside model, state, and questions. The question types and response format stay the same.
Vision is available through the Liquid API with the paid d1 model. d1:free is text-only.
Each image can be a Base64 data URL or an object with content_type and base64 fields. Remote image URLs are not accepted. If an image is hosted online, download it and encode its contents before sending the request.

Single Image Input

Pass a single image as a Base64 data URL in the images array. The model evaluates it alongside the text state.
Response (answers field):
Using the result:
The object form is equivalent to a data URL and accepts content_type and base64 fields without the data: prefix:

Multi-Image Input

All questions in a request receive all images. The order of the images matters. Refer to images by position in the state or question instructions.
Response (answers field):

Image Requirements

Base64 encoding increases the request size compared with the original files. Resize or compress images before encoding them if the request is too large, and use the media type that matches each file.
If a request returns The model `d1:free` does not accept images., use d1. If the same error names d1, image input is not available for that model on the endpoint you called.

Image Token Usage

Each image is billed at 1.5 input tokens per 32 × 32 pixel patch, rounded up per image:
For example, a 1024 × 1024 image covers 1,024 patches and contributes 1,536 input tokens per question. Two questions about that image contribute 3,072 image tokens, plus the text tokens for each question. Every question is charged for its text and all the images again. These tokens are included in usage.input_tokens and charged at the model’s input token rate. Image tokens also count toward each question’s input token limit. usage.output_tokens remains 0.

When to Use Decision Models

Decision models are a good fit when the answer is a structured decision: classification, categorization, routing (tickets, emails, requests), scoring, triage, content moderation, guardrails and safety checks, LLM-as-judge replacement, agent tool-call approval, and model routing or cascades. With image input, the same primitives support visual inspection, image classification, and decisions based on screenshots. Use a language model instead for free-form text generation, creative writing, multi-turn conversation, complex multi-step reasoning, open-ended Q&A, summarization, and code generation. To move existing LLM calls to a decision model, see the Decision Model Guide.

Next Steps