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 ID | Question types | Context | Notes |
|---|---|---|---|
jev-1.14.0 | noul / choice / score / box | 64K per request, 32K per question; 262K for both with the long-context header | Latest version, adds image object location (box) |
jev-1.13.0 | noul / choice / score | Same | Previous 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.
| Parameter | Required | Type & limits | Default | Description |
|---|---|---|---|---|
model | Required | jev-1.14.0 / jev-1.13.0 | — | Exact, case-sensitive match |
state | Required | String, object, or array | — | The content all questions refer to, such as a support conversation |
questions | Required | Object with at least 1 question | — | Keys are your own question names, values are question objects; answers come back under the same keys |
assets | Optional | Object | — | Images, see Images and box |
Question object:
| Field | Required | Description |
|---|---|---|
type | Required | noul (yes / no), choice (pick one), score (rating), box (object location, jev-1.14.0 only) |
instructions | Required | The question or statement to evaluate. The official API makes it optional; on HopBase every question must include it, otherwise the request returns 400 |
criteria | Depends on type | Required 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:noulis the probability of "yes" (0–1).choice:choiceis the most likely choice;probabilitiesgives each choice's probability.score:scoreis the probability-weighted average score (may be fractional);legendmaps scores back to your level descriptions.box:boxgives the object'stop/bottom/left/right, each a relative position from 0 to 1.usage.input_tokensis the billed input token count;output_tokensis not billed.costis the charge in CNY andcost_usdthe same charge in USD.
Images and box
- Put images in
assetsas inline base64 in the JSON body:{"type": "image", "format": "png", "data_base64": "<base64>"}, whereformatispng,jpg, orjpeg. Eachassetskey is a placeholder; write the placeholder inside a string instate,instructions, orcriteriato reference the image. - Requests with images or box questions must send the header
TypeSafe-Danger-Zone-Images: true, otherwise they return 400. multipart/form-datauploads and thepartfield are not supported yet; usedata_base64instead.
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 needsinstructions; put the question to evaluate there. - 400
unsupported field: the body has a field the official API does not define (such astemperature); remove it. The error lists the allowed fields. - 404 for
jev-latest/jev-preview: aliases are not supported yet; usejev-1.14.0orjev-1.13.0. - 400 on a box question: box works only with
jev-1.14.0, and needs an image asset and the headerTypeSafe-Danger-Zone-Images: true. - Error body format: errors carry both the official
detailfield and the commonerror.messagefield, so either kind of client can read them. - 429: too many requests; retry later. Contact us if you need higher concurrency.