System One (TypeSafe Jev)
Jev, from TypeSafe AI, is a decision model, not a chat model. You send it a state (text or JSON) and a set of typed questions; it answers each one with a calibrated value: a yes/no probability, one option from a list, or a position on a rubric, rather than generated text. VectorAxis serves TypeSafe’s System One API on its own paths and in its own format, so the TypeSafe SDK works by changing its base URL.
from typesafe_sdk import Choice, Noul, Score, TypeSafeClient
client = TypeSafeClient(
api_key="vk-1a2b3c4d5e6f7a8b", # a TYPESAFE virtual key, not your TypeSafe key
base_url="https://api.vectoraxis.ai", # the SDK appends /v1/systemone
)
result = client.system_one(
{"ticket": "I was charged twice. Please fix this ASAP."},
{
"billing": Noul(instructions="Is this ticket about billing?"),
"tone": Choice(
instructions="What is the customer's tone?",
criteria={"calm": None, "frustrated": None, "angry": None},
),
"urgency": Score(
instructions="How urgent is this ticket?",
criteria=["can wait", "this week", "today"],
),
},
)
print(result.nouls["billing"].noul) # probability the answer is yes, 0-1
print(result.choices["tone"].choice) # always one of your options
print(result.scores["urgency"].score) # 0 = first level ... 2 = last level- Classification and triage. Route a ticket, label a document, pick a queue. A choice answer is always one of the options you defined, so your code can switch on it directly.
- Checks and scores inside a pipeline. “Does this answer cite the source?”, “how severe is this incident?”, with a confidence you can threshold on to decide between acting, asking for review, or falling back.
- Not for writing. Jev doesn’t generate text, code, or summaries. Use chat completions for that.
Create a virtual key in Bring Your Own Key mode, pick TypeSafe AI as the provider, and paste the API key from your TypeSafe account. Send the key’s slug as Authorization: Bearer vk-… (what the SDK does) or x-virtual-key. For a quick test without a virtual key, send x-provider: typesafe plus x-api-key.
| Method | Path | What it does |
|---|---|---|
| POST | /v1/systemone | Answer every question about the state in one call. Questions run in parallel and independently. |
| GET | /v1/models | The model names your TypeSafe account can use (what the SDK’s models.list() calls). |
Request and response bodies are TypeSafe’s own, unchanged: VectorAxis settings travel in headers, never in the body. The same call over plain HTTP:
curl https://api.vectoraxis.ai/v1/systemone \
-H "Authorization: Bearer vk-1a2b3c4d5e6f7a8b" \
-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?" }
}
}'{
"model": "jev-1.13.0",
"answers": { "is_urgent": { "type": "noul", "noul": 0.95 } },
"usage": { "input_tokens": 296, "output_tokens": 20 }
}| type | criteria | Answer |
|---|---|---|
| noul | Optional { "true": …, "false": … } describing what yes and no mean. | noul: the probability the answer is yes, 0–1. |
| choice | A map of option → description (or null). Up to 255 options. | choice, a probabilities map over every option, and confidence. |
| score | An ordered list of 2–10 level descriptions, lowest first. | score (a position that can land between levels), a legend, probabilities and confidence. |
instructions, criteria and the state itself can all be structured JSON as well as plain text. TypeSafe documents the full semantics, including how confidence is derived, in its primitives guide and API reference.
| How it applies to System One | |
|---|---|
| Budgets & limits | The key’s credit limit, alert threshold and expiry apply, as do its requests-per-minute, per-day and tokens-per-minute limits (every call counts as a request; its input and output tokens count toward TPM), and your plan’s workspace request limit. Spend on System One counts against the same credit limit as everything else on the key, and a key that runs out moves to EXHAUSTED. |
| Model allowlist | Restrict a key to specific models, e.g. jev-latest or a pinned jev-1.13.0. |
| Guardrails | Input guardrails (the key’s own and any named in x-guardrail) run over every piece of text in the state and in each question’s instructions. BLOCK stops the call before it reaches TypeSafe; REDACT masks the text first. There is no output phase: answers are numbers and your own option names. |
| Logs | Every call is a log entry with operation system_one, the version that answered, the number of questions, and the lowest confidence in the call, so the least certain decisions are easy to find. See Request Logs. |
| Cost | Priced at TypeSafe’s published rate for Jev: $0.042 per million input tokens, output tokens free. The cost of each call is on its log entry and in the x-operation-cost-usd response header. |
| Retries | 429 and 529 from TypeSafe are retried with backoff, honouring Retry-After; tune with x-retry-count / x-retry-status-codes. |
| Errors | TypeSafe’s own errors come back unchanged (status, body and Retry-After), so the SDK’s error handling works as it does direct. Errors raised by VectorAxis itself, such as an exhausted key or a guardrail block, use the platform’s usual format. |
- Platform keys. Bring your own TypeSafe key.
- Caching and fallback. x-cache-* and x-fallback-* headers are ignored on System One.
- The playground. It is built for chat; call System One from code or the SDK.