Usage
d1-omni-600M · ONNX on CPU · no auth
d1-omni is a decision model: it does not write text. You give it a state (the thing being decided about), a typed question and, optionally, an image; it returns a probability distribution over the question's options from a single forward pass.
Endpoints
| Method & path | What it does |
|---|---|
POST /api/decide | The inference route — everything below is about this one. |
GET /api/health | 200 + {"status": "ok"} once the model is loaded. |
GET /api/info | Model files, quant levels and limits. |
GET /docs | Interactive OpenAPI docs (try it in the browser). |
Request
JSON body, content-type: application/json:
| Field | Type | Notes |
|---|---|---|
question | object | Required. type, instructions, criteria — see below. |
state | string or any JSON | What the question is about. Optional with an image; defaults to empty text. |
image | string | Optional. Base64 of the image bytes, or a full data:image/png;base64,... URL. |
Question types
type | criteria | Returns |
|---|---|---|
choice |
{name: description}, at least 2 options |
choice (winning option name), confidence, probabilities per option |
noul |
optional {"true": "...", "false": "..."} (or yes/no keys) |
noul = P(yes), plus probabilities |
score |
list of 2–10 level descriptions, lowest first | score = expected level (0-based float), probabilities per level, legend |
The descriptions matter: the model reads name: description for each option,
so put the meaning in the description and keep names short.
Examples
Text · choice
curl -s https://d1.corbia.net/api/decide \
-H 'content-type: application/json' \
-d '{
"state": "I was charged twice this month, please refund one of them.",
"question": {
"type": "choice",
"instructions": "Which team should handle this?",
"criteria": {
"billing": "Charges, refunds, invoices",
"technical": "App or site faults",
"fraud": "Suspected unauthorised use"
}
}
}'
Text · noul (yes/no)
curl -s https://d1.corbia.net/api/decide \
-H 'content-type: application/json' \
-d '{
"state": {"subject": "Quarterly report", "sender": "unknown@extarnal-partner.com", "attachments": ["report.xlsm"]},
"question": {"type": "noul", "instructions": "Is this email suspicious?"}
}'
Text · score
curl -s https://d1.corbia.net/api/decide \
-H 'content-type: application/json' \
-d '{
"state": "The API works but the docs are thin and two endpoints 500 under load.",
"question": {
"type": "score",
"instructions": "Rate this developer review",
"criteria": ["hostile", "unhelpful", "mixed", "helpful", "excellent"]
}
}'
Image · base64
# macOS: base64 -i photo.jpg | pbcopy Linux: base64 -w0 photo.jpg > photo.b64
curl -s https://d1.corbia.net/api/decide \
-H 'content-type: application/json' \
-d "{
\"question\": {
\"type\": \"choice\",
\"instructions\": \"What is in the picture?\",
\"criteria\": {\"sign\": \"A sign\", \"receipt\": \"A receipt\", \"person\": \"A person\", \"food\": \"Food\"}
},
\"image\": \"$(cat photo.b64)\"
}"
With an image, state is optional extra context (e.g. a caption or
surrounding conversation). noul questions over images answer against the
default false: no / true: yes wording. Phrase them as plain statements
("Is there a square?", "Is this a cat?") — yes/no answers get brittle with unusual
attribute combinations (e.g. exact colours); prefer a choice when in
doubt.
Python
import base64, requests
r = requests.post("https://d1.corbia.net/api/decide", json={
"state": "Where is the traveller flying to?",
"question": {
"type": "choice",
"instructions": "Which city?",
"criteria": {"LAX": "Los Angeles", "SFO": "San Francisco", "JFK": "New York"},
},
"image": base64.b64encode(open("boarding-pass.png", "rb").read()).decode(),
})
print(r.json())
Response
{
"type": "choice",
"choice": "billing",
"confidence": 0.81,
"probabilities": {"billing": 0.81, "technical": 0.13, "fraud": 0.06},
"meta": {"model": "d1-omni-600M", "modality": "text", "latency_ms": 180.4}
}
Text questions are temperature-calibrated (calmer, sharper distributions); image
questions are not, matching the upstream runtime. One request = one forward pass;
state is truncated to fit the context (16384 tokens for text, 896 alongside an
image). Errors come back as 400 with a detail message.