Skip to main content

Module pricing

Module pricing 

Source
Expand description

Cost estimation for DeepSeek API usage.

Pricing based on DeepSeek’s published rates (per million tokens).

Structs§

CostEstimate
Cost estimate in the two official DeepSeek pricing currencies.

Enums§

CostCurrency
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.