JEV / DECISION ENGINEERING
Jev API quickstart: make a first request
Use the official state, model, and questions structure to make a first call and inspect its answer.
Get access
Create a key in the official TypeSafe console and keep it in the server-side TYPESAFE_API_KEY environment variable. Never put it in browser JavaScript, screenshots, or share links. Check the console for current access rules.
Request shape
POST a JSON object to the official endpoint. State contains the facts; model names the model; questions maps your question IDs to typed question definitions. The example below uses a synthetic support message.
Inspect the answer
Check the HTTP status and the question ID under answers. Then inspect choice, probabilities, and confidence. Put uncertain items in a human queue. Confidence is not a measured accuracy rate.
Preflight before the first call
Keep the key server side, check the SDK's Python requirement, use a de-identified ticket, and fix stable question IDs and option keys. Timeouts, rate limits, and missing fields need a review path. This site's lab never accepts an API key.
Understand the snippet before copying
State holds the facts for one decision. Model names a version or alias. The team key is the answer ID code will read. Choice criteria keys are actionable option identifiers; descriptions define their boundaries. Stop automatic routing on review or missing fields.
Go beyond one successful response
One call proves connectivity, access, and shape only. Run de-identified, human-labeled tickets through the same questions. Log labels, outputs, request IDs, latency, and action. Recheck regression cases whenever questions or models change.
Example request · HTTP
This is a design draft, not an actual Jev answer or accuracy test.
curl -X POST https://api.typesafe.ai/v1/systemone \
-H "Authorization: Bearer $TYPESAFE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"state":"My parcel says delivered, but nothing arrived.","model":"jev-latest","questions":{"team":{"type":"choice","instructions":"Which team should handle this request?","criteria":{"shipping":"Delivery or missing package","billing":"Payment or charges","other":"None of the above"}}}}'
Python SDK
from typesafe_sdk import Choice, TypeSafeClient
with TypeSafeClient() as client:
response = client.system_one(
state="My parcel says delivered, but nothing arrived.",
questions={
"team": Choice(
instructions="Which team should handle this request?",
criteria={
"shipping": "Delivery or missing package",
"billing": "Payment or charges",
"other": "None of the above",
},
)
},
)
answer = response.answers["team"]
print(answer.choice, answer.confidence)
A runnable Python example
Set TYPESAFE_API_KEY on the server and install the official SDK with pip install typesafe-sdk. This follows the official quickstart shape; verify the current SDK version and access rules before running.
Progress is stored only in this browser