# Inola Decider

> What Inola Decider does, the yes/no, choice and scale questions it answers, and how to call it with curl, Python or JavaScript.

Inola Decider answers your questions about a document by choosing among the options you give and returning a
probability for each of them. The model name in the API is `decider-mini` (also `decider`); the current version is
`1.3.0`.

## What it does

- Takes one document (the state) and several questions about it in one request.
- Answers three kinds of questions:

| type | question | answer |
|---|---|---|
| `noul` | yes or no | `noul`: the probability of yes |
| `choice` | one of the options you list | `choice`: the most likely option, and `probabilities` for each option |
| `score` | a level on a scale you describe | `score`: the expected level |

- Bills the tokens of the document and of the text of your questions, each once: see
  [Tokens and billing](https://inola.ai/docs/concepts/tokens-and-billing.md#inola-decider).

## Run it

You need an [API key](https://inola.ai/docs/reference/glossary.md#api-key) with the `inference` permission in the `INOLA_API_KEY`
environment variable. Create one in the console, [https://console.inola.ai](https://console.inola.ai).

### curl

```bash
curl -sS "https://api.inola.ai/v1/infer" \
  -H "Authorization: Bearer $INOLA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "decider-mini", "input": {"state": "I was charged twice. Please fix this ASAP.", "questions": {"billing": {"type": "noul", "instructions": "Is this ticket about billing?"}, "category": {"type": "choice", "instructions": "What is this ticket about?", "criteria": {"billing": "payments and invoices", "technical": "the product does not work", "other": "anything else"}}}}}'
```

### Python

```python
import os

import requests

response = requests.post(
    "https://api.inola.ai/v1/infer",
    headers={"Authorization": f"Bearer {os.environ['INOLA_API_KEY']}"},
    json={
        "model": "decider-mini",
        "input": {
            "state": "I was charged twice. Please fix this ASAP.",
            "questions": {
                "billing": {"type": "noul", "instructions": "Is this ticket about billing?"},
                "category": {"type": "choice", "instructions": "What is this ticket about?",
                             "criteria": {"billing": "payments and invoices", "technical": "the product does not work", "other": "anything else"}},
            },
        },
    },
    timeout=30,
)
response.raise_for_status()
answers = response.json()["output"]["answers"]
print(answers["billing"]["noul"], answers["category"]["choice"])
```

### JavaScript

```javascript
const response = await fetch("https://api.inola.ai/v1/infer", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.INOLA_API_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    model: "decider-mini",
    input: {
      state: "I was charged twice. Please fix this ASAP.",
      questions: {
        billing: { type: "noul", instructions: "Is this ticket about billing?" },
        category: { type: "choice", instructions: "What is this ticket about?",
                    criteria: { billing: "payments and invoices", technical: "the product does not work", other: "anything else" } },
      },
    },
  }),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const { output } = await response.json();
const answers = output.answers;
console.log(answers.billing.noul, answers.category.choice);
```

## The answer

```json
{
  "id": "req_01JBXQ7M3T8K2V9R4N6PZC5HDA",
  "model": "decider-mini",
  "version": "1.3.0",
  "output_schema_id": "decision.v1",
  "output": {
    "answers": {
      "billing": {"type": "noul", "noul": 0.97},
      "category": {"type": "choice", "choice": "billing", "probabilities": {"billing": 0.95, "technical": 0.03, "other": 0.02}}
    }
  },
  "usage": {"input_tokens": 32, "output_tokens": 0, "tokens": 32, "latency_ms": 62},
  "created_at": "2026-11-16T12:00:00Z"
}
```

The answers are in `output.answers`; the envelope is described in the [API reference](https://inola.ai/docs/reference/api.md).

## Next steps

- [Decider quality](https://inola.ai/docs/models/decider-benchmarks.md) — measurements of every version: accuracy, calibration, comparison with other models, prices and the method.
- [Models and versions](https://inola.ai/docs/concepts/models-and-versions.md) — real-time and batch, pinning a version.
- [Batches](https://inola.ai/docs/guides/batches.md) — many documents in one file.
