Designed for developers
One Decisions API integration. Multiple models.
Move from the Decisions API playground to your backend with the same state and question structure. Choose a supported model, create an API key, and use the generated cURL, JavaScript, or Python example. The shared endpoint keeps your integration familiar as you explore different decision models.
Send requests to Decisions API with a server-side Bearer token. Successful responses contain structured answers and usage information. Check the response status, keep the request identifier for troubleshooting, and handle errors explicitly. Your application decides whether the result should route a ticket, request a review, or trigger the next operation.
Decisions API uses one balance for playground, API, and evaluation calls at the same per-model rates. A budget is reserved before each call; successful calls settle actual input usage, and failed calls are refunded. Review the request and model rate before integrating.
POST /v1/systemone
typesafe/jev-1.13 · upstage/solar-decide · jaredpalmer/kev-4b · laya-english · laya-multilingual · laya-auto
// Server-side JavaScript (Node 20+ or Bun). Set JEV_API_KEY.
const response = await fetch("https://decisions-api.org/v1/systemone", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.JEV_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "typesafe/jev-1.13",
"state": "I was charged twice for order A-4471. Please refund the duplicate payment.",
"questions": {
"route": {
"type": "choice",
"instructions": "Which team should handle this ticket? Use other when no option fits.",
"criteria": {
"billing": "Payments, charges and refunds",
"technical": "Bugs and product errors",
"account": "Login and account access",
"other": "None of these teams"
}
}
}
}),
});
const body = await response.json();
if (!response.ok || body.code !== 0) throw new Error(body.message);
console.log(body.data.result.answers);
console.log(body.data.creditsUsed);