Jev Getting Started — Install, First Call & Limits

Install the TypeSafe SDK, make your first Jev decision with Noul, Choice, and Score, and learn the model aliases, size limits, and error codes.

September 20, 2026
jevtypesafegetting-startedsdksystem-oneapi

Getting Started with Jev

Jev is reached through a single endpoint: POST https://api.typesafe.ai/v1/systemone, authenticated with a Bearer key. Official SDKs wrap that call with typed helpers for the three primitives. Everything you send is one state plus a dictionary of questions; everything you get back is one answer per question.

This page covers installation, a first call in TypeScript and Python, the primitives, and the limits worth knowing before you build. Read Prompt Engineering next — most of the quality comes from how you write the questions, not the code.

Install the SDK

npm install @typesafe-ai/sdk

The JavaScript SDK targets Node 20+ and ships ESM, CJS, and type definitions. Keep the API key server-side — the SDK blocks browser use on purpose.

Export your key before you run anything:

export TYPESAFE_API_KEY="your-key"

Your First Decision

A support ticket is a good first state: it has free text, a small set of departments, and a severity that maps to ordered levels. All three primitives fit in one call.

import { TypeSafeClient, noul, choice, score } from '@typesafe-ai/sdk'

const client = new TypeSafeClient({
  apiKey: process.env.TYPESAFE_API_KEY,
  defaultModel: 'jev-1.13.0',
})

const state = {
  ticket_message:
    'My card was charged twice for order A-104. Please refund the duplicate.',
  order: { id: 'A-104', charges: [49, 49] },
  refund_policy: 'Duplicate charges are eligible for a full refund.',
}

const { answers, model, usage } = await client.systemOne({
  state,
  questions: {
    refund_requested: noul('Does `ticket_message` request a refund?'),
    department: choice('Which team should handle this?', {
      billing: 'Charges, invoices, refunds, subscriptions',
      technical: 'Bugs, outages, integration problems',
      other: 'None of the above',
    }),
    severity: score('How severe is the reported issue?', [
      'Cosmetic, no functional impact',
      'Degraded, a workaround exists',
      'Blocking, cannot complete the task',
    ]),
  },
})

console.log(model, usage)
console.log(answers.department.choice, answers.department.confidence)

Each answer carries a type. A Noul answer exposes noul; a Choice answer exposes choice, probabilities, and confidence; a Score answer exposes score, legend, probabilities, and confidence.

Decisions are advisory:

A schema-valid answer can still be the wrong answer. Combine the probabilities with your own thresholds in code, and never auto-execute a destructive action on a returned choice alone.

The Three Primitives

PrimitiveQuestion it answersReturns
NoulIs this true?A probability from 0 to 1. There is no separate confidence field — the probability is the only signal.
ChoiceWhich one of these?choice, a full probabilities distribution over your options, and confidence. Up to 255 options.
ScoreWhere on this scale?score, the legend, probabilities, and confidence. The score is the probability-weighted mean of the level numbers, so it can land between levels. Between 2 and 10 levels.

Two consequences of those definitions:

  • A Noul at 0.5 means "can't tell," not "medium." To measure a degree, use a Score with described levels instead of tuning a Noul for agreement.
  • Score levels are judged independently — the model does not see their neighbors. "Worse than the previous level" is meaningless; each level must describe a concrete situation on its own.

Model Aliases and Version Pinning

GET https://api.typesafe.ai/v1/models lists available models. Today the current model is jev-1.13.0, with two aliases: jev-latest (the stable default) and jev-preview.

Every response reports the versioned ID that answered. Once a threshold matters, request the versioned ID explicitly and log it — tuning against an alias means your thresholds can silently drift when the alias moves.

Limits

BoundValue
Total request (state + all questions)~64k tokens
State + longest single question~32k tokens (~150k characters of English)
Options in one Choice255
Score levels2–10
Rate limit250,000 tokens/s and 1,200 requests/min
ModalitiesText only — no images, audio, or video

Rate limits are adjusted dynamically during early access. The vendor SDKs retry with backoff, which matters because the endpoint returns 429 for rate limits and 529 for overload.

Error Codes

CodeMeaningWhat to do
401Bad or missing API keyCheck the key in your environment; never log it
422Body validation failedThe response names the offending field — fix the request shape
429Rate limitedBack off and retry; the SDKs do this by default
529Provider overloadedRetry with backoff

Next Steps

  • Prompt Engineering — the question craft that decides whether your integration works
  • Confidence Gating — turn probabilities into automated, reviewed, and human paths
  • Use Cases — where a decision model earns its place in your stack