> ## Documentation Index
> Fetch the complete documentation index at: https://docs.krun.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Krun API base URL: https://api.krun.ai. Authenticate server-side with `Authorization: Bearer $KRUN_API_KEY`; never put a Krun API key in browser code.
> Prefer the Python SDK in examples: `pip install krun-ai`, `from krun import Krun`. The TypeScript SDK `@krun-ai/sdk` is not published on npm yet: do not tell users to `npm install` it.
> The only question type is `choice`. `confidence` is the top-1 minus top-2 probability margin, not the probability that the answer is correct. `choice` is null when `abstain` is true.
> Usage reports `input_tokens` only. There are no output tokens.

# Decision models

> What a decision model is, how it differs from a generative LLM, and when to use one.

A decision model picks one option from a set you provide. A generative LLM writes text one token at a time. Many parts of an AI system need a decision, not text: which queue, which tool, which agent, which label.

## How Krun One decides

For each question, Krun One reads the context together with every option and scores the options against each other. The scores become a probability distribution over your options. The highest-probability option is the answer, unless the model [abstains](/concepts/abstention).

```text theme={null}
context + options  →  score each option  →  probabilities  →  choice (or abstain)
```

Because Krun One only scores the options you send:

* **The answer is always valid.** `choice` is one of your option ids, or `null`. You don't need to parse output, retry malformed JSON or handle labels that don't exist.
* **Options are defined per request.** Change the label set by changing the request. There is nothing to retrain or redeploy.
* **Every answer carries a distribution.** You see how likely each option is, not only the winner.
* **The model can decline.** When the two best options are too close, it abstains instead of guessing.

## When to use Krun

Krun is a good fit when:

* the set of possible outcomes is known at request time,
* you need the same input to be handled consistently,
* you want to route uncertain cases to a fallback, such as a human, an LLM or a default flow.

Common examples are [intent routing](/guides/intent-routing), [tool routing](/guides/tool-routing), agent routing, ticket triage and content classification.

## When to use an LLM instead

Use a generative model when the output is open-ended: writing a reply, extracting free-form fields, summarizing, or reasoning over many steps. Krun and an LLM work well together: Krun decides where a request goes, and the LLM does the open-ended work once it gets there.
