Skip to content

Cost Tracking

Install

Terminal window
pip install briefcase-ai[drift]

Quick Example

from briefcase.drift import CostEstimate
estimate = CostEstimate.from_snapshot(snapshot)
print(f"Input tokens: {estimate.input_tokens}")
print(f"Output tokens: {estimate.output_tokens}")
print(f"Estimated cost: ${estimate.total_cost:.4f}")

Key Classes

  • CostEstimate — token counts and cost calculation

Configuration

OptionDefaultDescription
pricing_tablebuilt-inToken prices per model
currency"USD"Display currency