To use TypeSafe’s Jev decision model in Node.js, install @typesafe-ai/sdk, create a TypeSafeClient, and send a state plus typed questions through client.systemOne(). The SDK reads TYPESAFE_API_KEY from the environment. Questions built with noul(), choice(), and score() return answers your application can use to decide what happens next. The direct SDK requires Node.js 20 or newer and a TypeSafe API key. Flavio Copes’s Node.js guide documents this path.
Jev evaluates the supplied information without generating prose. That makes it useful for a judgment inside an application, such as identifying a sponsorship inquiry or choosing a support queue. Your code still owns the response, routing rule, and decision to request review. A constrained answer gives the application a predictable interface.
Set up the SDK and keep the key on the server
For example, set up a project with these commands:
mkdir inbox-triage
cd inbox-triage
npm init -y
npm pkg set type=module
npm install @typesafe-ai/sdk
Setting "type": "module" enables the guide’s use of import and top-level await.
Put TYPESAFE_API_KEY in the server environment. If you use a .env file, keep it out of Git. The documented client initialization is:
import { noul, TypeSafeClient } from '@typesafe-ai/sdk'
const client = new TypeSafeClient()
Access is a separate prerequisite from installation. Copes reported that new TypeSafe signups were paused because of demand in late September 2026, while existing accounts continued working. That is a dated report, rather than confirmation of signup availability today.
The guide also describes a browser guard: the constructor throws when it detects a browser environment, because client-side use would expose the API key. The documented override is dangerouslyAllowBrowser: true; the implementation guidance is to call the API from a server. Source: Node.js guide.
Define the state and the judgment separately
The state is the information Jev evaluates. It can be a string, a JSON object, or a JSON array of text. Jev reads text; the supplied research does not describe image, audio, or video processing. Copes’s Jev explainer describes the input format and three question types.
The questions specify what to assess and, for choices and scores, define the possible outcomes. The SDK provides helpers for the three question types:
| Purpose | SDK helper |
|---|---|
| Ask a yes/no question | <code>noul()</code> |
| Choose among named options | <code>choice()</code> |
| Assess an ordered scale | <code>score()</code> |
The application supplies state and questions to await client.systemOne({ state, questions }). In the guide’s contact-form example, a Noul asks whether a message requests sponsorship. A Choice could categorize the described product, while a Score could assess how specific the request is.
According to Refix’s TypeScript quickstart, the SDK infers answer types from the question map. The useful design consequence is that defining the question also defines the kind of answer the calling code should handle.
Understand the three answer types
A Noul supplies a yes/no probability, a Choice selects from a defined set, and a Score places the state on an ordered rubric. Choice supports up to 255 options; Score supports between 2 and 10 levels. The descriptions of those options and levels are part of the question, so their meaning needs to match the application’s intended judgment. Sources: Jev explainer, Vercel’s integration guide.
Probabilities can inform a routing rule, but the rule remains an application decision.
Keep branching rules in application code
TypeSafe says questions in one request are evaluated independently and in parallel against the same state, as reported by Refix. Vercel likewise describes independent evaluation and says adding a question does not change the others. This supports asking several distinct judgments about one message without treating the result as a generated conversation. Refix, Vercel.
For example, application code could route clear cases automatically and send uncertain results to review. A department choice could select a support queue; a severity score could influence priority. The practical separation is between assessing the input and deciding what action follows. Changing a review threshold need not redefine the question being asked.
Refix reports two relevant TypeSafe recommendations: keep arithmetic, counting, and date comparison outside Jev, and pin a versioned model after testing thresholds because aliases can move. For an integration, that means deterministic calculations belong in ordinary code, while the model supplies the semantic judgment.
Check model selection, timeouts, and retries
The Node.js guide reports these defaults:
| Setting | Documented default |
|---|---|
| <code>baseURL</code> | <code>TYPESAFE_BASE_URL</code>, then <code>https://api.typesafe.ai</code> |
| <code>defaultModel</code> | <code>TYPESAFE_DEFAULT_MODEL</code>, then <code>jev-latest</code> |
| <code>timeout</code> | <code>10000</code> milliseconds per attempt |
| Retries | Up to 2 retries; wait starts at 500 ms, doubles up to 5 seconds, with random jitter |
These defaults matter when deciding how long a routing operation may wait: a timeout per attempt and retries both affect the request’s operational behavior. Source: Node.js guide.
The same guide reports that, as of September 2026, both jev-latest and jev-preview pointed to jev-1.13.0. It describes the former as the stable alias and the latter as advancing when a preview build exists. That historical alias mapping should not be read as a permanent guarantee.
Consider the Vercel path
Vercel documents access through the AI SDK’s experimental_evaluate API and AI Gateway, using the model ID typesafe-ai/jev.
Vercel lists a context window of 64,000 tokens per request and 32,000 for state, and says evaluation calls appear in Gateway logs, custom reporting, and budgets. It also lists Zero Data Retention and No Training controls per request. These are Vercel’s documented Gateway properties. Source: Vercel integration guide.
The supplied sources list input pricing at $0.042 per million tokens, with no output-token charge. Copes attributes an approximately 100-millisecond completion time for most calls to TypeSafe; the research supplies no independent latency benchmark. Source: Jev explainer.
The implementation decision therefore turns on the judgments your application needs, the answer definitions you can specify, and the behavior you want when confidence is insufficient. Test those thresholds, keep the documented deterministic tasks in code, and pin the tested model version before relying on its answers for automated routing.



