Skip to content

TypeSafe Jev

Call the TypeSafe Jev judgment models jev-1.13.0 and jev-1.14.0: group, the POST /v1/systemone request format, the noul / choice / score / box question types, billing, and common errors.

TypeSafe Jev is a judgment model: you give it some content (state) and a set of questions (questions), and it returns a probabilistic judgment for each question, such as "which team should handle this", "how severe is it", or "does it need action today". HopBase serves two models, jev-1.13.0 and jev-1.14.0, with the same API as TypeSafe's official System One: POST https://api.hop-base.com/v1/systemone.

Only input tokens are billed; output is free. One request can ask several questions that all share the same state, which uses fewer tokens than asking them one by one.

Models

Model IDQuestion typesContextNotes
jev-1.14.0noul / choice / score / box64K per request, 32K per question; 262K for both with the long-context headerLatest version, adds image object location (box)
jev-1.13.0noul / choice / scoreSamePrevious version

See the model catalog for official prices. The official aliases jev-latest / jev-preview are not supported yet; use the pinned versions.

Group

When you create or edit a key under API Keys in the console, choose the Jev Official group. Available models: jev-1.13.0, jev-1.14.0. The group is open to all users.

Request format

POST /v1/systemone with Authorization: Bearer sk-your-key and a JSON body. Only the fields below are accepted; any other field returns 400.

ParameterRequiredType & limitsDefaultDescription
modelRequiredjev-1.14.0 / jev-1.13.0—Exact, case-sensitive match
stateRequiredString, object, or array—The content all questions refer to, such as a support conversation
questionsRequiredObject with at least 1 question—Keys are your own question names, values are question objects; answers come back under the same keys
assetsOptionalObject—Images, see Images and box

Question object:

FieldRequiredDescription
typeRequirednoul (yes / no), choice (pick one), score (rating), box (object location, jev-1.14.0 only)
instructionsRequiredThe question or statement to evaluate. The official API makes it optional; on HopBase every question must include it, otherwise the request returns 400
criteriaDepends on typeRequired for choice: an object mapping choice names to descriptions (description may be null), 1–255 choices. Required for score: an array where each item describes a level and its index is the score, 1–10 items. Optional for noul: an object with only the keys true / false, describing what counts as yes and what counts as no. Not accepted for box

Response

{
  "answers": {
    "team": {"type": "choice", "choice": "billing", "confidence": 1, "probabilities": {"billing": 1, "sales": 0, "tech": 0}},
    "severity": {"type": "score", "score": 1, "confidence": 0.86, "legend": {"0": "minor", "1": "moderate", "2": "critical"}, "probabilities": {"0": 0.05, "1": 0.91, "2": 0.04}},
    "urgent": {"type": "noul", "noul": 0.97}
  },
  "id": "gen-...",
  "model": "jev-1.13.0",
  "usage": {"input_tokens": 397, "output_tokens": 68, "cost": 0.000125, "cost_usd": 0.00001839, "currency": "CNY"}
}
  • noul: noul is the probability of "yes" (0–1).
  • choice: choice is the most likely choice; probabilities gives each choice's probability.
  • score: score is the probability-weighted average score (may be fractional); legend maps scores back to your level descriptions.
  • box: box gives the object's top / bottom / left / right, each a relative position from 0 to 1.
  • usage.input_tokens is the billed input token count; output_tokens is not billed. cost is the charge in CNY and cost_usd the same charge in USD.

Images and box

  • Put images in assets as inline base64 in the JSON body: {"type": "image", "format": "png", "data_base64": "<base64>"}, where format is png, jpg, or jpeg. Each assets key is a placeholder; write the placeholder inside a string in state, instructions, or criteria to reference the image.
  • Requests with images or box questions must send the header TypeSafe-Danger-Zone-Images: true, otherwise they return 400.
  • multipart/form-data uploads and the part field are not supported yet; use data_base64 instead.

Long context

Send the header TypeSafe-Danger-Zone-Long-Context: true to raise both the per-request and per-question context limits to 262K at the same price. Both headers accept only the value true.

curl

curl https://api.hop-base.com/v1/systemone \
  -H "Authorization: Bearer sk-your-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "jev-1.14.0",
    "state": "Customer: I was charged twice for my subscription this month and I need a refund today.",
    "questions": {
      "team": {"type": "choice", "instructions": "Which team should handle this ticket?", "criteria": {"billing": "payments, refunds, invoices", "tech": "bugs and outages", "sales": "new purchases"}},
      "severity": {"type": "score", "instructions": "How severe is the issue?", "criteria": ["minor", "moderate", "critical"]},
      "urgent": {"type": "noul", "instructions": "Does the customer need action today?"}
    }
  }'

Python

import requests

resp = requests.post(
    "https://api.hop-base.com/v1/systemone",
    headers={"Authorization": "Bearer sk-your-key"},
    json={
        "model": "jev-1.14.0",
        "state": "Customer: I was charged twice for my subscription this month and I need a refund today.",
        "questions": {
            "urgent": {"type": "noul", "instructions": "Does the customer need action today?"},
        },
    },
    timeout=120,
)
resp.raise_for_status()
data = resp.json()
print(data["answers"]["urgent"]["noul"], data["usage"])

FAQ

  • 400 questions.<name>.instructions is required: every question needs instructions; put the question to evaluate there.
  • 400 unsupported field: the body has a field the official API does not define (such as temperature); remove it. The error lists the allowed fields.
  • 404 for jev-latest / jev-preview: aliases are not supported yet; use jev-1.14.0 or jev-1.13.0.
  • 400 on a box question: box works only with jev-1.14.0, and needs an image asset and the header TypeSafe-Danger-Zone-Images: true.
  • Error body format: errors carry both the official detail field and the common error.message field, so either kind of client can read them.
  • 429: too many requests; retry later. Contact us if you need higher concurrency.

Next steps