Tagged “tokens”
-
Counting tokens before you spend them
Why character-count estimates drift, what message formatting adds that you didn't count, and how to build a budget check that fails before the API does.
-
The context window is a budget
Five things compete for every request's window, including the answer. How to write the allocation down, and why the output reservation is forgotten.
-
What formatting overhead costs you
Delimiters, labels and serialisation are paid per item in the prompt. How to price the per-passage wrapper and keep the parts that earn their tokens.
-
Rebudgeting when you change model
A budget is model-specific. Token counts, limits, output caps and position behaviour all shift on a swap. The checklist for porting an allocation.
-
The output format is a budget decision
Verbose response formats spend the window twice — once on the schema, once on the answer. How to price a format and pick a cheaper one.
-
Budgeting for tokens you never see
Reasoning traces, retries and discarded drafts consume window and billing without appearing in the answer. How to find them and reserve for them.
-
Tool definitions are a line item
The tool block is paid on every request whether or not a tool is called. How to audit it per tool, what to trim, and what terser schemas cost you.