$ npx @trazum/cli bill examples/claude-projectsYour bill ──────────────────────────────────────────────────────────────── $12.70 across 126 priced call(s) project calls USD share home-me-etl-pipeline 42 $9.05 ███████░░░ 71.2% home-me-webapp 84 $3.66 ███░░░░░░░ 28.8% model calls USD share claude-fable-5-1 28 $9.00 ███████░░░ 70.9% claude-opus-5-5 56 $2.95 ██░░░░░░░░ 23.2% claude-sonnet-5-5 28 $0.7077 █░░░░░░░░░ 5.6% claude-haiku-5-5 14 $0.0456 ░░░░░░░░░░ 0.4% This log covers 2026-09-01 → 2026-09-14 (13.3 days): stated, never extrapolated. Scale it to a month yourself, now that you know what it covers. ! Agent sessions (Claude Code, Codex, Gemini CLI) are priced at catalogue API rates. On a subscription you paid the plan, not this API-equivalent estimate; missing telemetry and custom rates can change the result. The receipt as data: --receipt, or -o receipt.json. The document for whoever pays: --pdf-out bill.pdf.
$ npx @trazum/cli bill examples/claude-projectsYour bill ──────────────────────────────────────────────── $12.70 across 126 priced call(s) project calls USD share home-me-etl-pipeline 42 $9.05 ███████░░░ 71.2% home-me-webapp 84 $3.66 ███░░░░░░░ 28.8% model calls USD share claude-fable-5-1 28 $9.00 ███████░░░ 70.9% claude-opus-5-5 56 $2.95 ██░░░░░░░░ 23.2% claude-sonnet-5-5 28 $0.7077 █░░░░░░░░░ 5.6% claude-haiku-5-5 14 $0.0456 ░░░░░░░░░░ 0.4% This log covers 2026-09-01 → 2026-09-14 (13.3 days): stated, never extrapolated. Scale it to a month yourself, now that you know what it covers. ! Agent sessions (Claude Code, Codex, Gemini CLI) are priced at catalogue API rates. On a subscription you paid the plan, not this API-equivalent estimate; missing telemetry and custom rates can change the result. The receipt as data: --receipt, or -o receipt.json. The document for whoever pays: --pdf-out bill.pdf.
$ npx @trazum/cli check examples/examples/, 3 prompts ───────────────────────────────────────────────────── All 3 within budget. OK 235 / 600 examples/sample-prompt.en.txt OK 316 / 600 examples/sample-prompt.es.txt OK 326 / 600 examples/support-prompt.txt Against the baseline unchanged at 877 tokens Monthly cost $11.88 → $11.88 ($0)$ echo $?0
$ npx @trazum/cli check examples/examples/, 3 prompts ───────────────────────────────────── All 3 within budget. OK 235 / 600 examples/sample-prompt.en.txt OK 316 / 600 examples/sample-prompt.es.txt OK 326 / 600 examples/support-prompt.txt Against the baseline unchanged at 877 tokens Monthly cost $11.88 → $11.88 ($0)$ echo $?0
$ cd examples/claude-projects/-home-me-webapp$ echo '{"session_id":"demo","transcript_path":"demo-webapp.jsonl"}' | npx @trazum/cli session-guard check \ --warn 1 --stop 5 --on-cannot-tell fail-open{"systemMessage":"Trazum: this session has reached $3.66 in API-equivalent cost. Your warning figure is $1.00 and it stops at $5.00. API-equivalent is what this usage would cost at the provider's list API prices, not what you were charged. This is said once per session."}$ echo $?0$ echo '{"session_id":"demo","transcript_path":"demo-webapp.jsonl"}' | npx @trazum/cli session-guard check \ --warn 1 --stop 3 --on-cannot-tell fail-openTrazum: stopped. This session has reached $3.66 in API-equivalent cost, at or over your stop figure of $3.00. API-equivalent is what this usage would cost at the provider's list API prices, not what you were charged. To go on, raise the figure: trazum session-guard install --warn <usd> --stop <usd> --on-cannot-tell <fail-open|fail-closed>.$ echo $?2$ cd examples/claude-projects/-home-me-webapp$ echo '{"session_id":"demo","transcript_path":"demo-webapp.jsonl"}' | npx @trazum/cli session-guard check \ --warn 1 --stop 5 --on-cannot-tell fail-open{"systemMessage":"Trazum: this session has reached $3.66 in API-equivalent cost. Your warning figure is $1.00 and it stops at $5.00. API-equivalent is what this usage would cost at the provider's list API prices, not what you were charged. This is said once per session."}$ echo $?0$ echo '{"session_id":"demo","transcript_path":"demo-webapp.jsonl"}' | npx @trazum/cli session-guard check \ --warn 1 --stop 3 --on-cannot-tell fail-openTrazum: stopped. This session has reached $3.66 in API-equivalent cost, at or over your stop figure of $3.00. API-equivalent is what this usage would cost at the provider's list API prices, not what you were charged. To go on, raise the figure: trazum session-guard install --warn <usd> --stop <usd> --on-cannot-tell <fail-open|fail-closed>.$ echo $?2$ npx @trazum/cli bill examples/claude-projects \ --agent claude-code --timezone Europe/Madrid --by weekYour bill ──────────────────────────────────────────────────────────────── $12.70 across 126 priced call(s) project calls USD share home-me-etl-pipeline 42 $9.05 ███████░░░ 71.2% home-me-webapp 84 $3.66 ███░░░░░░░ 28.8% model calls USD share claude-fable-5-1 28 $9.00 ███████░░░ 70.9% claude-opus-5-5 56 $2.95 ██░░░░░░░░ 23.2% claude-sonnet-5-5 28 $0.7077 █░░░░░░░░░ 5.6% claude-haiku-5-5 14 $0.0456 ░░░░░░░░░░ 0.4% week calls USD share 2026-W36 54 $5.43 ████░░░░░░ 42.8% 2026-W37 63 $6.36 █████░░░░░ 50.1% 2026-W38 9 $0.9107 █░░░░░░░░░ 7.2% One week on its own: --since 2026-09-14 --until 2026-09-20. Add --timezone Europe/Madrid to bill it on the same days. This log covers 2026-09-01 → 2026-09-14 (13.3 days): stated, never extrapolated. Scale it to a month yourself, now that you know what it covers. Days are cut in Europe/Madrid, not UTC: a bare --since/--until day is a day there, and so is every row above. ! Agent sessions (Claude Code, Codex, Gemini CLI) are priced at catalogue API rates. On a subscription you paid the plan, not this API-equivalent estimate; missing telemetry and custom rates can change the result. The receipt as data: --receipt, or -o receipt.json. The document for whoever pays: --pdf-out bill.pdf.
$ npx @trazum/cli bill examples/claude-projects \ --agent claude-code --timezone Europe/Madrid --by weekYour bill ──────────────────────────────────────────────── $12.70 across 126 priced call(s) project calls USD share home-me-etl-pipeline 42 $9.05 ███████░░░ 71.2% home-me-webapp 84 $3.66 ███░░░░░░░ 28.8% model calls USD share claude-fable-5-1 28 $9.00 ███████░░░ 70.9% claude-opus-5-5 56 $2.95 ██░░░░░░░░ 23.2% claude-sonnet-5-5 28 $0.7077 █░░░░░░░░░ 5.6% claude-haiku-5-5 14 $0.0456 ░░░░░░░░░░ 0.4% week calls USD share 2026-W36 54 $5.43 ████░░░░░░ 42.8% 2026-W37 63 $6.36 █████░░░░░ 50.1% 2026-W38 9 $0.9107 █░░░░░░░░░ 7.2% One week on its own: --since 2026-09-14 --until 2026-09-20. Add --timezone Europe/Madrid to bill it on the same days. This log covers 2026-09-01 → 2026-09-14 (13.3 days): stated, never extrapolated. Scale it to a month yourself, now that you know what it covers. Days are cut in Europe/Madrid, not UTC: a bare --since/--until day is a day there, and so is every row above. ! Agent sessions (Claude Code, Codex, Gemini CLI) are priced at catalogue API rates. On a subscription you paid the plan, not this API-equivalent estimate; missing telemetry and custom rates can change the result. The receipt as data: --receipt, or -o receipt.json. The document for whoever pays: --pdf-out bill.pdf.
$ npx @trazum/cli optimize examples/support-prompt.txtStart here ─────────────────────────────────────────────────────────────── "This task may not need Claude Opus 5", $8.34/month, 13× what the rules saved.Input tokens 326 → 202 -38.0% (estimated, ±6%)Rules applied [safe] Repeated paragraphs (1×, ~72 tokens) [safe] Wordy phrasing (2×, ~6 tokens) [safe] Politeness formulas (8×, ~34 tokens) [safe] Filler and throat-clearing (2×, ~11 tokens)Cost with Claude Opus 5 1,000 calls/month · 300 output tokens per call $9.13 → $8.51 saving $0.6200/month (6.8%)Beyond shortening the prompt → $8.34 This task may not need Claude Opus 5 By length and vocabulary the prompt looks like "small" complexity. On Claude Haiku 5.5 you would go from $8.51 to $0.1702 per month. This is a keyword heuristic, not a judgement about answer quality. Measure it before switching in production: `trazum route <log.jsonl> --prompt-file <prompt> --cases <cases> --yes` sends the same cases to both models and reports whether the cheaper one still does the job. → $4.25 If the work tolerates latency, use the Batch API The Batch API applies a 50% discount on both input and output. Most batches finish in under an hour, with a 24-hour maximum. It fits bulk classification, data enrichment or evaluations: anything that is not answering a user in real time. · Below the cacheable minimum Claude Opus 5 needs at least 512 prefix tokens to cache; here the first variable placeholder ({{question}}) shows up at ~186 tokens and only what precedes it can be cached. Setting cache_control will not error, it simply will not cache. · Your cost is in the output, not the prompt Output accounts for $7.50 per month against $1.01 of input. Shortening the prompt has a low ceiling here. The two controls that move the needle are the effort parameter (lower it when the task is not reasoning-heavy) and explicitly asking for concise answers. Shortening a prompt is the smallest lever there is: measured on an ordinary support prompt, the rules recover about 1% of a monthly bill. On a metered API the things that move 60% to 80% are which model the call goes to, the Batch API, prompt caching, and what re-sending the conversation costs, and "trazum profile <usage.jsonl>" prices all four from what the provider actually charged. Recording that log is a few lines and it never contains prompt text.$ npx @trazum/cli optimize examples/support-prompt.txtStart here ─────────────────────────────────────────────── "This task may not need Claude Opus 5", $8.34/month, 13× what the rules saved.Input tokens 326 → 202 -38.0% (estimated, ±6%)Rules applied [safe] Repeated paragraphs (1×, ~72 tokens) [safe] Wordy phrasing (2×, ~6 tokens) [safe] Politeness formulas (8×, ~34 tokens) [safe] Filler and throat-clearing (2×, ~11 tokens)Cost with Claude Opus 5 1,000 calls/month · 300 output tokens per call $9.13 → $8.51 saving $0.6200/month (6.8%)Beyond shortening the prompt → $8.34 This task may not need Claude Opus 5 By length and vocabulary the prompt looks like "small" complexity. On Claude Haiku 5.5 you would go from $8.51 to $0.1702 per month. This is a keyword heuristic, not a judgement about answer quality. Measure it before switching in production: `trazum route <log.jsonl> --prompt-file <prompt> --cases <cases> --yes` sends the same cases to both models and reports whether the cheaper one still does the job. → $4.25 If the work tolerates latency, use the Batch API The Batch API applies a 50% discount on both input and output. Most batches finish in under an hour, with a 24-hour maximum. It fits bulk classification, data enrichment or evaluations: anything that is not answering a user in real time. · Below the cacheable minimum Claude Opus 5 needs at least 512 prefix tokens to cache; here the first variable placeholder ({{question}}) shows up at ~186 tokens and only what precedes it can be cached. Setting cache_control will not error, it simply will not cache. · Your cost is in the output, not the prompt Output accounts for $7.50 per month against $1.01 of input. Shortening the prompt has a low ceiling here. The two controls that move the needle are the effort parameter (lower it when the task is not reasoning-heavy) and explicitly asking for concise answers. Shortening a prompt is the smallest lever there is: measured on an ordinary support prompt, the rules recover about 1% of a monthly bill. On a metered API the things that move 60% to 80% are which model the call goes to, the Batch API, prompt caching, and what re-sending the conversation costs, and "trazum profile <usage.jsonl>" prices all four from what the provider actually charged. Recording that log is a few lines and it never contains prompt text.$ npx @trazum/cli modelsModels and pricing (USD per million tokens) ───────────────────────────── Table reviewed on 2026-11-05 (11 days ago). Verify before budgeting. Per provider: 2026-11-05 (11 days ago) moonshot, deepseek, xai, mistral · 2026-11-16 (today) anthropic, openai, google model input output context cache min. claude-fable-5-1 10 50 1,000K 512 claude-opus-5-5 4 20 1,000K 512 claude-sonnet-5-5 2 10 1,000K 512 claude-haiku-5-5 0.1 0.5 1,000K 512 … 4 of 91 rows shown: the models the receipt priced. Run with the clock set to 2026-11-16, the day the newest rates were read.
$ npx @trazum/cli modelsModels and pricing (USD per million tokens) ───────────── Table reviewed on 2026-11-05 (11 days ago). Verify before budgeting. Per provider: 2026-11-05 (11 days ago) moonshot, deepseek, xai, mistral · 2026-11-16 (today) anthropic, openai, google model input output claude-fable-5-1 10 50 claude-opus-5-5 4 20 claude-sonnet-5-5 2 10 claude-haiku-5-5 0.1 0.5 … 4 of 91 rows shown: the models the receipt priced. Cut after output to fit 60 columns: context, cache min. not shown. Run with the clock set to 2026-11-16, the day the newest rates were read.
Example file
$ npx @trazum/cli bill examples/unpriced-model.jsonlYour bill ──────────────────────────────────────────────────────────────── $0.0145 across 3 priced call(s) workload calls USD share triage 3 $0.0145 ██████████ 100.0% model calls USD share claude-haiku-5-5 3 $0.0145 ██████████ 100.0% This log covers 2026-09-02 → 2026-09-02 (0.1 days): stated, never extrapolated. Scale it to a month yourself, now that you know what it covers. ! Not in the total: 2 call(s) to llama-3.3-70b-instruct, which the catalogue does not price. Named, never counted as $0. The receipt as data: --receipt, or -o receipt.json. The document for whoever pays: --pdf-out bill.pdf.
$ npx @trazum/cli bill examples/unpriced-model.jsonlYour bill ──────────────────────────────────────────────── $0.0145 across 3 priced call(s) workload calls USD share triage 3 $0.0145 ██████████ 100.0% model calls USD share claude-haiku-5-5 3 $0.0145 ██████████ 100.0% This log covers 2026-09-02 → 2026-09-02 (0.1 days): stated, never extrapolated. Scale it to a month yourself, now that you know what it covers. ! Not in the total: 2 call(s) to llama-3.3-70b-instruct, which the catalogue does not price. Named, never counted as $0. The receipt as data: --receipt, or -o receipt.json. The document for whoever pays: --pdf-out bill.pdf.