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

# Quickstart

> Get a key, install the SDK, ask your first question.

## 1. Get a key

Sign in at [app.tokz.si](https://app.tokz.si/login) and create a key under **API keys**.
Every account starts with \$5 of credit, no card needed.

```bash theme={null}
export TOKZ_API_KEY=tokz_live_...
```

## 2. Install

```bash npm theme={null}
npm install @tokz/sdk
```

```bash pip theme={null}
pip install tokz
```

## 3. Ask a question

```ts TypeScript theme={null}
import { Tokz } from "@tokz/sdk";

const tokz = new Tokz({ apiKey: process.env.TOKZ_API_KEY! });

const out = await tokz.decide({
  inputs: "I was charged twice and the app keeps logging me out.",
  decisions: {
    queue: { type: "choice", options: ["billing", "technical", "account"] },
    urgent: { type: "bool" },
  },
});

const r = out.results[0]!;
console.log(r.queue.best, r.queue.policy, r.urgent.best);
```

```python Python theme={null}
import os
from tokz import Tokz

tokz = Tokz(api_key=os.environ["TOKZ_API_KEY"])

out = tokz.decide(
    "I was charged twice and the app keeps logging me out.",
    {
        "queue": {"type": "choice", "options": ["billing", "technical", "account"]},
        "urgent": {"type": "bool"},
    },
)
r = out["results"][0]
print(r["queue"]["best"], r["queue"]["policy"], r["urgent"]["best"])
```

`best` is the answer, `policy` the probability of every option. Send up to 64 texts in
one call: every request bills at least 256 tokens.

## Next

> [card] [Decisions API](https://docs.tokz.si/decisions.md)
>
> All four question types, models and limits.

> [card] [Billing](https://docs.tokz.si/billing.md)
>
> What a billed token is, and what happens at \$0.

> [card] [Troubleshooting](https://docs.tokz.si/troubleshooting.md)
>
> Errors and what to do about each.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.