Quick start
Get a key in the console and make your first decision with one request to the hosted Decision API.
Get a key
Sign in to the console and create a key. It is shown once and starts with mellix_. Keep it in an environment variable:
export MELLIX_API_TOKEN=mellix_...Ask a question
One request, one yes or no decision:
curl https://api.mellix.com/v1/decide \
-H "Authorization: Bearer $MELLIX_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"model": "myles-g-12b",
"state": "Customer bought the item 12 days ago and has no receipt. Policy: refunds within 30 days with proof of purchase.",
"questions": {
"refund": {
"type": "noul",
"instructions": "Is a refund permitted under the policy?"
}
}
}'Read the answer
{
"model": "myles-g-12b",
"answers": {
"refund": { "type": "noul", "noul": 0.04 }
},
"usage": { "input_tokens": 96, "output_tokens": 1 }
}noul is the probability that the answer is yes. Here it is 0.04, so a refund is very unlikely to be permitted.
Ask several questions at once
Name each question and each answer comes back under the same name. Questions about one state are read in parallel.
curl https://api.mellix.com/v1/decide \
-H "Authorization: Bearer $MELLIX_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"model": "myles-g-12b",
"state": {"from": "J. Smith", "message": "Charged twice for order 4471, need the extra payment back"},
"questions": {
"route": {"type": "choice", "instructions": "Which team?", "criteria": ["billing", "returns", "technical", "other"]},
"refund": {"type": "noul", "instructions": "Is the customer asking for money back?"},
"priority": {"type": "score", "instructions": "How urgent?", "criteria": ["Routine", "This week", "Today"]}
}
}'Next steps
- Question types: what each type returns.
- Thresholds: choosing what to automate.
- Errors: what can go wrong and how big a request can be.
- Python SDK:
pip install mellixand call the API from Python. - JavaScript SDK:
npm install mellixand call the API from Node. - MCP: give your agents decisions as a tool with
npx -y mellix-mcp@0.1.0.

