# AI plans and prices

The operator pays for the server AI, so the operator grants it: every project spends its plan's credits.

A plan is a name, monthly credits and daily credits: `-1` unlimited, `0` no server AI. With no plan and no default plan a project has no server AI. The price table says per model how many credits 1M input and 1M output tokens cost; the server makes no call with a model that has no price.

```console
$ tkt operator plan new team --monthly 50000 --daily 5000 --server https://tkt.ideathon.me
```

## Details

- `tkt operator price set <model> --input N --output N` (credits per 1M tokens; an embedding model has output 0), `tkt operator price list`. The model name is the one the server calls (`AITODO_SERVER_LLM_MODEL`, `AITODO_SERVER_EMBED_MODEL`). No price: 503 `ERR_LLM_NOT_CONFIGURED`, and the error names the command.
- `tkt operator plan new|set|list|delete`, `tkt operator plan default <name>`: the default plan applies to every project without a plan of its own, existing ones included. `tkt operator project-plan <id> <plan>` or `--default`. A changed plan applies from the next call; a plan in use cannot be deleted: `ERR_PLAN_IN_USE` (409).
- One budget covers every server AI call of the project (LLM and embedding). A call reserves its worst case in credits before it starts and books its real cost. The monthly budget resets on the 1st, the daily one at 00:00 UTC; a call needs room in both. `0` or a used-up budget: 429 `ERR_LLM_QUOTA`, with a plain message.
- Users see the plan's name, the share used in percent and the reset (`tkt project llm usage`, `tkt ai doctor`, the `tkt ui` ask panel), never tokens. `tkt operator projects` shows each project's plan and AI use (calls, credits this month).
- The project admin's own caps are switched off for now: `ERR_FEATURE_POSTPONED` (501).

## Commands on this page

- [`tkt operator plan new`](/en/docs/reference/commands/operator.md#tkt-operator-plan-new): Create a plan: a name, monthly credits and daily credits (-1 unlimited, 0 no server AI)
- [`tkt operator plan set`](/en/docs/reference/commands/operator.md#tkt-operator-plan-set): Change a plan's monthly or daily credits; every project on it spends by them from its next call
- [`tkt operator plan list`](/en/docs/reference/commands/operator.md#tkt-operator-plan-list): Every plan: its monthly and daily credits, whether it is the default, and how many projects are on it
- [`tkt operator plan delete`](/en/docs/reference/commands/operator.md#tkt-operator-plan-delete): Delete a plan that no project and not the default uses (ERR\_PLAN\_IN\_USE otherwise)
- [`tkt operator plan default`](/en/docs/reference/commands/operator.md#tkt-operator-plan-default): Make a plan the default: every project without a plan of its own spends by it, existing projects included
- [`tkt operator project-plan`](/en/docs/reference/commands/operator.md#tkt-operator-project-plan): Put a project on a plan, or back on the default plan with --default; it spends by that plan from its next call
- [`tkt operator price set`](/en/docs/reference/commands/operator.md#tkt-operator-price-set): Set a model's price: credits per 1M input tokens and per 1M output tokens (an embedding model: input only, output 0)
- [`tkt operator price list`](/en/docs/reference/commands/operator.md#tkt-operator-price-list): Every model's price, in credits per 1M input and output tokens

## Related

- Error code · 409: [`ERR_PLAN_IN_USE`](/en/docs/reference/errors.md#ERR_PLAN_IN_USE): An AI plan that a project or the default still uses cannot be deleted
- Error code · 501: [`ERR_FEATURE_POSTPONED`](/en/docs/reference/errors.md#ERR_FEATURE_POSTPONED): A feature that is built but switched off for now (the project admin's AI caps)
