Expand description
Cost estimation for DeepSeek API usage.
Pricing based on DeepSeek’s published rates (per million tokens).
Structs§
- Cost
Estimate - Cost estimate in the two official DeepSeek pricing currencies.
Enums§
- Cost
Currency - Cost display currency.
Functions§
- calculate_
turn_ cost - Calculate cost for a turn given token usage and model.
- calculate_
turn_ cost_ estimate - Calculate cost for a turn in both official currencies.
- calculate_
turn_ cost_ estimate_ from_ usage - Calculate cost from provider usage in both official currencies.
- calculate_
turn_ cost_ from_ usage - Calculate cost from provider usage, honoring DeepSeek context-cache fields.
- format_
cost - Format a USD cost for compact display.
- format_
cost_ amount - Format a cost amount for compact display in the chosen currency.
- format_
cost_ amount_ precise - Format a cost amount for detailed reports in the chosen currency.
- format_
cost_ estimate - Format a dual-currency estimate using the selected display currency.