Text
Evaluate Decisions
Evaluate named probability, choice, and score questions with a native decision model.
Send state and named questions to a decision model. Use GET /v1/models?category=decision for current availability and GET /v1/models/{model} for its published contract.
state and each question's instructions accept a string, JSON object, or JSON array. The endpoint returns synchronous JSON.
| Question type | Criteria | Result |
|---|---|---|
noul | Optional object with both true and false guidance | noul, a probability from 0 to 1 |
choice | Object of 1–255 option names mapped to guidance or null | choice, optionally probabilities and confidence |
score | Ordered array of 2–10 descriptions | score from 0 to the last index; it can be fractional, with optional legend, probabilities, and confidence |
The response preserves your question names under answers. usage.input_tokens and usage.output_tokens report observed usage when available. Pricing comes from the model's current tariff; free output does not imply zero output tokens.
Chat messages, tools, streaming, and Batch are not part of this endpoint's contract.
curl https://api.tokenlab.sh/v1/systemone \
-H "Authorization: Bearer $TOKENLAB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "jev-1.13",
"state": "I was charged twice. Please refund the duplicate payment.",
"questions": {
"refund_requested": {"type": "noul", "instructions": "Is a refund requested?"},
"department": {
"type": "choice", "instructions": "Which team should handle this?",
"criteria": {"billing": "Charges and refunds", "technical": "Software bugs"}
},
"urgency": {
"type": "score", "instructions": "Rate urgency",
"criteria": ["Routine enquiry", "Money affected", "Safety emergency"]
}
}
}'The HTTP request is also usable with standard fetch or requests clients. A decision response is structured data, not a generated text explanation.
curl -X POST "https://example.com/v1/systemone" \ -H "Content-Type: application/json" \ -d '{ "model": "string", "state": "string", "questions": { "property1": { "type": "noul", "instructions": "string" }, "property2": { "type": "noul", "instructions": "string" } } }'{ "id": "string", "model": "string", "answers": { "property1": { "type": "noul", "noul": 0 }, "property2": { "type": "noul", "noul": 0 } }, "usage": { "input_tokens": 0, "output_tokens": 0 }}Authorization
BearerAuth API Key authentication. Create or manage API keys in Dashboard > API > API Keys.
In: header
Headers
Per-request Delivery policy. Overrides the API key and Workspace defaults. Auto tries TokenLab Verified first and may switch once to Official only before output, request acceptance, or persistent resource creation.
Value in
- "auto"
- "verified"
- "official"
Request Body
application/json
Response
application/json
application/json
application/json
application/json