DEVELOPER GUIDE
Build your first decision
A practical guide to this service: run, inspect, integrate, measure.
Jev is provided by TypeSafe AI. This is an independent workbench and API service. A bounded output can still be wrong: validate on your own data.
Quickstart
Sign in and run a recipe for free. Tune its questions, save a configuration, then open the Code tab. Create a site API key and add credits before using the code on your server.
export JEV_API_KEY="YOUR_API_KEY"
curl --fail-with-body 'https://jevaimodel.net/v1/systemone' \
-H "Authorization: Bearer $JEV_API_KEY" \
-H "Content-Type: application/json" \
--data-raw '{
"model": "typesafe/jev-1.13",
"state": "I was charged twice for order A-4471. Please refund the duplicate payment.",
"questions": {
"route": {
"type": "choice",
"instructions": "Which team should handle this ticket? Use other when no option fits.",
"criteria": {
"billing": "Payments, charges and refunds",
"technical": "Bugs and product errors",
"account": "Login and account access",
"other": "None of these teams"
}
}
}
}'Keep API keys on your server. Do not embed them in browser code or commit them to source control.
API reference
POST https://jevaimodel.net/v1/systemone
Send JSON with model, state and questions. Use Authorization: Bearer with a key from this site. Successful responses use code: 0; answers live at data.result.answers. Official provider SDK response shapes differ.
| Field | Shape |
|---|---|
| model | Use typesafe/jev-1.13. The jev-latest alias resolves to this model. |
| state | Non-empty text, a JSON object or array. Shared by all questions. |
| questions | 1–8 named questions. IDs start with a letter, followed by letters, digits, _ or -; maximum 64 characters. |
choice
Define 2–255 named options in criteria. The answer includes choice, probabilities and confidence. Add an explicit fallback option for cases that do not fit.
score
Define 2–10 ordered strings in criteria. The score ranges from 0 to the last index and may be fractional; probabilities describe the levels.
noul
A yes/no question returns noul: P(yes), from 0 to 1. Optional yes and no descriptions clarify the criteria. It does not return a separate confidence field.
Probabilities are model outputs over your answer space. Confidence is a separate signal. Neither is a measured accuracy rate. For Noul, the threshold uses max(P(yes), 1 − P(yes)); 0.01 can be a decisive no. Validate thresholds against labeled cases in Compare rules.
Illustrative response — not a live measurement
{
"code": 0,
"message": "ok",
"data": {
"requestId": "example-request-id",
"creditsUsed": 1,
"historySaved": true,
"result": {
"model": "typesafe/jev-1.13",
"answers": {
"route": {
"type": "choice",
"choice": "billing",
"probabilities": {
"billing": 0.94,
"technical": 0.02,
"account": 0.02,
"other": 0.02
},
"confidence": 0.9
}
},
"usage": {
"input_tokens": 1000,
"output_tokens": 0
},
"elapsedMs": 250
}
}
}Latency measures this service’s server processing time, including the provider round trip. It excludes the browser network trip and is not a performance guarantee.
Billing & limits
This service accepts text or JSON, up to 8 questions and 32 KiB for the entire request. Web runs are limited to one attempt every 3 seconds. API credits = max(1, ceil(input tokens × 420 / 1,000,000)). Output is free. API requests need a positive balance; final usage must fit the remaining balance.
400 invalid input · 401 sign-in/key required · 402 insufficient credits · 413 request too large · 429 wait for Retry-After · 502 provider failure · 503 service unavailable. Inspect request history before retrying an uncertain network outcome.
Minimum 1 credit per successful API request. Output tokens are free. Failed provider calls are not billed. Estimates exclude taxes; actual charges use reported tokens. Pack purchase amounts are separate.
Data & history
Saved configurations and web request bodies/results are private to your account. API history retains metadata, token usage and credits, not request content. Browser drafts are local to this browser.
Recipes
Support routing
Route billing, technical, and account requests; keep an explicit fallback.
Open recipe ↗Agent routing
Choose a deterministic lookup, a model, or human review.
Open recipe ↗Citation verification
Check a claim against its source, including missing and conflicting evidence.
Open recipe ↗Test the same cases against two rule sets
Capture A from the current workbench rules. Return to Workbench, edit the questions, then capture B. Import up to 25 labeled cases and compare both versions. The dataset state replaces each captured state.
{"id":"refund","state":"Please refund my duplicate payment.","expected":{"route":"billing"}}
{"id":"login","state":"My reset link has expired.","expected":{"route":"account"}}1–25 cases. JSONL: one {id, state, expected} per line. CSV: id,state,expected; expected is a JSON object keyed by question ID. Match rate uses labeled answers from completed requests; errors are counted separately. Noul labels are true/false (P(yes) ≥ 0.5). Score uses the tolerance set before the run.