← Back to Try Jev AI

DEVELOPER GUIDE / INDEPENDENT GUIDE

Jev API

The Jev API lets software ask typed questions about a shared state and receive decisions with probabilities. Here is the documented integration pattern and how to use it in an application.

Documentation checked September 17, 2026

What is the Jev API?

TypeSafe’s HTTP evaluation API accepts a state, a model identifier and a map of questions. Each question has a type and instructions; Choice questions also specify an answer set. Answers return under the question identifiers you supplied.

This supports small decisions such as routing and classification without asking for a paragraph and extracting a label from it. The reference is the official HTTP API documentation.

How can developers access Jev?

Follow the official TypeSafe quick start to access its console, obtain an API key and review the current access requirements. TypeSafe documents a direct HTTP API and SDK options.

Official Vercel AI Gateway: Jev also lists the model. Use that provider’s current instructions if you choose Gateway; its integration is separate from the direct HTTP example below.

Site status: our public playground is an Interactive Demo. It does not call either service. The server-side adapter is prepared against the TypeSafe reference but has not been tested with a live key.

A documented HTTP request

The following example uses the endpoint, authentication and fields documented in the official API reference. The support-routing scenario is our own. Run this only on your server with a key supplied through the environment.

JavaScript · direct TypeSafe API · server only
// Server-side JavaScript. Never expose this key in browser code.
const response = await fetch("https://api.typesafe.ai/v1/systemone", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.TYPESAFE_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    model: "jev-latest",
    state: "A customer reports a duplicate subscription charge.",
    questions: {
      department: {
        type: "choice",
        instructions: "Which team should handle this request?",
        criteria: {
          billing: "Charges, refunds and invoices",
          technical: "Bugs and integration failures",
          sales: "New purchases and product enquiries",
          other: "Requests outside these teams"
        }
      }
    }
  }),
  signal: AbortSignal.timeout(15000)
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const result = await response.json();
// Validate the response before acting on it.
const department = result.answers.department;

Keep keys out of public environment variables and client bundles. Before exposing a live endpoint, add request validation, request limits and a spending policy. Check the current official documentation for the latest Jev API access details.

What does a Jev response look like?

A Choice answer provides choice, probabilities and a separate confidence value. The example below is a shortened illustration with invented values, not a captured API response. The confidence, model and usage fields are omitted.

Illustrative response excerpt · not a live result
{
  "answers": {
    "department": {
      "type": "choice",
      "choice": "billing",
      "probabilities": {
        "billing": 0.96,
        "technical": 0.02,
        "sales": 0.01,
        "other": 0.01
      }
    }
  }
}

Use the distribution to understand alternatives, and validate the response before using it. TypeSafe’s confidence field is derived from the distribution; do not substitute the top probability for it. See Official documentation: Choice response.

How is it different from an LLM response?

A conventional LLM often returns generated text. Jev exposes a bounded answer through its decision primitives. Modern LLM APIs can also constrain outputs to a schema, so compare task performance and uncertainty on your own data rather than choosing on formatting alone.

Explore the Jev vs LLM comparison.

Useful Jev API use cases

  • Routing: choose a team, handler or workflow branch.
  • Classification: select from a known set of categories.
  • Scoring: evaluate a state against a defined rubric.
  • Verification: check a focused condition before proceeding.
  • Agent control: decide whether to call a tool, retry or request input.

How can Jev be used in agents?

Keep a clear boundary between deciding and executing. Supply the agent’s current state and allowed next actions. Let application code enforce permissions, retry budgets and any review requirements.

  1. Agent state
  2. Jev decision
  3. Policy checks
  4. Tool or next step

For example, a calendar agent missing a meeting date can choose Ask User. The application then requests the date before calling a booking tool. The model’s choice alone should not grant a tool additional permissions.

FROM CONCEPT TO INTERACTION

See the decision pattern for yourself.

Explore four illustrative examples in our independent, local demo.

Try Jev AI

This guide is independent of TypeSafe AI. For current model capabilities and access, see the official documentation.