API reference · TypeSafe
typesafe/jev-1.14
Integrate this model through SandBase's unified API, with production-ready schemas and examples.
Production endpoint
Send your first request
OpenAI-compatible endpoint with unified authentication and usage tracking.
POST
https://api.sandbase.ai/v1/decisionsModel ID
typesafe/jev-1.1401
Input Schema
2 parameters · 2 required · 0 optional
| Parameter | Type | Required | Description |
|---|---|---|---|
state | any | Required | State passed to the System One model. The upstream accepts the native TypeSafe state shape. |
questions | object | Required | Typed questions evaluated against state. |
02
Output Schema
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for this request |
model | string | Model used for the request |
answers | object | One answer per question id (keys match your questions) |
answers[].type | string | Answer type: choice, score, or noul |
answers[].choice | string | choice: the selected option key |
answers[].score | number | score: probability-weighted mean of level indices (a decimal) |
answers[].noul | number | noul: probability of "yes" (0.0-1.0) |
answers[].probabilities | object | choice/score: probability per option or level index |
answers[].confidence | number | choice/score: how peaked the distribution is (0-1); absent for noul |
answers[].legend | object | score: maps level index to your label |
usage.input_tokens | integer | Tokens in the input |
usage.output_tokens | integer | Tokens in the output |
03
Code Examples
Ready-to-run snippets
const apiKey = process.env.SANDBASE_API_KEY;
const response = await fetch("https://api.sandbase.ai/v1/decisions", {
method: "POST",
headers: {
Authorization: `Bearer ${apiKey}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "typesafe/jev-1.14",
"state": {
"ticket": "I was charged twice and would like a refund."
},
"questions": {
"refund_requested": {
"type": "noul",
"instructions": "Does the ticket explicitly request a refund?"
}
}
}),
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.json());