Decision models
Typed choice, noul and score answers with confidence from Jev and other System One models.
On this page
POST https://api.routerplex.com/v1/systemone
Decision models answer typed questions about a piece of content instead of generating text. Send a state and a map of named questions; get back one typed answer per question, with probabilities and confidence your code can branch on. Every question is evaluated in parallel and in isolation against the same state, so adding questions barely changes latency.
Use the same API key and base URL as for chat models. Decision models are not available through /v1/chat/completions.
Models #
| Model ID | Provider | Context | Input / 1M tokens |
|---|---|---|---|
jev-latest | TypeSafe | 64K | |
jev-preview | TypeSafe | 64K | |
jev-1.13.0 | TypeSafe | 64K | |
decision-model-preview | Qwen | 65K |
Launch promotion: decision models are free for a limited time. The struck-through rate is the list price RouterPlex will charge when the promotion ends. Output tokens are always free. Calls still need an account with an active balance.
jev-latest is TypeSafe's current stable release and jev-preview its newest build; both point to jev-1.13.0 today. The response's model field names the version that answered. If you tune confidence thresholds against a version, pin jev-1.13.0.
Request #
curl https://api.routerplex.com/v1/systemone \-H "Authorization: Bearer $ROUTERPLEX_API_KEY" \-H "Content-Type: application/json" \-d '{"model": "jev-latest","state": "Help! My payouts have been failing for 3 days.","questions": {"is_urgent": {"type": "noul", "instructions": "Does this convey urgency?"},"team": {"type": "choice","instructions": "Which team should handle this?","criteria": {"billing": "Payments, refunds", "technical": "Bugs, outages", "sales": "Pricing"}},"frustration": {"type": "score","instructions": "How frustrated is the customer?","criteria": ["Calm", "Frustrated", "Very angry"]}}}'
| Field | Type | Notes |
|---|---|---|
model | string | One of the model IDs above. |
state | string, object or array | The content to evaluate: text, a record, a chat log. |
questions | object | Your question ids mapped to typed questions. Answers come back under the same ids. |
Question types #
| Type | Asks | criteria | Answer fields |
|---|---|---|---|
noul | Is this statement true? | Optional {"true": "...", "false": "..."} | noul: probability of yes, 0 to 1 |
choice | Pick one option | Required map of option to description (or null), up to 255 options | choice, probabilities, confidence |
score | Rate on ordered levels | Required array of 2 to 10 level descriptions | score, legend, probabilities, confidence |
instructions and criteria also accept objects, so a question can carry the data it refers to: {"question": "Is this the same person?", "candidate": {...}}.
Response #
{"model": "jev-1.13.0","answers": {"is_urgent": {"type": "noul", "noul": 0.95},"team": {"type": "choice", "choice": "billing", "confidence": 0.96,"probabilities": {"billing": 0.98, "technical": 0.02, "sales": 0.0}},"frustration": {"type": "score", "score": 1.04, "confidence": 0.95,"legend": {"0": "Calm", "1": "Frustrated", "2": "Very angry"},"probabilities": {"0": 0.0, "1": 0.96, "2": 0.04}}},"usage": {"input_tokens": 382, "output_tokens": 73, "cost": 0.0}}
usage.cost is the amount billed in USD, also sent as the x-routerplex-cost header. Every response carries x-routerplex-request-id, which you can look up with the cost & usage API.
Designing questions #
Ask atomic questions: each one should be a judgment a knowledgeable person could make in a few seconds. Break a broad judgment ("rate this pitch") into separate questions (market size, feasibility, differentiation) and combine the answers in code, where you control the weights. Use confidence as a second axis: act automatically on confident answers, and route uncertain ones to a person or a larger model.
Using the TypeSafe SDK #
The request and response shapes match TypeSafe's System One API, so TypeSafe's Python SDK (tested with typesafe-sdk 0.7.2) works with RouterPlex once you set its base URL to https://api.routerplex.com (no /v1; the SDK adds it) and pass your RouterPlex key. Use base_url= or the TYPESAFE_BASE_URL environment variable. The JavaScript SDK takes the same root as baseURL.
import osfrom typesafe_sdk import Choice, Noul, TypeSafeClientclient = TypeSafeClient(base_url="https://api.routerplex.com",api_key=os.environ["ROUTERPLEX_API_KEY"],)result = client.system_one(model="jev-latest",state="I was charged twice this month and nobody answers my emails.",questions={"billing": Noul(instructions="Is this a billing problem?"),"team": Choice(instructions="Which team?", criteria={"billing": "Payments", "technical": "Bugs"}),},)print(result.answers["team"].choice, result.answers["team"].confidence)
Errors #
| Status | Meaning |
|---|---|
| 400 | Malformed request: unknown model, missing state, or an invalid question. The message names the field. |
| 401 | Missing or invalid API key. |
| 402 | Your balance is used up. Top up on the billing page. |
| 429 | Rate limited. Retry with exponential backoff. |
| 502 / 503 / 504 | The decision model provider failed or is overloaded. Retry shortly. |