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

FieldTypeRequiredDescription
statestring | object | arrayyesContent to evaluate: plain text or structured application state.
modelstringyesanyrouter/decision (free, routed), or a catalog id such as typesafe/jev. Aliases: typesafe/jev-latest, typesafe/jev-preview, typesafe/jev-1.13.0.
questionsobjectyesNon-empty map of question id → { type, instructions, criteria? }; do not send an array. Types: noul, choice, score.

Question types

typeMeaningAnswer
noulYes/no; optional criteria is an object with true and false descriptionsnoul probability in [0, 1]
choiceOne option; criteria must be an object map of option → description or nullchoice, probabilities, confidence
scoreOrdered criteria array with 2–10 level descriptionsscore, 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