Public demo instance, no API key required. Anyone can use it.
Endpoints
POST /api/decide — decide questions given a context
GET /api/health — service status
Request — POST /api/decide, JSON:
{
"state": "situation text (string or null)",
"questions": {
"question_id": {
"type": "noul | choice | score",
"instructions": "question text",
"criteria": { ... } // depends on type, see below
}
}
}
Question types
- noul — yes/no.
"criteria": {"true": "what counts as yes", "false": "what counts as no"} (optional)
- choice — pick one option.
"criteria": {"label": "description", ...}
- score — level on a scale.
"criteria": ["level 0", "level 1", ...] (lowest to highest)
Example
curl -X POST https://77-113-98-251.sslip.io/api/decide \
-H "Content-Type: application/json" \
-d '{
"state": "A customer asks for a refund for a broken shirt.",
"questions": {
"refund": {"type": "noul", "instructions": "Should we refund?"},
"team": {"type": "choice", "instructions": "Which team handles it?",
"criteria": {"billing": "charges and refunds",
"support": "general questions"}},
"urgency": {"type": "score", "instructions": "How urgent is this?",
"criteria": ["can wait", "today", "now"]}
}
}'
Response — JSON with probabilities per question:
{
"model": "Avelin General Decisions M1",
"answers": {
"refund": {"type": "noul", "noul": 0.92}, // P(yes)
"team": {"type": "choice", "choice": "billing",
"probabilities": {"billing": 0.9, "support": 0.1},
"confidence": 0.9},
"urgency": {"type": "score", "score": 1.8,
"probabilities": {"0": 0.05, "1": 0.3, "2": 0.65},
"legend": {"0": "can wait", "1": "today", "2": "now"},
"confidence": 0.65}
},
"usage": {"input_tokens": 123, "output_tokens": 1},
"timing": { "render_s": 0.1, "forward_s": 2.3, "total_s": 2.4 },
"branches": 3
}
Limits: context + longest question ≤ 8192 tokens; total across all questions ≤ 65536 tokens; request body ≤ 1 MB. Errors: 422 (limit), 400 (bad JSON), 413 (body too large), 503 (busy).