LLM API Cost Calculator · Schema
Raw schema.
Same JSON the GET /v1/programming-dev/llm-api-cost-calculator/schema endpoint returns — formatted for reading. Use it to codegen typed clients or document the contract.
{ "tool": "llm-api-cost-calculator", "domain": "programming-dev", "version": "1.0.0", "name": "LLM API Cost Calculator", "description": "Estimate monthly API cost for any LLM workload across Anthropic and OpenAI models. Includes prompt-cache and batch-API math so you see what you actually pay — not just the headline rate.", "standard": null, "inputs": [ { "key": "model", "label": "Model", "help": "Provider/model. Per-Mtok rates baked in — see pricing_as_of for freshness.", "type": "enum", "options": [ "anthropic/claude-opus-4.7", "anthropic/claude-sonnet-4.6", "anthropic/claude-haiku-4.5", "openai/gpt-5.5", "openai/gpt-5.4", "openai/gpt-5.4-mini", "openai/gpt-5.4-nano", "openai/gpt-5", "openai/gpt-5-mini", "openai/gpt-4.1", "openai/gpt-4.1-mini", "openai/gpt-4o-mini" ], "default": "anthropic/claude-sonnet-4.6" }, { "key": "input_tokens_per_call", "label": "Input Tokens / Call", "required": true, "unit": "tok", "help": "Average prompt size: system + user + retrieved context combined.", "type": "integer", "min": 1, "max": 1000000, "step": 100, "default": 2000 }, { "key": "output_tokens_per_call", "label": "Output Tokens / Call", "required": true, "unit": "tok", "type": "integer", "min": 1, "max": 1000000, "step": 50, "default": 500 }, { "key": "calls_per_month", "label": "Calls / Month", "required": true, "type": "integer", "min": 1, "max": 1000000000, "step": 1000, "default": 100000 }, { "key": "cached_input_fraction", "label": "Cached Input Fraction", "help": "Share of input tokens served from prompt cache (0 = no cache, 1 = fully cached). Anthropic and GPT-5.x get ~90% off cache reads; GPT-4o-class get 50% off.", "type": "number", "min": 0, "max": 1, "step": 0.05, "default": 0 }, { "key": "use_batch_api", "label": "Use Batch API", "help": "Both providers offer 50% off both rates for async batch jobs.", "type": "boolean", "default": false } ], "outputs": [ { "key": "model_name", "label": "Model", "type": "string" }, { "key": "provider", "label": "Provider", "type": "string" }, { "key": "monthly_cost_usd", "label": "Monthly Cost", "type": "number", "unit": "$", "precision": 2 }, { "key": "cost_per_call_usd", "label": "Cost per Call", "type": "number", "unit": "$", "precision": 5 }, { "key": "input_cost_monthly_usd", "label": "Input Cost / mo", "type": "number", "unit": "$", "precision": 2 }, { "key": "output_cost_monthly_usd", "label": "Output Cost / mo", "type": "number", "unit": "$", "precision": 2 }, { "key": "monthly_cost_no_optim_usd", "label": "Without Cache or Batch", "type": "number", "unit": "$", "precision": 2 }, { "key": "cache_savings_usd", "label": "Cache Savings / mo", "type": "number", "unit": "$", "precision": 2 }, { "key": "batch_savings_usd", "label": "Batch Savings / mo", "type": "number", "unit": "$", "precision": 2 }, { "key": "effective_input_rate_per_mtok", "label": "Effective Input Rate", "type": "number", "unit": "$/Mtok", "precision": 3 }, { "key": "effective_output_rate_per_mtok", "label": "Effective Output Rate", "type": "number", "unit": "$/Mtok", "precision": 3 }, { "key": "pricing_as_of", "label": "Pricing as of", "type": "string" } ], "endpoint": "/v1/programming-dev/llm-api-cost-calculator" }