Ask a classification model typed questions about a case — yes or no, one of a list, or a place on a scale.
POST https://opendunes.com/alpha/decisionsBilled, with an API key: Authorization: Bearer $OPENDUNES_API_KEY. The route sits under /alpha, not /v1, while the surface is in alpha. It has a request shape of its own; a chat library cannot call it.
The classification models on sale are listed by GET /v1/models?output_modalities=decisions. They bill the input side only: the case and the questions, in tokens.
curl https://opendunes.com/alpha/decisions \
-H "Authorization: Bearer $OPENDUNES_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "typesafe/jev-1.13",
"state": {
"ticket": "Edahabia payment went through. Order still pending since yesterday. Twice.",
"customer_tier": "pro"
},
"questions": {
"is_bug": {
"type": "noul",
"instructions": "Is the customer reporting a defect?",
"criteria": {
"true": "The customer describes broken or unexpected behaviour.",
"false": "The customer is asking a question or requesting a feature."
}
},
"team": {
"type": "choice",
"instructions": "Which team owns this ticket?",
"criteria": {
"payments": "Checkout, billing or payment processing.",
"delivery": "Pickup, transit or hand-over.",
"account": "Login, permissions or profile."
}
},
"urgency": {
"type": "score",
"instructions": "How urgent is this ticket?",
"criteria": [
"Can wait for the next release",
"Should be fixed this week",
"Blocking revenue right now"
]
}
}
}'| Field | Description |
|---|---|
model | Required. A classification model |
state | Required. The case being judged — a string, an object or an array |
questions | Required. One or more, named by you. type is noul (yes or no), choice (one of the criteria) or score (a place on an ordered scale) |
provider | Routing; provider.max_price is in DA |
session_id · user · trace | For your own tracing; never sent to the model |
One answer per question, under the name you gave it:
{
"id": "gen-dec-1758470112-K4mN7pQ2rS5tV8wX1yZ3",
"model": "typesafe/jev-1.13-20260917",
"provider": "TypeSafe",
"answers": {
"is_bug": { "type": "noul", "noul": 0.96 },
"team": {
"type": "choice",
"choice": "payments",
"confidence": 0.75,
"probabilities": { "payments": 0.84, "delivery": 0.16, "account": 0 }
},
"urgency": {
"type": "score",
"score": 1.61,
"confidence": 0.58,
"probabilities": [0.04, 0.31, 0.65],
"legend": [
"Can wait for the next release",
"Should be fixed this week",
"Blocking revenue right now"
]
}
},
"usage": {
"input_tokens": 476,
"output_tokens": 70,
"cost": 0.0067
}
}| Type | Fields |
|---|---|
noul | noul — the probability of yes, 0 to 1 |
choice | choice — the criterion picked; probabilities — one per criterion, summing to 1; confidence |
score | score — the weighted position on your scale; probabilities — one per level, a list in the order of your scale; legend — your scale, in that order; confidence |
usage.cost is the charge in DA; the output tokens are reported and not billed. The answer carries X-Generation-Id and X-Balance-Available. A model that is not a classification model on sale is a 404, and nothing is charged.
The same models also answer at POST /v1/systemone, the route the TypeSafe SDKs call.