Create a decision task
POST this JSON body to /v1/inferences using your API base URL. Send Authorization: Bearer YOUR_API_KEY, Content-Type: application/json, and a unique Idempotency-Key header. This example asks all three question types about one shared state. The state and questions fields belong inside the input object, not at the request top level. Do not add an extra wrapper.
{
"model": "jev-1-13",
"endpoint": "decisions",
"provider": "seeapi",
"input": {
"state": "The customer asks to change a delivery address.",
"questions": {
"routing": {
"type": "choice",
"instructions": "Which queue should handle this request?",
"criteria": {
"billing": "Questions about charges, invoices, or refunds.",
"delivery": "Questions about delivery, tracking, or address changes."
}
},
"urgency": {
"type": "score",
"instructions": "How urgent is the request?",
"criteria": [
"Can wait",
"Needs attention soon",
"Requires immediate attention"
]
},
"needs_support": {
"type": "noul",
"instructions": "Does the customer need help with an existing order?"
}
}
}
}For structured input, set input.state to a JSON object or array directly. Keep the same question definitions, adjusting instructions and criteria to your data. For example, input.state can be {"message":"Please change my delivery address.","order_status":"not_shipped"}. Send only one state value per request.