Skip to main content
Glama

Estimate LLM Cost

estimate-llm-cost
Read-only

Cost a workload with EXACT numbers the caller supplies: arbitrary token counts per request and any monthly volume, not just the 10k/100k/1m presets the other cost tools use. Use this for 'about 800 in and 200 out, 4 million calls a month', or to price one named model across every use-case profile. To compare 2-4 named models like for like at a preset volume, use compare-models-side-by-side instead. Provide a model name to get detailed cost breakdowns, or compare costs across all use case presets. Each figure comes twice: list price, and the optimized price achievable with prompt caching and the batch API. Cost figures are final as returned: rounded server-side and dated by provenance, with the lever behind each saving, or the reason there is none, named in the text.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNameNoModel name, e.g. 'GPT-4o'. A partial name matches up to 5 models and ALL of them are costed. If omitted, the first 8 catalogue entries are used — that is catalogue order, not a quality ranking.
monthlyVolumeNoExact monthly request count, any integer (default 100,000). This tool does not take the 10k/100k/1m presets the other cost tools use.
useCasePresetNoWorkload shape, which sets tokens per request: supportTicket (1.5k in / 500 out), knowledgeQA (2k / 800), meetingSummary (10k / 1.2k, batch-eligible), marketingContent (2.5k / 1.8k), codingTask (3k / 2k), invoiceProcessing (1.5k / 600, batch-eligible), callSummary (2k / 700, batch-eligible), agentWorkflow (6k / 3k). Default: every preset.
customInputTokensNoCustom input tokens per request. Must be supplied TOGETHER with customOutputTokens — either alone is ignored and the preset is used. A custom shape assumes no cacheable prefix and no batch eligibility, so its optimized cost equals its list cost.
customOutputTokensNoCustom output tokens per request. Must be supplied TOGETHER with customInputTokens — either alone is ignored and the preset is used.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNo
sourceYes
volumeYes
eloAsOfYes
dataAsOfNo
modelCostsYes
provenanceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed11 schema fields changed
    • changedInput schema / properties / customInputTokens / description
      Previous value: -"Custom input tokens per request (overrides preset)"New value: +"Custom input tokens per request. Must be supplied TOGETHER with customOutputTokens — either alone is ignored and the preset is used. A custom shape assumes no cacheable prefix and no batch eligibility, so its optimized cost equals its list cost."
    • changedInput schema / properties / customOutputTokens / description
      Previous value: -"Custom output tokens per request (overrides preset)"New value: +"Custom output tokens per request. Must be supplied TOGETHER with customInputTokens — either alone is ignored and the preset is used."
    • changedInput schema / properties / modelName / description
      Previous value: -"Model name to estimate costs for (e.g. 'GPT-4o', 'Claude Sonnet 4'). If omitted, shows top models."New value: +"Model name, e.g. 'GPT-4o'. A partial name matches up to 5 models and ALL of them are costed. If omitted, the first 8 catalogue entries are used — that is catalogue order, not a quality ranking."
    • changedInput schema / properties / monthlyVolume / description
      Previous value: -"Custom monthly volume (default: 100,000)"New value: +"Exact monthly request count, any integer (default 100,000). This tool does not take the 10k/100k/1m presets the other cost tools use."
    • changedInput schema / properties / useCasePreset / description
      Previous value: -"Use case preset. Default: all presets."New value: +"Workload shape, which sets tokens per request: supportTicket (1.5k in / 500 out), knowledgeQA (2k / 800), meetingSummary (10k / 1.2k, batch-eligible), marketingContent (2.5k / 1.8k), codingTask (3k / 2k), invoiceProcessing (1.5k / 600, batch-eligible), callSummary (2k / 700, batch-eligible), agentWorkflow (6k / 3k). Default: every preset."
    • addedOutput schema / properties / modelCosts / items / properties / costs / items / properties / batchApplied
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / modelCosts / items / properties / costs / items / properties / batchEligible
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / modelCosts / items / properties / costs / items / properties / cacheApplied
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / modelCosts / items / properties / costs / items / properties / cacheEligible
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / modelCosts / items / properties / costs / items / properties / savingsPct
      Added value: +{
      +  "type": "number"
      +}
    • changedOutput schema / properties / modelCosts / items / properties / costs / items / required
      Previous value: -[
      -  "useCase",
      -  "inputTokens",
      -  "outputTokens",
      -  "perRequest",
      -  "monthly",
      -  "perRequestOptimized",
      -  "monthlyOptimized"
      -]New value: +[
      +  "useCase",
      +  "inputTokens",
      +  "outputTokens",
      +  "perRequest",
      +  "monthly",
      +  "perRequestOptimized",
      +  "monthlyOptimized",
      +  "savingsPct",
      +  "batchEligible",
      +  "cacheEligible",
      +  "batchApplied",
      +  "cacheApplied"
      +]
  2. Changed2 schema fields changed
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / properties / provenance
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "catalogTotal": {
      +      "type": "number"
      +    },
      +    "dataAsOf": {
      +      "type": "string"
      +    },
      +    "eloAsOf": {
      +      "type": "string"
      +    },
      +    "label": {
      +      "type": "string"
      +    },
      +    "notice": {
      +      "type": "string"
      +    },
      +    "pricesVerified": {
      +      "type": "boolean"
      +    },
      +    "source": {
      +      "type": "string"
      +    },
      +    "tier": {
      +      "type": "number"
      +    },
      +    "upstreamSchemaVersion": {
      +      "type": "string"
      +    },
      +    "upstreamSource": {
      +      "type": "string"
      +    },
      +    "upstreamTimestamp": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "tier",
      +    "source",
      +    "label",
      +    "pricesVerified",
      +    "eloAsOf"
      +  ],
      +  "type": "object"
      +}
  3. Changed2 schema fields changed
    • changedOutput schema / $schema
      Previous value: -"https://json-schema.org/draft/2020-12/schema"New value: +"http://json-schema.org/draft-07/schema#"
    • removedOutput schema / properties / provenance
      Removed value: -{
      -  "additionalProperties": false,
      -  "properties": {
      -    "catalogTotal": {
      -      "type": "number"
      -    },
      -    "dataAsOf": {
      -      "type": "string"
      -    },
      -    "eloAsOf": {
      -      "type": "string"
      -    },
      -    "label": {
      -      "type": "string"
      -    },
      -    "notice": {
      -      "type": "string"
      -    },
      -    "pricesVerified": {
      -      "type": "boolean"
      -    },
      -    "source": {
      -      "type": "string"
      -    },
      -    "tier": {
      -      "type": "number"
      -    },
      -    "upstreamSchemaVersion": {
      -      "type": "string"
      -    },
      -    "upstreamSource": {
      -      "type": "string"
      -    },
      -    "upstreamTimestamp": {
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "tier",
      -    "source",
      -    "label",
      -    "pricesVerified",
      -    "eloAsOf"
      -  ],
      -  "type": "object"
      -}
  4. Changed2 schema fields changed
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / properties / provenance
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "catalogTotal": {
      +      "type": "number"
      +    },
      +    "dataAsOf": {
      +      "type": "string"
      +    },
      +    "eloAsOf": {
      +      "type": "string"
      +    },
      +    "label": {
      +      "type": "string"
      +    },
      +    "notice": {
      +      "type": "string"
      +    },
      +    "pricesVerified": {
      +      "type": "boolean"
      +    },
      +    "source": {
      +      "type": "string"
      +    },
      +    "tier": {
      +      "type": "number"
      +    },
      +    "upstreamSchemaVersion": {
      +      "type": "string"
      +    },
      +    "upstreamSource": {
      +      "type": "string"
      +    },
      +    "upstreamTimestamp": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "tier",
      +    "source",
      +    "label",
      +    "pricesVerified",
      +    "eloAsOf"
      +  ],
      +  "type": "object"
      +}
  5. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.