Jev Examples & Tips
Practical examples, tips, and recommendations for building structured decision workflows with Jev.
Jev is a System One decision model. It evaluates a state against one or more typed questions and returns structured answers that your application can use directly.
Use Jev for focused decisions such as classification, routing, scoring, and yes-or-no checks. It is not a chat, code-generation, or general text-generation model.
For the endpoint, authentication, headers, and complete request schema, see the System One API reference.
Choose a question type
Choose the type whose result maps most directly to your application logic.
| Type | Use it when | Returns |
|---|---|---|
choice |
The answer must be one option from a fixed set | The selected option, probabilities, and confidence |
score |
The answer belongs on an ordered scale | A score, probabilities, a legend, and confidence |
noul |
You need the probability that a statement is true | A value from 0 to 1 |
Choice
Use choice for routing and classification. Describe each option clearly, and include an other or none_of_the_above option when your list may not cover every input.
{
"department": {
"type": "choice",
"instructions": "Which team should handle the customer message?",
"criteria": {
"billing": "Payments, invoices, refunds, or subscriptions",
"technical": "Bugs, outages, or integration problems",
"sales": "Pricing, upgrades, or new accounts",
"other": "The request does not fit another option"
}
}
}Score
Use score for an ordered spectrum. Write distinct descriptions for every level instead of relying on labels such as "low," "medium," and "high" alone.
{
"frustration": {
"type": "score",
"instructions": "How frustrated does the customer appear?",
"criteria": [
"Calm and matter-of-fact",
"Concerned or frustrated but civil",
"Very angry or threatening to leave"
]
}
}Noul
Use noul for a precise yes-or-no judgment. The returned noul value is the probability that the statement is true: values near 1 indicate yes, values near 0 indicate no, and values near 0.5 indicate uncertainty.
{
"is_urgent": {
"type": "noul",
"instructions": "Does the customer message express urgency or time sensitivity?",
"criteria": {
"true": "The message explicitly describes urgency or immediate impact",
"false": "The message does not indicate urgency"
}
}
}Complete example
Ask independent questions about the same state in one request. Jev evaluates them in parallel, and each answer is returned under the question ID you supplied.
curl -X POST 'https://enterprise.blackbox.ai/typesafe/v1/systemone' \
-H "Authorization: Bearer ${BLACKBOX_API_KEY}" \
-H 'Content-Type: application/json' \
-d '{
"state": {
"customer_message": "Our payment integration has returned errors for 20 minutes, and we cannot process orders. Please help immediately.",
"account": {
"plan": "enterprise"
}
},
"model": "jev-latest",
"questions": {
"department": {
"type": "choice",
"instructions": "Which team should handle `customer_message`?",
"criteria": {
"billing": "Payments, invoices, refunds, or subscriptions",
"technical": "Bugs, outages, or integration problems",
"sales": "Pricing, upgrades, or new accounts",
"other": "The request does not fit another option"
}
},
"frustration": {
"type": "score",
"instructions": "How frustrated does the customer appear in `customer_message`?",
"criteria": [
"Calm and matter-of-fact",
"Concerned or frustrated but civil",
"Very angry or threatening to leave"
]
},
"is_urgent": {
"type": "noul",
"instructions": "Does `customer_message` express urgency or immediate business impact?",
"criteria": {
"true": "The message describes urgency or immediate business impact",
"false": "The message does not require immediate action"
}
}
}
}'import os
import requests
response = requests.post(
"https://enterprise.blackbox.ai/typesafe/v1/systemone",
headers={
"Authorization": f"Bearer {os.environ['BLACKBOX_API_KEY']}",
"Content-Type": "application/json",
},
json={
"state": {
"customer_message": "Our payment integration has returned errors for 20 minutes, and we cannot process orders. Please help immediately.",
"account": {"plan": "enterprise"},
},
"model": "jev-latest",
"questions": {
"department": {
"type": "choice",
"instructions": "Which team should handle `customer_message`?",
"criteria": {
"billing": "Payments, invoices, refunds, or subscriptions",
"technical": "Bugs, outages, or integration problems",
"sales": "Pricing, upgrades, or new accounts",
"other": "The request does not fit another option",
},
},
"frustration": {
"type": "score",
"instructions": "How frustrated does the customer appear in `customer_message`?",
"criteria": [
"Calm and matter-of-fact",
"Concerned or frustrated but civil",
"Very angry or threatening to leave",
],
},
"is_urgent": {
"type": "noul",
"instructions": "Does `customer_message` express urgency or immediate business impact?",
"criteria": {
"true": "The message describes urgency or immediate business impact",
"false": "The message does not require immediate action",
},
},
},
},
timeout=30,
)
response.raise_for_status()
print(response.json())const response = await fetch(
"https://enterprise.blackbox.ai/typesafe/v1/systemone",
{
method: "POST",
headers: {
Authorization: `Bearer ${process.env.BLACKBOX_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
state: {
customer_message:
"Our payment integration has returned errors for 20 minutes, and we cannot process orders. Please help immediately.",
account: { plan: "enterprise" },
},
model: "jev-latest",
questions: {
department: {
type: "choice",
instructions: "Which team should handle `customer_message`?",
criteria: {
billing: "Payments, invoices, refunds, or subscriptions",
technical: "Bugs, outages, or integration problems",
sales: "Pricing, upgrades, or new accounts",
other: "The request does not fit another option",
},
},
frustration: {
type: "score",
instructions:
"How frustrated does the customer appear in `customer_message`?",
criteria: [
"Calm and matter-of-fact",
"Concerned or frustrated but civil",
"Very angry or threatening to leave",
],
},
is_urgent: {
type: "noul",
instructions:
"Does `customer_message` express urgency or immediate business impact?",
criteria: {
true: "The message describes urgency or immediate business impact",
false: "The message does not require immediate action",
},
},
},
}),
},
);
if (!response.ok) {
throw new Error(`System One request failed: ${response.status}`);
}
console.log(await response.json());An example response has one typed answer for each question:
{
"model": "jev-1.13.0",
"answers": {
"department": {
"type": "choice",
"choice": "technical",
"probabilities": {
"billing": 0.08,
"technical": 0.88,
"sales": 0.01,
"other": 0.03
},
"confidence": 0.84
},
"frustration": {
"type": "score",
"score": 1.1,
"legend": {
"0": "Calm and matter-of-fact",
"1": "Concerned or frustrated but civil",
"2": "Very angry or threatening to leave"
},
"probabilities": {
"0": 0.02,
"1": 0.86,
"2": 0.12
},
"confidence": 0.79
},
"is_urgent": {
"type": "noul",
"noul": 0.97
}
},
"usage": {
"input_tokens": 418,
"output_tokens": 72
}
}Response values above are illustrative. Validate behavior and thresholds using examples from your own application.
Image handling
Jev accepts one or several images in the same System One request. Use images for focused decisions such as identifying an application in a screenshot, comparing product photos, or checking whether an object is present.
Image support is experimental. TypeSafe describes it as “Dreamer-ready”; formats, limits, and accuracy may change between releases. Evaluate it with representative images before relying on its answers.
Request format
Send images as base64 in an application/json request to the BLACKBOX endpoint, with the TypeSafe-Danger-Zone-Images: true header. Multipart uploads are not currently supported by this endpoint.
List each image once in the top-level assets map, keyed by a unique reference such as a UUID. Put that reference in state wherever the image belongs. Every asset must be referenced in state, a question's instructions, or its criteria.
| Asset field | Value |
|---|---|
type |
"image" |
format |
"png", "jpg", or "jpeg", in lowercase |
data_base64 |
Standard base64 with padding, no whitespace, and no data: prefix |
References are replaced inside string values, including longer sentences. Use a fresh UUID for each asset so the reference cannot accidentally match other text. When several questions use an image, put its reference in state once and refer to the field by path, such as screenshots[0], in the questions.
Send one or multiple images
The examples below accept one image or a list of images. Prepare the files within the limits below before running them. Set BLACKBOX_API_KEY to your BLACKBOX API key.
# Add more filenames after screenshot.png to send multiple images.
python3 - screenshot.png > image-request.json <<'PY'
import base64
import json
import sys
import uuid
from pathlib import Path
assets = {}
screenshots = []
for filename in sys.argv[1:]:
path = Path(filename)
ref = str(uuid.uuid4())
assets[ref] = {
"type": "image",
"format": path.suffix.lower().lstrip("."),
"data_base64": base64.b64encode(path.read_bytes()).decode("ascii"),
}
screenshots.append(ref)
print(json.dumps({
"model": "typesafe/jev",
"state": {"screenshots": screenshots},
"assets": assets,
"questions": {
"application": {
"type": "choice",
"instructions": "Which application is in the foreground in `screenshots[0]`?",
"criteria": {
"finder": "macOS Finder file manager",
"browser": "A web browser",
"terminal": "A terminal or command-line application",
"other": "Another application or no recognizable application",
},
},
},
}))
PY
curl -X POST 'https://enterprise.blackbox.ai/typesafe/v1/systemone' \
-H "Authorization: Bearer ${BLACKBOX_API_KEY}" \
-H 'Content-Type: application/json' \
-H 'TypeSafe-Danger-Zone-Images: true' \
--data-binary @image-request.jsonimport base64
import os
import uuid
from pathlib import Path
import requests
# Use ["screenshot.png"] for one image.
paths = ["screenshot-before.png", "screenshot-after.png"]
assets = {}
screenshots = []
for filename in paths:
path = Path(filename)
ref = str(uuid.uuid4())
assets[ref] = {
"type": "image",
"format": path.suffix.lower().lstrip("."),
"data_base64": base64.b64encode(path.read_bytes()).decode("ascii"),
}
screenshots.append(ref)
response = requests.post(
"https://enterprise.blackbox.ai/typesafe/v1/systemone",
headers={
"Authorization": f"Bearer {os.environ['BLACKBOX_API_KEY']}",
"Content-Type": "application/json",
"TypeSafe-Danger-Zone-Images": "true",
},
json={
"model": "typesafe/jev",
"state": {"screenshots": screenshots},
"assets": assets,
"questions": {
f"finder_{index}": {
"type": "noul",
"instructions": f"Is macOS Finder in the foreground in `screenshots[{index}]`?",
}
for index in range(len(screenshots))
},
},
timeout=120,
)
response.raise_for_status()
print(response.json()["answers"])Each image can have its own question, or one question can compare several images by their paths. Answers use the same typed choice, score, and noul response formats as text requests.
How many images can I send?
TypeSafe does not publish a fixed maximum image count. The number that fits depends on image resolution, encoded size, repeated references, the text and questions, and the selected model's context limits.
Multiple-image requests have been verified through the BLACKBOX endpoint, including a batch of 64 copies of a screenshot resized to 800 × 517 pixels, each with its own asset reference. This confirms batch acceptance; 64 is an observed successful batch, not a guaranteed maximum or an accuracy benchmark for different images. Larger images can reach the limits with fewer files.
The TypeSafe image documentation specifies these limits:
| Limit | Value |
|---|---|
| Formats | Still PNG or JPEG; animated PNG is rejected |
| Width and height | Each side must be between 280 and 1568 pixels |
| Decoded file size | Up to 16 MiB per image |
| Entire request body | Up to 32 MiB, including JSON and base64 text |
| All processed images combined | Up to 32 MiB after the API re-encodes them |
| Expanded request | Up to 32 MiB after each reference is replaced by its image |
| Model context | Images, text, and questions share the model's token limits |
Base64 makes a file about a third larger. Each occurrence of an asset reference adds another copy of the image to the expanded request, even though you only upload the asset once. Keep shared images in state, send only the images needed for the decision, and split large batches across requests.
Prepare images and handle errors
Resize before uploading: the API rejects out-of-range images instead of resizing them. Keep both dimensions within the allowed range; pad images with a side below 280 pixels. Rotate the actual pixels upright, since EXIF orientation is not applied. Convert formats such as WebP, HEIC, or GIF to still PNG or JPEG.
For example, on macOS, this creates a resized copy with its longest side at most 1568 pixels:
sips -Z 1568 screenshot.png --out screenshot-ready.pngCheck that the shorter side is still at least 280 pixels. For narrow screenshots, padding or cropping may be necessary.
| Status | What to check |
|---|---|
400 |
Missing image header, invalid base64 or format, unreferenced assets, damaged images, or dimensions below the minimum |
400 with max_tokens_exceeded |
Reduce the images, resolution, or text to fit the model context |
413 |
An image or the request exceeds a size or dimension limit |
If any image is rejected, the whole request fails. Image tokens are included in usage.input_tokens and billed at the model's input-token rate.
Recommendations
Ask atomic questions
Each question should ask for one focused judgment that a knowledgeable person could make quickly from the supplied state.
Avoid a broad question such as:
Analyze this support request and decide what we should do.Instead, ask separate questions about the request type, urgency, frustration, policy eligibility, or risk. Combine those answers with application logic.
Keep code in control
Use Jev where semantic judgment is necessary. Keep deterministic work, arithmetic, database operations, side effects, and control flow in code.
const topic = result.answers.department;
const urgent = result.answers.is_urgent.noul >= 0.8;
if (topic.confidence < 0.7) {
await sendToHumanReview(ticket);
} else {
await routeToTeam(topic.choice, { urgent });
}Send only relevant state
Large amounts of unrelated context can reduce accuracy. Filter records first and send only the text and structured fields required to answer the questions.
Prefer descriptive JSON fields over one long string when the decision depends on several related values:
{
"state": {
"ticket_message": "I was charged twice for order A-104.",
"charges": [
{ "order_id": "A-104", "amount": 49, "status": "captured" },
{ "order_id": "A-104", "amount": 49, "status": "captured" }
],
"refund_policy": "Duplicate captured charges are eligible for a refund."
}
}Reference the relevant paths explicitly in the question, such as ticket_message, charges, and refund_policy.
Batch independent questions
Questions that use the same state are evaluated independently and in parallel. Put them in one request instead of making one request per question. Use another request only when a later question genuinely depends on an earlier answer or on data fetched because of that answer.
Write explicit criteria
Define what every Choice option or Score level means. Add examples and boundary conditions when categories overlap. Keep instructions and criteria consistent, and avoid double negatives or implied rules.
Route uncertainty
Do not treat every result as equally certain. Use Choice and Score confidence, or the distance of a Noul value from 0.5, to decide whether to act automatically, request confirmation, or escalate.
Start with conservative thresholds, evaluate them against representative data, and use stricter thresholds for actions that are expensive, destructive, or difficult to reverse.
Pin a model for stable behavior
jev-latest follows the latest stable Jev release. If your application is calibrated against specific answers or confidence thresholds, use a supported versioned model ID and evaluate a newer version before switching.
What to avoid
| Avoid | Recommended approach |
|---|---|
| Asking Jev to generate prose, code, or chat responses | Use a generative model and use Jev for bounded decisions |
| Asking one question that contains several judgments | Split it into atomic questions and combine answers in code |
| Using Jev for counting, arithmetic, or exact comparisons | Calculate deterministic values in code |
| Asking Jev to compare or calculate dates | Extract relevant date parts, then compare them in code |
| Sending an entire document store or application state | Retrieve and filter relevant context first |
| Using vague or contradictory criteria | Define explicit, mutually understandable options and boundaries |
| Assuming the first Choice result is always reliable | Test representative inputs and verify that option ordering does not change results |
| Automatically acting on uncertain answers | Add confidence thresholds and a review or fallback path |
Treat untrusted content in state as potentially adversarial. Use precise questions and criteria, test prompt-injection-style inputs, and keep sensitive side effects behind deterministic checks.
Common use cases
Jev works well as a decision layer for:
- Intent classification and request routing
- Support ticket triage
- Content moderation and application guardrails
- Document and retrieval-result scoring
- Policy or citation checks
- Risk, urgency, quality, and relevance assessment
- Selecting among predefined tools or handlers