Get started
Quick start
Your first decision in one request.
1. Get a key
Sign in to the console and create a key. It is shown once and starts with launchables_. Keep it in an environment variable:
export LAUNCHABLES_API_TOKEN=launchables_...
2. Ask a question
One request, one yes or no decision:
curl https://api.launchables.ai/v1/decide \
-H "Authorization: Bearer $LAUNCHABLES_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"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?"
}
}
}'
3. 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, 0.04: a refund is very unlikely to be permitted.
4. Ask several questions at once
Name each question; each answer comes back under the same name. Questions about one state are read in parallel.
curl https://api.launchables.ai/v1/decide \
-H "Authorization: Bearer $LAUNCHABLES_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"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.
- Using the probabilities: choosing what to automate.
- Errors and limits: what can go wrong and how big a request can be.
- JavaScript SDK:
npm install launchablesand call the API from Node.