API referenceDocumentation

Decision models

Typed choice, noul and score answers with confidence from Jev and other System One models.

Follow updates
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 IDProviderContextInput / 1M tokens
jev-latestTypeSafe64K$0.042 Free
jev-previewTypeSafe64K$0.042 Free
jev-1.13.0TypeSafe64K$0.042 Free
decision-model-previewQwen65K$0.045 Free
clefCloudflare64K$0.24 Free
clef-flashCloudflare24K$0.038 Free
clef-omniCloudflare64K$0.15 Free

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.

The three clef IDs are Cloudflare's own decision models, served from Workers AI. clef (27B) is the most precise, clef-flash (9B) the fastest, and clef-omni (30B mixture-of-experts) sits between them. They take the same request as Jev. Clef's inline-image extension is not exposed through RouterPlex: send text or JSON as state.

Request

bash
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"]
}
}
}'
FieldTypeNotes
modelstringOne of the model IDs above.
statestring, object or arrayThe content to evaluate: text, a record, a chat log.
questionsobjectYour question ids mapped to typed questions. Answers come back under the same ids.

Question types

TypeAskscriteriaAnswer fields
noulIs this statement true?Optional {"true": "...", "false": "..."}noul: probability of yes, 0 to 1
choicePick one optionRequired map of option to description (or null), up to 255 optionschoice, probabilities, confidence
scoreRate on ordered levelsRequired array of 2 to 10 level descriptionsscore, 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

json
{
"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.

python
import os
from typesafe_sdk import Choice, Noul, TypeSafeClient
 
client = 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

StatusMeaning
400Malformed request: unknown model, missing state, or an invalid question. The message names the field.
401Missing or invalid API key.
402Your balance is used up. Top up on the billing page.
429Rate limited. Retry with exponential backoff.
502 / 503 / 504The decision model provider failed or is overloaded. Retry shortly.
Decision models · RouterPlex Docs