Jev knowledge base·verified Sep 22, 2026

jev quickstart

Call Jev from Python, TypeScript or HTTP, preserve typed distributions, keep keys server-side and add safe production boundaries.

the short answer

Create a TypeSafe API key, keep it in a server-side TYPESAFE_API_KEY environment variable, and call Jev through the official Python SDK, JavaScript SDK or POST /v1/systemone. Send relevant state, a model ID and named Choice, Score or Noul questions. Preserve the returned model, typed answer distributions and token usage; application code owns thresholds, retries, permissions and actions.

Python package
typesafe-sdk
JavaScript package
@typesafe-ai/sdk; Node 20+
HTTP endpoint
POST https://api.typesafe.ai/v1/systemone
Default SDK model
jev-latest
Production recommendation
Pin a version after evaluation

Start with One Bounded Decision

A useful first call is not “understand this ticket.” It is one operational question with a known answer shape: choose an approved queue, measure one yes/no condition, or rate against explicit ordered levels. The primitive decision guide separates Choice, Noul and Score; Choice versus Noul prevents forced single-label designs.

The examples below follow TypeSafe’s official READMEs and API reference as checked September 22, 2026. They are source-verified, not live API executions in this repository because no TypeSafe credential is available here. Before deployment, run the chosen client against your account, pin package versions and capture a sanitized response fixture.

Python: Official Client and Typed Choice

The official README demonstrates Choice, TypeSafeClient, the context-manager lifecycle and system_one. This version pins the model and keeps the full Choice answer rather than logging only the winning label. Confirm the exact installed SDK types because client releases can evolve independently of this article.

# uv add typesafe-sdk
from typesafe_sdk import Choice, TypeSafeClient

with TypeSafeClient() as client:
    response = client.system_one(
        state={"document": "I was charged twice. Please fix this ASAP."},
        questions={
            "category": Choice(
                instructions="What is this ticket about?",
                criteria={
                    "billing": None,
                    "technical": None,
                    "other": None,
                },
            ),
        },
        model="jev-1.13.0",
    )

answer = response.choices["category"]
print(answer.choice)
print(answer.probabilities)
print(response.model, response.usage)

TypeScript: Keep the Client on the Server

The official JavaScript SDK requires Node 20 or newer and infers answer types from the questions object. Its source refuses browser use by default because that would expose the API key. Put the client in a server route, worker or trusted backend; a framework environment variable prefixed for public/browser use is not a secret.

// npm install @typesafe-ai/sdk
import { choice, TypeSafeClient } from "@typesafe-ai/sdk";

const client = new TypeSafeClient({ defaultModel: "jev-1.13.0" });
const response = await client.systemOne({
  state: { document: "I was charged twice. Please fix this ASAP." },
  questions: {
    category: choice("What is this ticket about?", {
      billing: null,
      technical: null,
      other: null,
    }),
  },
});

console.log(response.answers.category.choice);
console.log(response.answers.category.probabilities);
console.log(response.model, response.usage);

HTTP: The Smallest Portable Contract

The API returns model, answers keyed by the caller’s question IDs, and usage with input and output token counts. A Noul answer contains type and noul; Choice and Score carry their own fields and confidence. Validate the discriminated answer type before reading it, and do not turn transport success into a pass/fail decision automatically.

curl https://api.typesafe.ai/v1/systemone \
  -H "Authorization: Bearer $TYPESAFE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "jev-1.13.0",
    "state": "I was charged twice. Please fix this ASAP.",
    "questions": {
      "is_refund_request": {
        "type": "noul",
        "instructions": "Does the customer explicitly ask for a charge to be reversed?"
      }
    }
  }'

Put a Production Boundary Around the Call

01ValidateAuthenticate, redact secrets, filter candidates and compute exact facts.
02Project stateName the smallest evidence needed for the question.
03Call JevUse a pinned model, bounded timeout and explicit retry budget.
04InterpretStore distributions and apply calibrated act/review/fallback bands.
05ObserveRecord versions, tokens, latency, errors, overrides and outcomes.
The SDK is a transport client; production reliability remains application work.

Make the First Test Useful

A successful curl proves authentication and schema, not evaluator quality. Follow Jev calibration and threshold selection before using a probability to automate an action. Review Jev 1.13 limitations for fixtures around arithmetic, dates, indirection, long state and adversarial content.

  1. Create 30–100 representative fixtures, including no-match, ambiguous and adversarial cases.
  2. Have a domain owner label them without seeing Jev’s answer.
  3. Run a pinned model and save complete serialized responses.
  4. Report class errors, calibration, latency, usage and failure behavior.
  5. Choose thresholds on separate calibration examples, then shadow before acting.

Quickstart Mistakes That Survive into Production

MistakeSafer design
Put API key in browser codeCall from a trusted server boundary
Use jev-latest silently in policyPin and log the resolved model after evaluation
Serialize an entire traceCreate a versioned minimal state projection
Store only the winning labelPersist the full typed distribution and versions
Retry until something answersBound attempts within the action latency budget
Treat 0.5 as a universal thresholdFit risk-based bands on held-out outcomes

FAQ

Do I need a TypeSafe API key?

Yes for the direct TypeSafe service. Keep it server-side in TYPESAFE_API_KEY or an approved secret manager. Gateway access uses provider-specific credentials.

Which Jev model should a quickstart use?

SDK examples may default to jev-latest. For a reproducible evaluation, resolve and pin the current version such as jev-1.13.0, then re-check the model page.

Can I call Jev from a browser?

The official JavaScript SDK refuses browser use by default because it exposes the key. Use a trusted server endpoint.

Does a valid response mean the question works?

No. It proves the API contract. Validate semantic quality, calibration and operational behavior on independent outcomes.

Sources

Checked against the sources below on September 22, 2026. Model versions, prices and limits change.

  1. TypeSafe AI docs: HTTP API reference
  2. TypeSafe AI: official Python SDK
  3. TypeSafe AI: official JavaScript SDK
  4. TypeSafe AI docs: Primitives
  5. TypeSafe AI docs: How to build with System One
  6. TypeSafe AI docs: State
  7. TypeSafe AI docs: Models
  8. TypeSafe AI docs: Jev 1.13 jaggedness