Connect your first decision
Keep your model and configuration from the playground. Create a key, copy the code, and check your first call.
1. Choose a model
laya-multilingual2. Create an API key
Create API key →100 welcome credits · one balance for web & API
3. Run from your server
Set DECISION_API_KEY in your server environment. Replace YOUR_API_KEY with your key; keep it out of browser code and version control.
export DECISION_API_KEY="YOUR_API_KEY"
curl --fail-with-body 'https://decisionapi.org/v1/systemone' \
-H "Authorization: Bearer $DECISION_API_KEY" \
-H "Content-Type: application/json" \
--data-raw '{
"model": "laya-multilingual",
"state": "I was charged twice for order A-4471. Please refund the duplicate payment.",
"questions": {
"route": {
"type": "choice",
"instructions": "Which team should handle this ticket? Use other when no option fits.",
"criteria": {
"billing": "Payments, charges and refunds",
"technical": "Bugs and product errors",
"account": "Login and account access",
"other": "None of these teams"
}
}
}
}'