state with typed questions. Keys in answers match the question ids you sent. One request can mix all three types:noul: yes or no. Returns the probability that the answer is yes, from 0 to 1.choice: pick one option you defined, plus the full probability distribution. At most 255 options.score: rate the state on an ordered rubric. The score is probability-weighted and can fall between levels. Use 2 to 10 levels.instructions may be a string, object, or array. An object can hold the question in one field and data it refers to in others. Point at those fields with backticks, for example `potential_duplicate`.Authorization: Bearer sk-.... Content-Type is application/json.Authorization: Bearer ********************model is the version that ran, which can differ from the requested alias. A request for jev-latest may return jev-1.13.0.curl --location 'https://api.key4u.vn/v1/systemone' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "jev-latest",
"questions": {
"department": {
"criteria": {
"billing": "Payments, invoicing, refunds",
"sales": "Pricing, upgrades, new accounts",
"technical": "Bugs, outages, integrations"
},
"instructions": "Which team should handle this?",
"type": "choice"
},
"frustration": {
"criteria": [
"Calm",
"Frustrated",
"Very angry"
],
"instructions": "How frustrated is the customer?",
"type": "score"
},
"is_urgent": {
"criteria": {
"false": "No urgency expressed",
"true": "Explicitly time-sensitive"
},
"instructions": "Does this convey urgency?",
"type": "noul"
}
},
"state": "Help! My payouts have been failing for 3 days."
}'{
"answers": {
"department": {
"choice": "billing",
"confidence": 0.81,
"probabilities": {
"billing": 0.88,
"sales": 0,
"technical": 0.12
},
"type": "choice"
},
"frustration": {
"confidence": 0.92,
"legend": {
"0": "Calm",
"1": "Frustrated",
"2": "Very angry"
},
"probabilities": {
"0": 0,
"1": 0.95,
"2": 0.05
},
"score": 1.05,
"type": "score"
},
"is_urgent": {
"noul": 0.95,
"type": "noul"
}
},
"model": "jev-1.13.0",
"usage": {
"input_tokens": 318,
"output_tokens": 34
}
}