Jev API · Jev AI
Jev API
Call the Jev model from your own code. The Jev AI endpoint takes the same JSON as TypeSafe's System One API — a state, a model and a map of typed questions — and returns one typed answer per question.
Your Jev API keys
Sign in to create a key. New accounts include free credits to test the Jev API.
Endpoint
POST https://jev-ai.pro/api/v1/systemone
Authorization: Bearer <JEV_AI_API_KEY>
Content-Type: application/jsonRequest
curl https://jev-ai.pro/api/v1/systemone \
-H "Authorization: Bearer $JEV_AI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"state": "Help! My payouts have been failing for 3 days.",
"model": "jev-latest",
"questions": {
"is_urgent": { "type": "noul", "instructions": "Does this convey urgency?" },
"department": {
"type": "choice",
"instructions": "Which team should handle this?",
"criteria": { "billing": "Payments and refunds", "technical": "Bugs and outages", "sales": "Pricing" }
},
"frustration": {
"type": "score",
"instructions": "How frustrated is the customer?",
"criteria": ["Calm", "Frustrated", "Very angry"]
}
}
}'Response
{
"model": "jev-1.13.0",
"answers": {
"is_urgent": { "type": "noul", "noul": 0.95 },
"department": {
"type": "choice", "choice": "billing", "confidence": 0.98,
"probabilities": { "billing": 0.99, "technical": 0.01, "sales": 0.0 }
},
"frustration": {
"type": "score", "score": 1.04, "confidence": 0.94,
"legend": { "0": "Calm", "1": "Frustrated", "2": "Very angry" },
"probabilities": { "0": 0.0, "1": 0.96, "2": 0.04 }
}
},
"usage": { "input_tokens": 379, "output_tokens": 70 }
}Every answer comes back under the question id you chose. Choice and score answers include probabilities and a confidence between 0 and 1; a noul answer is the probability of yes.
Official SDK
// The official TypeSafe JavaScript SDK works unchanged: point it at Jev AI.
import { TypeSafeClient, choice } from '@typesafe-ai/sdk'
const client = new TypeSafeClient({
apiKey: process.env.JEV_AI_API_KEY,
baseURL: 'https://jev-ai.pro/api',
})
const response = await client.systemOne({
state: { document: 'I was charged twice. Please fix this ASAP.' },
questions: {
category: choice('What is this ticket about?', { billing: null, technical: null, other: null }),
},
})
console.log(response.answers.category.choice) // "billing"Tested with @typesafe-ai/sdk 0.6.0. GET /api/v1/models lists the model names and GET /api/v1/credits returns your balance.
Models, limits and billing
| Models | jev-latest, jev-preview, jev-1.13.0 (aliases currently resolve to jev-1.13.0) |
| Question types | noul (yes/no), choice, score · up to 64 per request |
| Input | Text only: a string, JSON object or array · request body up to 256 KB · model context 64k tokens |
| Price | 1 credit per 1,000,000 input tokens as reported by Jev; output tokens are free. Partial blocks carry over to the next request. |
| Balance | A request needs at least 1 credit. Response headers X-Jev-Credits-Charged and X-Jev-Credits-Remaining show the metering. |
| Rate limit | 300 requests per minute per account; 429 with Retry-After when Jev is busy. |
| Errors | 401 bad key · 402 no credits · 422 invalid request · 429 slow down · 502/504 upstream failure (not billed) |
| Privacy | API requests are not stored: we keep token counts and status for billing, never your state or answers. |
Jev AI is an independent service and is not affiliated with or endorsed by TypeSafe. Jev answers are probabilistic; review important decisions before acting on them.