AI API Cost Calculator

v0.1.0
io.github.m-mustufa/ai-api-cost-mcp Checked 4 days ago Published 11 days ago

Estimate and compare OpenAI, Claude and Gemini API costs, gross margin and break-even price.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_models List AI API models and rates

List the OpenAI, Anthropic Claude and Google Gemini models this server knows, with current standard rates in USD per 1 million input, cached input and output tokens, promotional end dates and official pricing sources.

ParameterTypeDescription
providerstringOnly list models from this provider.

estimate_cost Estimate monthly AI API cost and margin

Estimate the monthly AI API bill for one model and a SaaS workload: token costs (uncached input, cached input, output), cost per request, total cost with other variable and fixed costs, revenue, gross profit, gross margin, break-even price per user and break-even users. Start from a use_case preset and override any number.

ParameterTypeDescription
cached_input_pctnumberShare of input tokens served from the prompt cache, 0 to 100.
custom_ratesobjectUse your own rates instead of a listed model, for example a negotiated price or a model not in the list.
extra_cost_per_requestnumberOther metered cost per request in USD, such as search, tool calls or storage. Default 0.
fixed_monthly_costnumberFixed monthly cost in USD, such as hosting and team tools.
input_tokensnumberAverage input (prompt) tokens per request.
modelstringModel id or name from list_models, e.g. gpt-6.1-sol or Claude Sonnet 5.5. Default: gpt-6.1-sol.
output_tokensnumberAverage output tokens per request.
price_per_usernumberSubscription price per user per month in USD, used for revenue and margin.
requests_per_usernumberAI requests per user per month.
use_casestringPreset workload to start from: chat (AI chat assistant), support (support bot), summarizer, documents (document processing). Any number you pass overrides the preset. Default: chat.
usersnumberMonthly active users.
variable_cost_per_usernumberOther variable cost per user per month in USD.

compare_models Compare AI API cost across models

Run the same SaaS workload against every known OpenAI, Claude and Gemini model (or one provider) and rank them by monthly AI API cost, with cost per request, total monthly cost and gross margin. Token cost only: it does not judge output quality or latency.

ParameterTypeDescription
cached_input_pctnumberShare of input tokens served from the prompt cache, 0 to 100.
extra_cost_per_requestnumberOther metered cost per request in USD, such as search, tool calls or storage. Default 0.
fixed_monthly_costnumberFixed monthly cost in USD, such as hosting and team tools.
input_tokensnumberAverage input (prompt) tokens per request.
output_tokensnumberAverage output tokens per request.
price_per_usernumberSubscription price per user per month in USD, used for revenue and margin.
providerstringOnly compare models from this provider.
requests_per_usernumberAI requests per user per month.
use_casestringPreset workload to start from: chat (AI chat assistant), support (support bot), summarizer, documents (document processing). Any number you pass overrides the preset. Default: chat.
usersnumberMonthly active users.
variable_cost_per_usernumberOther variable cost per user per month in USD.