Each call costs input tokens times the input price plus output tokens times the output price. Both prices are EXAMPLE parameters, quoted per 1M tokens in abstract units.
Dividing the token count by one million before multiplying keeps the units straight. The result is a small number of EXAMPLE units per call.
Symbol | Meaning | EXAMPLE value |
|---|---|---|
| Input tokens in one call | 8000 |
| EXAMPLE units per 1M input tokens | 3 |
| Output tokens in one call | 500 |
| EXAMPLE units per 1M output tokens | 12 |
total |
| 0.030 units |
Tokens are subword units, and the common approach is BPE-like chunking. Roughly 3 to 4 characters per token holds for English prose with common tokenizers, with fewer per token for code, numbers, hex and non-Latin text.
That rule is approximate and tokenizer-dependent. Exact counts vary by model, so measure them on the tool in use.
Take 8000 input tokens and 500 output tokens at the EXAMPLE prices. The calc block substitutes and adds.
EXAMPLE prices (not real prices): 3 units per 1M input tokens, 12 units per 1M output tokens
single call: 8000 input tokens, 500 output tokens
input part = 8000 / 1000000 x 3 = 0.024 units
output part = 500 / 1000000 x 12 = 0.006 units
total = 0.024 + 0.006 = 0.030 units
output share = 0.006 / 0.030 = 20%The output rate is four times the input rate, yet input dominates here. Counts beat rates when the counts differ by more than the rates do.
EXAMPLE units per 1M tokens. Multiplying by a token count leaves plain EXAMPLE units.
The input part doubles to 0.048 units. The total is 0.048 + 0.006 = 0.054 units.