Decisions
Create a decision
Changed onEvaluate named questions against a shared state with Mercury Decide. Supports binary probability (noul), categorical choice, and ordinal score questions. Returns answers and token usage. Streaming is not supported.
Images: put chat-style parts such as {"type": "image_url", "image_url": {"url": "data:image/png;base64,..."}} anywhere in state or a question's instructions (not in criteria). Images must be base64 PNG, JPEG, WebP, or GIF data URLs (remote URLs are not supported), at most 10 MiB each and 16 per upstream request. The complete JSON request, including base64 encoding, is also subject to the gateway's whole-request body limit (20 MiB by default).
post/v1/decisions
Request
- Base URLhttps://api.inceptionlabs.ai
- URLhttps://api.inceptionlabs.ai/v1/decisions
- AuthHTTP bearer
Request body
Example request
{
"model": "mercury-decide",
"state": {
"message": "Please refund the duplicate charge on my account."
},
"questions": {
"billing": {
"type": "noul",
"instructions": "Is this request about billing?"
},
"team": {
"type": "choice",
"criteria": {
"billing": "Payments, charges, and refunds",
"support": "Technical support and other requests"
}
},
"urgency": {
"type": "score",
"instructions": "How urgent is this request?",
"criteria": [
"Can wait",
"Needs attention soon",
"Needs immediate attention"
]
}
}
}Response
Successful Response
Example response
{
"model": "mercury-decide",
"answers": {
"billing": {
"type": "noul",
"noul": 0.97
},
"team": {
"type": "choice",
"choice": "billing",
"probabilities": {
"billing": 0.96,
"support": 0.04
},
"confidence": 0.96
},
"urgency": {
"type": "score",
"score": 1.1,
"legend": {
"0": "Can wait",
"1": "Needs attention soon",
"2": "Needs immediate attention"
},
"probabilities": {
"0": 0.1,
"1": 0.7,
"2": 0.2
},
"confidence": 0.7
}
},
"usage": {
"input_tokens": 120,
"output_tokens": 3
}
}Changes
- info
endpoint added
- info