DocsAPI reference
Evaluations
Typed answers about a piece of text, from TypeSafe AI's Jev: a probability, a choice from options you give, or a level on a rubric. For routing, classifying and checking things in code, without parsing prose.
POST/v1/systemone
POST/typesafe/v1/systemonethe same endpoint under TypeSafe's path
curl https://velaron.ai/v1/systemone \
-H "Authorization: Bearer $KREDIT_KEY" \
-H "Content-Type: application/json" \
-d '{ "model": "typesafe-ai/jev",
"state": "I was charged twice for my subscription and want the second charge refunded.",
"questions": {
"refund": { "type": "noul", "instructions": "Is the customer asking for money back?" },
"team": { "type": "choice", "instructions": "Which team should handle this?",
"criteria": { "billing": "Charges and refunds", "technical": "Bugs and outages" } },
"urgency": { "type": "score", "instructions": "How urgent is this?",
"criteria": ["Can wait a few days", "Should be handled today", "The customer is blocked"] } } }'
{ "model": "typesafe-ai/jev",
"answers": {
"refund": { "type": "noul", "noul": 0.98 },
"team": { "type": "choice", "choice": "billing", "confidence": 1, "probabilities": { "billing": 1, "technical": 0 } },
"urgency": { "type": "score", "score": 1.95, "legend": { "0": "Can wait a few days", "1": "Should be handled today", "2": "The customer is blocked" } } },
"usage": { "input_tokens": 368, "output_tokens": 62 } }Request#
- model
An evaluation model (
typesafe-ai/jev). A chat model here answers400 model_not_supported; an evaluation model on/v1/chat/completionsis refused the same way.- state
What the model looks at: a message, a document, a JSON record.
- questions
Named questions, each with a
typeandinstructions.noulanswers with a probability that the statement holds.choiceneedscriteria, an object of option names and descriptions, and answers with one of them plus the probability of each.scoreneedscriteria, an array of rubric levels from lowest to highest, and answers with the expected level (1.95 sits between the second and third) and alegendnaming them. All questions are answered in parallel against the same state.
Response#
TypeSafe's JSON, plus x-vels-credits-charged and x-vels-balance. Billed on the input tokens the gateway reports; the answers cost nothing. There is no streaming, and the balance is checked against an estimate of the input before the call goes out.
With the TypeSafe SDK#
The SDK works unchanged: give it your Velaron.AI key as apiKey and the base URL below, with /typesafe in place of /v1.
https://velaron.ai/v1