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

# Cost Control

> Model choice, caching, output caps, spend caps, and monitoring.

Most of what you spend follows choices on each request: the model, how much input you send, how much output you allow, which extras you turn on. A failed call releases its reservation and is not charged ([How the API Works](/api/get-started/how-nito-works)).

## Right-Size the Model

The model is usually the largest factor. A compact model that handles the task well costs less per token and often responds faster. Select by capability from `GET /v1/models`. See [Choosing a Model](/models/choosing-a-model).

## Cache Repeated Prefixes

A long, stable prefix (system prompt, document, tool set) can be served from the provider's cache. Mark it with `cache_control`; on routes that support it, Nito forwards the marker and reports the cache accounting in `usage`. Stable content first, the variable question last. See [Prompt Caching](/api/features/prompt-caching).

## Cap Output

Set `max_tokens` (or `max_completion_tokens`) to bound generated tokens per call.

## Cap Each Key

Each API key can carry a `daily`, `monthly`, or `overall` spend cap. A daily or monthly cap blocks the key until its UTC window resets; an overall cap expires the key. Either way a runaway or leaked key cannot spend past the limit. One key per workload, each capped to what that workload should spend. See [Secure API Key Handling](/api/features/best-practices/secure-api-key-handling).

## Monitor

Spend and usage are tracked per organization in the [developer console](/web-app/developer-console): spend for the selected window, requests, tokens, spend by model, daily breakdown. Check it on a schedule so drift shows before a cap does.

## Features That Add Usage

* **Reasoning tokens.** `usage.reasoning_tokens`. Higher effort, more tokens.
* **Server-side tools.** Web search and fetch count in addition to the model call; `usage.server_tool_use` reports how many ran.

Turn them on where they earn their keep.

## Checklist

* Right-sized model.
* Caching on for repeated prefixes.
* `max_tokens` set.
* A spend cap on every key.
* Console checked on a schedule.
* Reasoning and server tools used deliberately.

## Related

<CardGroup cols={3}>
  <Card title="How the API Works" icon="gears" href="/api/get-started/how-nito-works">
    Reserve, run, settle.
  </Card>

  <Card title="Choosing a Model" icon="cubes-stacked" href="/models/choosing-a-model">
    Task to model.
  </Card>

  <Card title="Plans" icon="tags" href="/plans">
    Funding and allowances.
  </Card>

  <Card title="Prompt Caching" icon="file-contract" href="/api/features/prompt-caching">
    Cache markers.
  </Card>

  <Card title="Secure API Key Handling" icon="binary-lock" href="/api/features/best-practices/secure-api-key-handling">
    Keys and caps.
  </Card>

  <Card title="Latency and Performance" icon="chart-mixed-up-circle-currency" href="/api/features/best-practices/latency-and-performance">
    Speed.
  </Card>
</CardGroup>


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