endpoint
Decider
POST /v1/systemone. The path follows the System One schema that Decider speaks, which is why the typesafe-sdk works against it unchanged.
Send one state and any number of typed questions about it. Decider 1.1 answers all of them in a single call, and every answer is a probability distribution rather than a bare label, so your code decides how sure it needs to be before acting.
Nothing is generated: each answer is read from the model’s scores for the options you offered, so it can only ever be one of them, and output is never billed. Input costs $0.04 / 1M tokens.
Request
curl https://meragpt.com/v1/systemone \
-H "Authorization: Bearer $MERAGPT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "decider-1",
"state": {
"channel": "email",
"messages": [
{ "from": "customer", "text": "I was charged twice for September. Refund the duplicate, today please." }
]
},
"questions": {
"refund_requested": {
"type": "noul",
"instructions": "Is the customer asking for money back?"
},
"team": {
"type": "choice",
"instructions": "Which team should handle this?",
"criteria": {
"billing": "Charges, invoices, payments and refunds.",
"technical": "The product is not working as expected.",
"account": "Login, plan changes and access."
}
},
"urgency": {
"type": "score",
"instructions": "How urgent is this?",
"criteria": ["Can wait a week", "Within a few days", "Today", "Immediately"]
}
}
}'| field | type | notes |
|---|---|---|
model | string | decider-1. Optional: omitted, or the typesafe-sdk’s default model name, means Decider 1. |
state | any JSON | Required. What the questions are about: a conversation, an alert, an invoice, an agent trace. |
questions | object | Required. A name for each question, mapped to the question. Up to 64 per request. |
Question types
| type | criteria | answer |
|---|---|---|
noul( boolean also accepted) | Optional: {"true": "...", "false": "..."} describing each side. | The probability of yes. |
choice | Required: each label mapped to a description. 2 to 255 labels. | A probability per label, the most likely label, and its probability. |
score | Required: the levels as an ordered list, lowest first. 2 to 32 levels. | A probability per level, the expected level, and the top level’s probability. |
Every question needs instructions: the question itself, in plain words. Write labels and levels the way you would explain them to a new colleague; the descriptions are part of what the model reads.
Response
{
"id": "req_4f1c9a0b2e7d6c5a3b8e9f01",
"object": "systemone",
"model": "decider-1",
"answers": {
"refund_requested": { "type": "noul", "noul": 0.9989 },
"team": {
"type": "choice",
"choice": "billing",
"confidence": 0.9967,
"probabilities": { "billing": 0.9967, "technical": 0.0005, "account": 0.0028 }
},
"urgency": {
"type": "score",
"score": 2.0464,
"confidence": 0.4405,
"legend": { "0": "Can wait a week", "1": "Within a few days", "2": "Today", "3": "Immediately" },
"probabilities": { "0": 0.0448, "1": 0.1895, "2": 0.4405, "3": 0.3253 }
}
},
"usage": { "input_tokens": 188, "output_tokens": 0, "cost_usd": "$0.0000075" },
"balance_usd": "$9.99"
}A noul answer is the bare probability of yes, with no separate confidence. A score’s legend and probabilities are keyed by level index. The score is the expected level; the distribution tells you when that average hides a genuine split, as it does above between “today” and “immediately”.
Images
Put an image anywhere in the state as an image_url object holding a base64 data URL, and ask about it like any other value. Up to 8 images per request, PNG, JPEG, WebP or GIF, at most 8 MB each; links to images elsewhere are not fetched.
{
"model": "decider-1",
"state": {
"receipt": { "type": "image_url", "image_url": { "url": "data:image/png;base64,iVBORw0KGgo..." } },
"claimed_amount": 39.45
},
"questions": {
"matches_claim": { "type": "noul", "instructions": "Does the total on the receipt match the claimed amount?" },
"category": {
"type": "choice",
"instructions": "Which expense category fits this receipt?",
"criteria": { "meals": "Food and drink", "travel": "Transport", "office": "Office supplies" }
}
}
}Offering “I don’t know”
When the state may not hold the answer, add an option such as "unknown": "The state does not say". Decider 1.1 takes it when it cannot tell, rather than guessing confidently. Leave it out if you want a committed answer every time.
Using the typesafe-sdk
The endpoint speaks the System One schema, so the typesafe-sdk works against it without code changes. Point it here and give it your meraGPT key:
export TYPESAFE_BASE_URL=https://meragpt.com
export TYPESAFE_API_KEY=$MERAGPT_API_KEYRequests the SDK sends with its default model name are answered by Decider 1.1. To be explicit, pass model="decider-1" (always the latest 1.x) or model="decider-1.1". The state and any one question together can hold up to 32,768 tokens, and a choice offers up to 255 labels.
Speed
Every question is answered on its own over the state, in parallel, and the state’s work is shared between them, so twenty questions cost little more than one. Because each is read alone, adding a question never moves the answers to the others. A request larger than the context returns 400 input_too_long, never a retryable error. When we are out of capacity for a moment you get 429 with a Retry-After header, which the typesafe-sdk honours on its own; see errors.
One state, or one item per state
Every question reads the whole state. That is the point when the questions are about one thing — a ticket, an alert, a trace — and each answer draws on all of it. It is a trap when they are not: batch several independent items into one state and a question about the first is answered in the light of the others. Measured on a moderation batch, a message scored 0.08 on a trait alone and 0.74 with a different, unrelated offending message beside it.
So batch questions, not items. Ask twenty questions about one conversation in a single call, and send separate calls for separate items you want judged independently. Sharply worded, single-trait questions also separate better than broad ones: “does this contain a lookalike link?” discriminates where “is this harmful?” bunches answers in the middle.
Size limits through a library
The state and any one question together must fit 32,768 tokens (images count as up to 1,600 each). Over that you get 400 input_too_long, never a retryable error, so a caller knows to send less rather than to try again.
Worth checking if you reach us through a library that assembles the state for you. LiteLLM’s relevance guardrail, for example, packs up to 4,000 characters per tool result into one request, which can exceed the context on its own — and when the call fails it forwards the original request unchanged, so the guardrail quietly does nothing. Cap what it packs, or split the state across calls.
Every response carries the request id twice, as X-Request-Id and as X-TypeSafe-Request-Id, so whichever of the two your client reads, you have an id to quote. Look it up at GET /v1/requests/{id} — see errors.
What it is not for
- Open-ended answers. It picks between the options you give it and cannot write anything else.
- Facts it would need to look up. It decides from the state you send and knows nothing beyond it.
- Locating things in an image (bounding boxes) or reading out text it should copy. It chooses between the options you give.
Benchmarks and the full comparison are on the model page.
Worked examples
The cookbooks have runnable recipes with real output, including routing a support email, confidence-gated actions, RAG passage filtering and output guardrails. Start with this one.