d1
Model Overview
d1 is a decision model from Liquid AI: instead of generating text it reads text and images and returns typed answers — yes/no, choice, score — with calibrated probabilities, in one forward pass with no output tokens. It is built for classification, routing, scoring, moderation, visual inspection and LLM-as-judge checks. Context window is 32,768 tokens.
It speaks the same /v1/decisions wire as Jev, so the request shape is identical and you can swap one for the other by changing model.
API Schema
The content to evaluate: a string, a JSON object, or an array of texts. Leave it out when the questions stand alone.
Help! My payments have been failing for 3 days.Up to 8 images of the state, in order: every question sees all of them, so refer to an image by its position. Each one counts as input tokens — 1.5 per 32×32-pixel patch (a 1024×1024 image is 1,536) — again for every question. At most 10,000 patches across the images, a side at most 100 times the other, and 4.5 MB for the whole request once the images are inlined.
Resolved model version that answered.
POST /v1/decisions HTTP/1.1
Host: api.aimlapi.com
Content-Type: application/json
Accept: */*
Content-Length: 274
{
"model": "liquid/d1",
"state": "Help! My payments have been failing for 3 days.",
"questions": {
"ANY_ADDITIONAL_PROPERTY": {
"type": "noul",
"instructions": "text",
"criteria": {
"true": "text",
"false": "text"
}
}
},
"images": [
"https://example.com"
],
"assets": {
"ANY_ADDITIONAL_PROPERTY": null
}
}{
"model": "text",
"answers": {
"ANY_ADDITIONAL_PROPERTY": {
"type": "noul",
"noul": 1
}
},
"usage": {
"input_tokens": 1,
"output_tokens": 1
}
}Code Example
Every key you send under questions comes back under answers with the matching type.
Two things to notice if you are coming from Jev:
output_tokensis0. d1 reaches its answer in a single forward pass rather than emitting tokens, so the whole cost is the input. The call above billed $0.00001 and returned in 369 ms.Probabilities are full precision. d1 returns values like
0.9724147137760725where Jev rounds to two decimals. Round them yourself before showing them to anyone.
Last updated
Was this helpful?