# Quick start

> Your first call to the Launchables Decision API: one request with a state and a question, and a calibrated probability for every option back.

Section: Get started. Web page: https://www.launchables.ai/docs/quickstart

## 1. Get a key

Sign in to the [console](https://console.launchables.ai) and create a key. It is shown once and starts with `launchables_`. Keep it in an environment variable:

```bash
export LAUNCHABLES_API_TOKEN=launchables_...
```

## 2. Ask a question

One request, one yes or no decision:

```bash
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

```json
{
  "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.

```bash
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](https://www.launchables.ai/docs/question-types): what each type returns.
- [Using the probabilities](https://www.launchables.ai/docs/thresholds): choosing what to automate.
- [Errors and limits](https://www.launchables.ai/docs/api/errors): what can go wrong and how big a request can be.
- [JavaScript SDK](https://www.launchables.ai/docs/sdk-javascript): `npm install launchables` and call the API from Node.
