Skip to content

Learn Jev

Jev API

One endpoint, one request shape, and a response your code can read without parsing text. This page covers the call, the fields, the models, and the SDKs.
Endpoint
POST https://api.typesafe.ai/v1/systemone
Auth
Bearer TypeSafe API key
Content type
application/json
Default model
jev-latest
SDKs
Python, JavaScript/TypeScript
Response
Answers keyed by question id

The minimal request

The body is a model name, the state Jev should read, and a map of questions keyed by the id you want back.

cURL
curl https://api.typesafe.ai/v1/systemone \
  -H "Authorization: Bearer $TYPESAFE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "jev-latest",
    "state": "I was charged twice for my subscription this month. Please refund the extra charge.",
    "questions": {
      "billing": {
        "type": "noul",
        "instructions": "Is this message about billing?"
      },
      "tone": {
        "type": "choice",
        "instructions": "What is the tone of this message?",
        "criteria": {
          "angry": "An upset or hostile message",
          "calm": "A neutral or polite message",
          "excited": "An enthusiastic or eager message"
        }
      },
      "urgency": {
        "type": "score",
        "instructions": "How urgent is this message?",
        "criteria": [
          "Can wait",
          "Needs attention this week",
          "Needs attention today"
        ]
      }
    }
  }'
Response (illustrative values)
{
  "model": "jev-1.14.0",
  "answers": {
    "billing": { "type": "noul", "noul": 0.98 },
    "tone": {
      "type": "choice",
      "choice": "calm",
      "confidence": 0.7,
      "probabilities": { "angry": 0.15, "calm": 0.8, "excited": 0.05 }
    },
    "urgency": {
      "type": "score",
      "score": 1.2,
      "confidence": 0.62,
      "probabilities": { "0": 0.12, "1": 0.56, "2": 0.32 }
    }
  },
  "usage": { "input_tokens": 142, "output_tokens": 12 }
}

state accepts a string, a JSON object, or an array of text values. The questions object can mix Choice, Score, Noul, and Box. Each question is evaluated against the same state in parallel, so a request with several questions is not a chain of model calls.

Request fields

The field names below are the ones the API accepts. The official API reference has the complete schema.

Jev API request fields
FieldWhat it does
modelThe model ID or alias. Use jev-latest unless you need to pin a version.
stateThe text, JSON, or images Jev evaluates. Everything the question needs should be here.
questionsAn object keyed by question id. Each value has a type and instructions; Choice and Score also take criteria.
questions.*.typechoice, score, noul, or box. Box needs Jev 1.14 and the images danger-zone header.
questions.*.criteriaChoice takes a map of option to description. Score takes an ordered array of levels. Noul does not need criteria.

Models and aliases

Every model runs on the same endpoint. The model field selects which one handles the request.

Jev model IDs and aliases
NameWhat it is
jev-latestThe stable alias. Currently points to jev-1.14.0 and is the default in the SDKs.
jev-previewThe most recent release, including previews. Currently points to the same model as jev-latest.
jev-1.14.0Versioned ID for Jev 1.14. Adds Box questions and image input under the danger-zone headers.
jev-1.13.0Previous stable version. Choice, Score, and Noul; still available for pinned workloads.
Aliases move when a release ships. If you tuned confidence thresholds against one version, pin the versioned ID and switch when you have tested the new model. The response's model field records the version that answered.

SDKs

The official clients add typed questions, typed answers, default retries, and error classes. They read TYPESAFE_API_KEY from the environment.

Install
pip install typesafe-sdk
npm install @typesafe-ai/sdk
Python
from typesafe_sdk import Choice, TypeSafeClient

with TypeSafeClient(model="jev-latest") as client:  # reads TYPESAFE_API_KEY
    response = client.system_one(
        state="I was charged twice for my subscription this month.",
        questions={
            "intent": Choice(
                instructions="What does the customer want?",
                criteria={
                    "refund": "A refund or charge correction",
                    "support": "Help using the product",
                    "cancel": "Cancel the subscription",
                },
            ),
        },
    )

    print(response.choices["intent"].choice)

The Python client needs Python 3.10 or later. The JavaScript and TypeScript client needs Node.js 20 or later. Both expose the same primitives and return answers grouped by question type.

The directory tracks the other clients and integrations, including Go, .NET, PHP, Rust, Elixir, Ruby, Scala, DSPy, LlamaIndex, and Home Assistant.

Browse SDKs and clients

Limits, retries, and errors

The parts that decide whether an integration survives production traffic.

Keep reading

The API is one piece. These pages cover the model, the bill, and the alternatives.

Common questions

Short answers, with the source documentation linked where the detail matters.