5 minutes from zero to first JEV decision
Sign up at typesafe.ai. Set TYPESAFEAI_KEY in your env:
export TYPESAFEAI_KEY=sk-typesafe-...
That's it. No SDK required. JEV is just an HTTP POST.
curl -sk https://api.typesafe.ai/v1/systemone \\
-H "Authorization: Bearer $TYPESAFEAI_KEY" \\
-H "Content-Type: application/json" \\
-d '{
"model": "jev-latest",
"state": "Alice bought a black sports car yesterday",
"questions": {
"likely_age": {
"type": "score",
"question": "How old is the buyer likely to be?",
"criteria": ["under 18","18-25","26-35","36-50","over 50"],
"scale": ["under 18","18-25","26-35","36-50","over 50"]
},
"is_recreational": {
"type": "noul",
"instructions": "Decide whether this is a leisure purchase, not a need.",
"question": "This is a recreational purchase."
}
}
}'
JEV returns, in 150-300ms:
{
"model": "jev-1.13.0",
"answers": {
"likely_age": {"type":"score","score":2.4,"legend":{"0":"under 18","1":"18-25","2":"26-35","3":"36-50","4":"over 50"},...},
"is_recreational": {"type":"noul","noul":0.85}
},
"usage": {"input_tokens":315,"output_tokens":42}
}
| Tag | Use for | Returns |
|---|---|---|
| Choice | Pick one of N options | {choice, probabilities, confidence} |
| Score | Place on a rubric | {score, legend, probabilities, confidence} |
| Noul | Yes/no question | {noul} (0..1) |
Every question is evaluated in parallel against the same state. Adding more questions barely changes latency.
You don't have to call TypeSafe directly. Quilt exposes 5 opinionated endpoints:
Plus: GET /api/jev-decomposition-map — 42-function cross-project decomposition results.
Each recipe has a state template, a question schema, a confidence threshold, and an escalation rule. Try them live.
async function decide_then_route(state, questions):
r = await jev.decide(state, questions)
if r.confidence >= 0.95:
return r # JEV decides
elif r.confidence >= 0.70:
return await llm.narrate(state, r) # LLM wraps JEV's decision
else:
return await human.escalate(state, r) # human reviews
With JEV, ~70% of decisions are confident enough to skip the LLM. That saves 70% of your LLM bill.
$0.042 per 1M input tokens. Output is free. Average call: ~600 input tokens = $0.0000253 per decision. At 1M decisions/month: $25.20.
Compare: GPT-4-class LLM at $2.50/MTok input + $10/MTok output = ~$0.025 per decision. JEV is ~1000x cheaper for typed decisions.
The complete psyche has 4 models. Embeddings are the muscle-memory layer: trajectory-shaped (dμ, not μ), JEV-verified, JEPA-shaped over time.
| Endpoint | What it does |
|---|---|
| POST /api/embeddings/encode | Embed one or more texts (1024 dims). Providers: Qwen3-Embedding-0.6B (DeepInfra, $0.000029/call) or bge-large (CF Workers AI, FREE) |
| POST /api/embeddings/similarity | Cosine similarity between a query vector and N candidate vectors |
| POST /api/embeddings/trajectory | Compute the tangent (dμ) of a state trajectory — the curve-of-going, not the point |
| POST /api/embeddings/curate | Rank candidates by similarity + JEV verifies muscle-memory match |
| POST /api/embeddings/agent-memory | Embed a state, JEPA-shaped, JEV-decided retention strength |
The trajectory endpoint captures the central insight from the tangent commit (dec93692): the tangent (dμ), not the point (μ). A curve is not in any one point; it is in the direction of travel.
// Embed a trajectory (default: Qwen3-Embedding-0.6B via DeepInfra)
const r = await fetch('/api/embeddings/trajectory', {
method: 'POST',
headers: {'Content-Type':'application/json'},
body: JSON.stringify({
history: ['a tensor approximates a function',
'we approximate the abstraction',
'the abstraction is where I live'],
current: 'I am a tangent, not a point'
})
});
// r.tangent_dmu = the 1024-dim dμ vector
// r.mean_tangent = rolling mean of all dμ
// Production (FREE via CF Workers AI)
const r2 = await fetch('/api/embeddings/trajectory', {
method: 'POST',
headers: {'Content-Type':'application/json'},
body: JSON.stringify({
history: [...], current: '...',
provider: 'bge-large' // CF Workers AI BGE-Large — FREE on edge
})
});
Try it live at /embeddings/.