Decision API

Call TypeSafe System One decision models on Tokener.ai with the same API key and credits.

Updated 2026-09-21
Edit on GitHub

Decision models answer structured questions about a piece of state instead of producing free-form text. They are not OpenAI- or Anthropic-compatible: they do not live under the /v1 base URL and cannot be called through the OpenAI or Anthropic SDKs.

StatusMethodPathUse for
SupportedPOST/typesafe/v1/systemoneTypeSafe System One decision models

Authentication, credits, error shapes, and the x-request-id / request-id response headers work exactly as they do on the rest of the model API. Send your Tokener.ai API key as the Bearer token. The response is a single JSON object.

Request

Shell
curl https://api.tokener.dev/typesafe/v1/systemone \
  -H "Authorization: Bearer $TOKENER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "jev-latest",
    "state": "The customer cannot sign in.",
    "questions": {
      "department": {
        "type": "choice",
        "instructions": "Route this request.",
        "criteria": {
          "technical": "Technical support",
          "billing": "Billing"
        }
      }
    }
  }'

state is the text to judge. Each entry under questions is one question about that state, and criteria enumerates its allowed answers. Add more entries to ask several questions in a single request.

Response

JSON
{
  "answers": {
    "department": {
      "type": "choice",
      "choice": "technical",
      "confidence": 1.0,
      "probabilities": { "technical": 1.0, "billing": 0.0 }
    }
  },
  "usage": { "input_tokens": 310, "output_tokens": 31 }
}

Every answer keeps the key you gave its question, so results map back by name. Use confidence and probabilities to send borderline cases to a human instead of acting on choice directly.

Models and pricing

Decision models are listed in the Models catalog under Decision, with their public price per million tokens. Pass the catalog model id — for example jev-latest — in the model field.

Create a key in API keys before calling this path. See Errors for error response shapes and the full error code table.