DocsAPI Reference
Endpoints

System One (Jev)

Evaluate a state against typed questions with TypeSafe's Jev model and get structured, calibrated answers.


POST /v1/systemone forwards TypeSafe's Jev System One dialect. Jev does not generate text: one request evaluates a state against a map of typed questions and answers every question in parallel with a probability, a choice or a score. Use it for classification, routing, scoring and yes/no checks where you want a calibrated number rather than prose.

The request uses your Tokamak inference key and is forwarded to the provider unchanged, apart from the provider's own model id. Jev models are served only on this endpoint; they are not available on /v1/chat/completions, /v1/responses or /v1/messages.

Request

curl -sS https://api.tokamak.sh/v1/systemone \
  -H "Authorization: Bearer $TOKAMAK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "jev/jev-latest",
    "state": "Help! My payouts have been failing for 3 days.",
    "questions": {
      "is_urgent":  { "type": "noul",   "instructions": "Does this convey urgency?" },
      "department": { "type": "choice", "instructions": "Which team should handle this?",
                      "criteria": { "billing": "Payments, invoicing, refunds",
                                    "technical": "Bugs, outages, integrations",
                                    "sales": "Pricing, upgrades, new accounts" } },
      "frustration": { "type": "score", "instructions": "How frustrated is the customer?",
                       "criteria": ["Calm", "Frustrated", "Very angry"] }
    }
  }'
FieldPurpose
modelPublic model ID from Models; jev/jev-latest is the flagship alias. A bare jev-latest is accepted too.
stateThe content to evaluate: a string, or a JSON object or array of text values. Text only.
questionsA map of question id to a typed question. You choose the ids; answers come back under the same ids.

Question types

TypeAsksExtra field
noulIs this true?optional criteria: { "true": …, "false": … }
choiceWhich option?required criteria: map of option to description (null when none), up to 255 options
scoreWhere on this scale?required criteria: ordered array of 2 to 10 level descriptions

All three share instructions, which may be a string or a structured object. See the TypeSafe API reference for the full schema.

Response

{
  "model": "jev-1.13.0",
  "answers": {
    "is_urgent":   { "type": "noul",   "noul": 0.95 },
    "department":  { "type": "choice", "choice": "billing", "confidence": 0.82,
                     "probabilities": { "billing": 0.88, "technical": 0.12, "sales": 0.0 } },
    "frustration": { "type": "score",  "score": 1.06, "confidence": 0.91,
                     "legend": { "0": "Calm", "1": "Frustrated", "2": "Very angry" },
                     "probabilities": { "0": 0.0, "1": 0.94, "2": 0.06 } }
  },
  "usage": { "input_tokens": 386, "output_tokens": 73 }
}

The body is the provider's own answer. Tokamak adds the X-Tokamak-Execution-Id header, which you can use with the usage and generation endpoints. model in the response is the versioned id that answered, so alias changes are visible.

Limits and billing

  • The whole request (state plus every question) must fit the model's context budget; the state plus the longest single question is capped lower. See TypeSafe models.
  • Input tokens are metered and priced from the model's catalog entry. Output tokens are free for Jev.
  • System One counts against the same traffic limits as the other generation endpoints. Under a tokens-per-minute limit, a body without a non-empty questions object cannot be bounded and is refused with 422 traffic_token_bound_required.
  • Errors from the System One handler itself use the same envelope as the provider: {"detail": {"error_type": "...", "message": "..."}}. Credit, budget and traffic-limit refusals come before the handler and use the flat envelope in Error codes. A model served by a non-Jev provider is refused with 400 invalid_request_error before anything is forwarded. Provider validation errors (a missing criteria, for example) come back as the provider's 422 naming the field.

On this page