> ## 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.

# Usage and tokens

> How Krun counts input tokens. Krun does not generate text, so there are no output tokens.

Every successful decision reports the input tokens the model processed:

```json theme={null}
{
  "usage": {
    "input_tokens": 49
  }
}
```

## Input tokens only

Krun One scores the options you send. It does not generate a completion, so there are no output tokens, and `usage` has no `output_tokens` field.

## How input tokens are counted

* Tokens are counted with the Krun One tokenizer, by the model itself. They are not estimated.
* Each question is scored as its own sequence: the context plus that question's options. `input_tokens` is the sum over all questions in the request.
* Adding questions to a request adds tokens, because the context is read once per question.

For example, the single-question request in the [Quickstart](/quickstart) used 49 input tokens. A request with three questions about a similar context used 141.

`input_tokens` can be `null` in the rare case that the model backend does not report it.

## Tokens and quotas

Projects can have a monthly input-token quota and a monthly decision quota. Each question in a request counts as one decision. Only successful requests count toward quotas. See [Rate limits and quotas](/resources/rate-limits-and-quotas).

<Tip>
  Keep `context` focused on the text the decision depends on. Shorter contexts and fewer, clearer options use fewer tokens.
</Tip>
