Decisions API
POST /api/v1/decisions sends state and typed questions and returns structured answers. Not chat. /api/v1/systemone is the same handler.
Evaluate application state against typed questions and get structured answers (probabilities, not chat text). This is TypeSafe's System One contract, not OpenAI Chat Completions.
POST /api/v1/systemone is the same handler, auth, and body. Prefer /api/v1/decisions.
Send an LLM API key (sk-ar-v1-…) from /dashboard/keys as Authorization: Bearer ….
Free on Go and up: anyrouter/decision
Send "model": "anyrouter/decision" and AnyRouter runs it on its own keys, free on Go and every higher plan. The Free plan gets 5 trial requests, shared with free models, then 403 free_tier_requires_subscription; the signed-out Decisions try-out stays open to everyone:
- No credits. Every request is charged
$0, and your balance can be zero. - No BYOK key. AnyRouter pays the upstream provider.
- No plan quota. There is no daily or monthly cap. A per-key fair-use burst cap of 60 requests per minute stops runaway loops; see Rate Limits.
anyrouter/decision picks a healthy free decision model and falls back to the next on failure; the response's model names the one that answered. Current list: /model/anyrouter/decision.
To pin one model instead, send its catalog id, for example typesafe/jev. A pinned model runs on its $0 platform route when one exists, or on a BYOK key you saved under Dashboard → BYOK for a provider that serves it: TypeSafe, LLM Gateway, Vercel AI Gateway, AIHubMix, or AutoJev.
Do not send decision requests to /chat/completions. Jev is a decision model (capability: systemone) and is rejected on chat-shaped endpoints.
Request
| Field | Type | Required | Description |
|---|---|---|---|
state | string | object | array | yes | Content to evaluate: plain text or structured application state. |
model | string | yes | anyrouter/decision (free, routed), or a catalog id such as typesafe/jev. Aliases: typesafe/jev-latest, typesafe/jev-preview, typesafe/jev-1.13.0. |
questions | object | yes | Non-empty map of question id → { type, instructions, criteria? }; do not send an array. Types: noul, choice, score. |
Question types
type | Meaning | Answer |
|---|---|---|
noul | Yes/no; optional criteria is an object with true and false descriptions | noul probability in [0, 1] |
choice | One option; criteria must be an object map of option → description or null | choice, probabilities, confidence |
score | Ordered criteria array with 2–10 level descriptions | score, legend, probabilities, confidence |
Response
{
"model": "jev-1.13.0",
"answers": {
"is_urgent": { "type": "noul", "noul": 0.92 }
},
"usage": { "input_tokens": 312, "output_tokens": 48, "cost": 0 }
}usage.cost is 0 for anyrouter/decision. On a BYOK route your provider bills you directly (TypeSafe bills input tokens only), and AnyRouter charges no credits.
Example
curl -sS https://anyrouter.dev/api/v1/decisions \
-H "Authorization: Bearer $ANYROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"state": "Help! My payouts have been failing for 3 days.",
"model": "anyrouter/decision",
"questions": {
"is_urgent": {
"type": "noul",
"instructions": "Does this convey urgency?"
}
}
}'See TypeSafe's API reference and models for primitives, confidence, and rate limits.
AnyRouter routes requests to third-party models. Models and outputs are provided as is, with no warranty; you use them at your own risk. Disclaimer