Skip to content

cost_calculator

diapason.server.cost_calculator

Cost calculator -- estimate monthly cloud API costs for common use cases.

CostEstimate dataclass

Estimated cost for a provider given a usage scenario.

Scenario dataclass

A prebuilt usage scenario.

estimate_all_scenarios()

Estimate costs for all scenarios and all providers.

estimate_monthly_cost(calls_per_month, avg_input_tokens, avg_output_tokens, provider_key)

Estimate monthly cost for a provider given usage parameters.

estimate_scenario(scenario_name)

Estimate costs for all providers for a named scenario.