Send state and typed questions to a System One model, such as Jev, and get its typed answers.
POST https://opendunes.com/v1/systemoneBilled, with an API key: Authorization: Bearer $OPENDUNES_API_KEY. The request and answer are the TypeSafe SDKs' shape. It bills like Classifications: the input side only, the case and the questions, in tokens.
A bare model id — jev-1.13, jev-latest — is read as typesafe/jev-1.13, typesafe/jev-latest.
curl https://opendunes.com/v1/systemone \
-H "Authorization: Bearer $OPENDUNES_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "jev-1.13",
"state": {
"ticket": "My checkout page shows a blank screen after I click Pay.",
"customer_tier": "pro"
},
"questions": {
"is_bug": {
"type": "noul",
"instructions": "Is the customer reporting a software defect?",
"criteria": {
"true": "The customer describes broken or unexpected behaviour.",
"false": "The customer is asking a question or requesting a feature."
}
}
}
}'| Field | Description |
|---|---|
model | Required. A System One model, with or without typesafe/ |
state | Required. The case — a string, an object or an array |
questions | Required. One or more, named by you; type is noul, choice or score |
provider | Routing; provider.max_price is in DA |
session_id · user · trace | For your own tracing |
The same shape as Classifications: id, model, provider, one entry in answers per question, and usage with cost in DA. The answer carries X-Generation-Id and X-Balance-Available. A model that is not a System One model on sale is a 404, and nothing is charged.