Turn real API usage into a cost log. Paste a response or enter token counts, price them against current catalog rates, and export the rows you need.
100% free · no signup · browser-local
Paste the usage object from a response into the tool above.
It reads prompt_tokens and completion_tokens (or input_tokens and output_tokens), removes cached reads from billable input when the provider already includes them, multiplies each token bucket by the selected model’s per-1M rate, and totals the row. Entries stay in this browser and export as CSV or JSON.
Runs logged
0
Tokens tracked
0
Estimated spend
$0.00
Cost per run
$0.00
Enter the usage object from a single API response.
This entry costs
$0.03
Accepts OpenAI prompt_tokens and Anthropic input_tokens/cache fields. Raw JSON is never saved.
Saved only in this browser. Clear it whenever you want.
No logged calls yet
Add a row or paste an API response above.
usage object from a response, or use the copyable capture helper next to the paste box to make your own responses loggable.| Field | Billing rule used |
|---|---|
| Input tokens | Billable input after cached reads are removed when the provider already includes them in prompt_tokens. |
| Cached reads | Priced at the catalog cache-read rate, or the input rate when no separate cache rate is published. |
| Cache writes | Priced at 1.25× the input rate, matching the Anthropic cache-write premium. |
| Output tokens | Priced at the model’s output rate, usually 3×–5× higher than input. |
| Batch calls | Subtotal reduced by 50% only when the selected model supports the Batch API. |
Tokenizer APIs, image generation, web search fees, and provider subscriptions are outside this log. For workload forecasts before you ship, use the use-case cost guides or the full cost calculator.
5 short answers — tap a question to expand.
It reads OpenAI Chat Completions usage (prompt_tokens, completion_tokens, prompt_tokens_details.cached_tokens), OpenAI Responses API usage (input_tokens, output_tokens, input_tokens_details.cached_tokens), Anthropic Messages usage (input_tokens, output_tokens, cache_read_input_tokens, cache_creation_input_tokens), and generic camelCase token fields. Only the counts are kept; the raw paste is discarded.
OpenAI includes cached tokens inside prompt_tokens, so billing them twice would overstate cost. Anthropic reports cached reads and cache writes outside input_tokens. The log detects which convention the response uses, subtracts included cached reads from billable input, and prices the cache buckets at their published discount rates.
Prices come from the TokenCalc AI catalog snapshot that also powers the calculator and the machine-readable /api/price-index endpoint. They are not live provider quotes. Check the source link on a model page in the price index before using the export for invoicing or finance reporting.
No. Parsing and cost math run entirely in your browser. Logged rows are saved only in this browser’s localStorage under tc_usage_cost_log_v1, and you can clear them at any time. Exports are generated locally as CSV or JSON. Never paste secrets, keys, or user content into the paste box — only the usage object.
Add a short label to each row, such as a ticket ID, experiment name, or endpoint. The table totals tokens and estimated spend across all rows, so you can group by label in a spreadsheet after exporting the CSV. For pre-build budgets, use the agent cost simulator or the main token cost calculator instead.
Prices are a catalog snapshot, not a live provider quote. Raw API payloads are parsed in your browser and never uploaded or saved.
Compare ChatGPT Plus, Claude Pro, Cursor Pro, or Claude Max ($20–$100/mo) against 2026–2027 pay-as-you-go API spend.
Simulate daily, monthly, and annual LLM bills across every model in the catalog.
Price an agentic coding session: turns, context, tool results, cache hit rate, and output tokens.
We'll email you when model prices change or new tools launch. Unsubscribe anytime.