Decisions
POST /v1/systemone
Several typed questions about one state, each answered with a probability for every option.
The API follows the Jev /v1/systemone contract: several questions per
request, each a choice (2 to 512 labels), a noul (yes/no) or a score
(ordinal levels), optionally over images.
Example
curl https://platform.parseclab.ai/v1/systemone \
-H "Authorization: Bearer $PARSEC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"state": "My card was stolen yesterday and I need it cancelled now.",
"questions": {
"intent": {"type": "choice", "instructions": "Which intent is this?",
"criteria": {"card_lost_or_stolen": "Card lost or stolen",
"cancel_subscription": "Cancel a subscription",
"card_arrival": "Waiting for a new card"}},
"urgent": {"type": "noul", "criteria": {"true": "Needs action today", "false": "Can wait"}},
"severity": {"type": "score", "criteria": ["none", "minor", "major"]}
}
}'
import os, requests
r = requests.post(
"https://platform.parseclab.ai/v1/systemone",
headers={"Authorization": f"Bearer {os.environ['PARSEC_API_KEY']}"},
json={
"state": "...",
"questions": {
"action": {"type": "choice",
"criteria": {"refund": "Give the money back", "replace": "Ship a new unit"}},
},
},
timeout=60,
)
r.raise_for_status()
a = r.json()["answers"]["action"]
print(a["choice"], a["probabilities"], a["confidence"])
Request body
| Field | Type | |
|---|---|---|
state | string, object, or list | The thing being decided about: a string, a JSON object, or a list of {"text": …} / {"image": …} segments. Required. |
questions | object | Question id → {type, instructions, criteria}. At least one. |
images | list | Optional, up to 8, appended after the state. See images. |
model | string | Optional; echoed back. |
Question types
choice:criteriais label → description, 2 to 512 labels. Returnschoice, the most likely label.noul:criteriais{"true": …, "false": …}. Returnsnoul, the probability of yes.score:criteriais a list of level descriptions, lowest first. Returnsscore, the most likely level, and alegendfrom level to description.
instructions is optional on every type: the question as you would ask it.
Context is up to 49,152 tokens; a longer state is refused with
413 state_too_long.
Response
{
"id": "req_…",
"model": "utod-picker-12b-v1",
"answers": {
"intent": {"type": "choice", "choice": "card_lost_or_stolen",
"probabilities": {"card_lost_or_stolen": 0.94, "cancel_subscription": 0.05, "card_arrival": 0.01},
"confidence": 0.91, "confidence_kind": "policy_max",
"policy_max_confidence": 0.91, "entropy_confidence": 0.71, "latency_ms": 212.0},
"urgent": {"type": "noul", "noul": 0.88, "probabilities": {"yes": 0.88, "no": 0.12}, …},
"severity": {"type": "score", "score": 2.0, "probabilities": {"0": 0.03, "1": 0.31, "2": 0.66},
"legend": {"0": "none", "1": "minor", "2": "major"}, …}
},
"usage": {"input_tokens": 1236, "output_tokens": 0, "cost_usd": 0.000124},
"latency_ms": 655.2
}
- Probabilities sum to 1 across each question’s options.
confidenceis the normalised maximum,(K * p_max - 1) / (K - 1)for K options and top probabilityp_max: 0 when every option is equally likely, 1 when one option has all the probability.- Every answered question counts as one decision against the account’s free allowance. Usage is billed once per request, on total input tokens. See billing.