BoilerPrompt

Input tokens

Input tokens are the units of text a model reads: your prompt, the files supplied, the system prompt, and the conversation so far. They are billed separately from output and are usually much cheaper per token, though agentic tools consume them in far greater volume.

With agents, input dominates the bill. An agent that reads forty files to make a three-line change has spent almost everything on input. That is why context discipline is a cost lever, not only a quality one.

Prompt caching changes the arithmetic where it is available: content repeated across requests, like a large rules file or a stable codebase context, can be reused at a fraction of the price rather than re-read at full cost each time.

What this means in practice

Two habits reduce input spend without hurting output: attach the files a task actually touches instead of whole directories, and start a fresh conversation when the current one has accumulated failed attempts you no longer need the model to re-read.

Prompts for the tools this applies to

Related terms

  • Output tokens

    Output tokens are the text a model generates: explanations, code, and — with reasoning models — internal thinking that is billed even when it is not shown.

  • Token limit

    A token limit is a cap on how much text can be processed in a request or a period.

  • Context window

    The context window is the maximum amount of text a model can consider at once, measured in tokens and covering everything in the request: system prompt, your instructions, the files supplied, prior conversation, and the response being generated..

  • Context engineering

    Context engineering is the practice of deciding what information an AI model sees for a given task — which files, which conventions, which prior results — and in what form.

All glossary terms