DOCS

Jev API: from your first decision to an integration

Classify a message into your own labels and read a structured result. Jev API Pro is an independent workspace that accesses TypeSafe’s Jev through OpenRouter, with its own accounts, credits and API keys.

Try a decision ↗WorkspacePricing
POST /api/v1/decisions
curl --fail-with-body --connect-timeout 5 --max-time 35 \
  https://jevapi.pro/api/v1/decisions \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: ticket-123-v1' \
  -d '{
    "text": "I was charged twice this month.",
    "instructions": "Choose the responsible team.",
    "labels": ["billing", "technical", "account"],
    "threshold": 0.85
  }'

Integration example. Replace YOUR_API_KEY with a key stored on your server.

Your application sends a bounded request; Jev returns a typed answer; your policy controls the next action.
Your application sends a bounded request; Jev returns a typed answer; your policy controls the next action.

What is Jev, and when should you use its API?

Jev is a decision model from TypeSafe. Give it the context for a bounded question and inspect a typed answer. In this workspace, a practical first task is assigning a support ticket to billing, technical support or account access. Your application decides what happens after the classification.

TypeSafe calls this a System One model. A general chat model can write an explanation or plan a sequence of tasks; this API is useful when your code needs an explicit category, score or yes/no-style judgment. It does not browse, execute a tool or replace your agent’s planner. Choose based on tests with your own examples, rather than assuming one model is always faster, cheaper or more accurate.

TypeSafe model documentation · What is Jev?

Try a decision before creating an API key

Open the playground, choose a support, lead or feedback example, and edit the message and labels. Viewing the labeled sample is illustrative and does not call a model. Running a live decision is a separate action, subject to the displayed trial limits and service availability.

Check whether the output answers the business question you actually have. Use anonymized examples, include enough context to distinguish the labels, and keep a separate set of examples for evaluation. A convincing single result is not an accuracy benchmark.

Try the Jev playground

Get your Jev API key

Sign in to this workspace, choose a plan with active API access, and create a named key in your dashboard. Copy the secret when it is shown and store it on your server. A key from TypeSafe, OpenRouter or another community website is not a Jev API Pro account key.

Send your key as an Authorization: Bearer header. A website login cookie alone does not authorize the REST endpoint. Keep secrets out of browser JavaScript, public repositories, prompts and Skill files. Revoke an unused or exposed key in the dashboard.

Open your dashboard and API keys · Compare API access plans

Send the quickstart request and read the response

The curl request above calls POST https://jevapi.pro/api/v1/decisions. Replace YOUR_API_KEY with your server-side key. Supply text, instructions, a list of distinct labels and a confidence threshold. Change the Idempotency-Key for each new decision; reuse it only when retrieving or retrying the same unchanged request.

A new successful decision returns HTTP 201. Read choice as the selected label and needsReview as the review flag. Confidence can be null when the provider does not supply it; do not turn a missing value into certainty. Keep id for support and tracing. The full reference describes field limits, multiple questions and response shapes.

Complete request and response reference

Call the Jev API from JavaScript (Node.js)

The same request from a server-side Node.js 18+ script with the built-in fetch. Save it as classify.mjs, set JEV_API_KEY to your account key and JEV_IDEMPOTENCY_KEY to a new 8–100 character value such as a UUID, then run node classify.mjs. An HTTP error stops the script with the error code and message instead of reading a partial answer.

// Node.js 18+ (built-in fetch). Run on your server, never in the browser.
const apiKey = process.env.JEV_API_KEY?.trim();
const requestKey = process.env.JEV_IDEMPOTENCY_KEY?.trim();
if (!apiKey) throw new Error('JEV_API_KEY must not be empty');
if (!requestKey || requestKey.length < 8 || requestKey.length > 100) throw new Error('JEV_IDEMPOTENCY_KEY must be 8-100 characters');

const response = await fetch('https://jevapi.pro/api/v1/decisions', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${apiKey}`,
    'Content-Type': 'application/json',
    'Idempotency-Key': requestKey,
  },
  body: JSON.stringify({
    text: 'I was charged twice this month.',
    instructions: 'Choose the responsible team.',
    labels: ['billing', 'technical', 'account'],
    threshold: 0.85,
  }),
  signal: AbortSignal.timeout(35_000),
});
const answer = await response.json();
if (!response.ok) throw new Error(`${response.status} ${answer.error?.code}: ${answer.error?.message}`);
console.log({ id: answer.id, choice: answer.choice, needsReview: answer.needsReview, confidence: answer.confidence });

Call the Jev API from Python

Install the client with python -m pip install requests, set the same two environment variables, save the example as classify.py and run python classify.py. It stops on HTTP errors before parsing a success response, then prints the decision id, the choice and the review flag.

import json
import os
import requests

api_key = os.environ["JEV_API_KEY"].strip()
request_key = os.environ["JEV_IDEMPOTENCY_KEY"].strip()
if not api_key:
    raise ValueError("JEV_API_KEY must not be empty")
if not 8 <= len(request_key) <= 100:
    raise ValueError("JEV_IDEMPOTENCY_KEY must be 8-100 characters")

payload = {
    "text": "I was charged twice for the same order.",
    "instructions": "Choose the team responsible for this request.",
    "labels": ["Billing", "Support", "Access"],
    "threshold": 0.85,
}
response = requests.post(
    "https://jevapi.pro/api/v1/decisions",
    headers={
        "Authorization": "Bearer " + api_key,
        "Idempotency-Key": request_key,
    },
    json=payload,
    timeout=(5, 30),
)
response.raise_for_status()
answer = response.json()
print(json.dumps({
    "id": answer["id"],
    "choice": answer["choice"],
    "needsReview": answer["needsReview"],
}, ensure_ascii=False, indent=2))

Python text classification guide

Connect Jev through REST or MCP

Keep your agent’s main model and tool permissions in place. At a routing boundary, have your server call the same REST endpoint with a concise task description, explicit instructions and permitted outcomes such as proceed or review. Validate the returned choice against those outcomes before choosing the next step.

If needsReview is true, confidence is absent, or the request fails, pause the automatic action and use your review path. A model prediction never grants permission to issue a refund, send a message or delete data. Enforce those rules in your application. This workspace also provides its own MCP endpoint at https://jevapi.pro/api/mcp and downloadable Skills. Use this workspace’s key and endpoint together; other community server keys are not interchangeable.

{
  "text": "Task: read a public API guide and summarize its supported request fields. No account changes or external messages are requested.",
  "instructions": "Choose review if the task is unclear or could change external state. Otherwise choose proceed. This classification never grants permission to execute a tool.",
  "labels": [
    "proceed",
    "review"
  ],
  "threshold": 0.9
}

MCP · Skills · Human review and decision boundaries

Recover from errors without duplicate work

Do not retry every failure. Fix invalid inputs for a 400 response, check the key and its API access for 401/403, and inspect credits for 402. For 429, respect Retry-After when supplied and cap your retries. A provider outage should reach a visible fallback, not an endless loop.

Replaying a completed request with the same key and payload returns the stored result without a second decision charge. A different payload with that key is rejected with 409. A recorded failed request also returns 409 on replay; after resolving its cause, use a new key for a deliberate new attempt. A timeout with an unknown outcome needs a same-key lookup first.

Error codes and recovery

Jev API pricing and the next step

Jev API Pro sells prepaid access periods with decision credits, rather than the provider’s direct token pricing. Plans include web tools and API access; the current prices, included credits, access duration and checkout terms are on the pricing page. Buying here does not add credit to an OpenRouter or TypeSafe account.

Before paying, confirm that the playground handles your task. Before production, test ambiguous inputs, missing confidence, an expired key and provider failures. Start with suggestions that a person can check, then automate only the decisions your evaluation supports.

Jev API pricing and included credits · API security and data handling

Try a decision ↗

Continue your workflow

Guides

What is Jev AI?

Jev is a structured decision model from TypeSafe, reached through OpenRouter. It evaluates context against questions and returns typed answers with probabilities, rather than composing a conversational response.

Read the guide ↗
DAILY BONUS

2 free credits, every day

Claim 2 free credits each UTC day — 14 across seven claims. No purchase needed. Credits do not expire.

    Resets at 00:00 UTC. No streak required.

    Try a decision →

    Take the next decision into your workspace.

    1 anonymous attempt per day · 20 signup credits · No card for the trial

    Sign in ↗

    Tell us what you need

    Describe the workflow you want to classify, the volume you expect, and the outcome you need. We reply by email.

    10–2,000 characters. Never include passwords, API keys, or payment details.