Quickstart

Create an API key and get your first typed decision back in about two minutes.

1. Create an API key

Sign in with Google, then open Settings → API Keys and create a key. The full key is shown once, right after you create it, and only the masked form is listed afterwards. Copy it at that moment — it is the only time it is displayed.

A new account is credited with 1,000 Jev API credits, valid for 365 days. While you are still on that gifted allowance the public API allows 100 decisions a day. Buying a credit pack lifts the daily cap; after that you are limited only by your balance.

2. Send your first decision

curl https://jevmodel.io/api/v1/decisions \
  -H "Authorization: Bearer sk-your-key-here" \
  -H "Content-Type: application/json" \
  -d '{
    "task": "support_triage",
    "input": "My card was charged twice this month and I need it fixed today.",
    "questions": [
      {
        "key": "urgency",
        "type": "choice",
        "prompt": "How urgent is this issue?",
        "criteria": {
          "low": "Cosmetic question with no deadline",
          "medium": "Needs an answer this week",
          "high": "The customer is blocked or losing money"
        }
      },
      {
        "key": "needs_human",
        "type": "noul",
        "prompt": "Can this be answered without a human agent?"
      }
    ]
  }'

3. Read the response

{
  "code": 0,
  "message": "ok",
  "data": {
    "id": "jev_1761234567890",
    "object": "jev.decision",
    "created": 1761234567,
    "model": "jev-1.14",
    "provider": "TypeSafe",
    "upstream_model": "typesafe/jev-1.14-20261014",
    "result": {
      "decision": "high",
      "confidence": 0.91,
      "reason": "Probabilities: {\"low\":0.01,\"medium\":0.08,\"high\":0.91}",
      "latency_ms": 1840,
      "no_answer_probability": 0.02,
      "answers": {
        "urgency": {
          "type": "choice",
          "choice": "high",
          "confidence": 0.91,
          "probabilities": { "low": 0.01, "medium": 0.08, "high": 0.91 }
        },
        "needs_human": { "type": "noul", "noul": 0.02 }
      },
      "source": "live"
    },
    "usage": {
      "credits": 1,
      "remaining_credits": 999,
      "daily_remaining": 99,
      "input_tokens": 812,
      "output_tokens": 96
    }
  }
}

The answers map is keyed by the key you gave each question, so you can read result.answers.urgency.choice directly. The top-level decision, confidence, and reason summarise the primary answer — a labelled choice or score, if there is one, otherwise the no-answer probability.

Use it from your app

const response = await fetch('https://jevmodel.io/api/v1/decisions', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.JEV_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    task: 'support_triage',
    input: ticket.body,
    questions: [
      {
        key: 'urgency',
        type: 'choice',
        prompt: 'How urgent is this issue?',
        criteria: { low: 'No deadline', high: 'Blocked or losing money' },
      },
    ],
  }),
});

const payload = await response.json();

if (!response.ok) {
  throw new Error(payload.message);
}

const urgency = payload.data.result.answers.urgency.choice;
const remaining = payload.data.usage.remaining_credits;

Credits are only spent on success

A call that fails validation, or that the upstream rejects, never reaches your balance. The credit is consumed after the decision is produced, so a provider outage does not burn your allowance.