Skip to main content
Glama

AI token prices

get_token_prices
Read-onlyIdempotent

Today's AI token prices by company: each company's price index in USD per 1M tokens at the mix of tokens agents send (87% cache read, 12% input, 1% output), weighted by its models' usage, with 1-day, 1-week and 1-month changes and its price trend over 13 weeks (direction, strength, score, speed per month) and its rank by the trend's strength, the order of the home page's list and of this one (sort and order give another: the cheapest first, the largest 1-month change first). Give one company to also get its models' usage shares and posted input, cached input and output prices, and its estimated spend on OpenRouter. For one model's prices use get_model_prices; for past values get_price_history. For questions like "what does Claude cost per 1M tokens?" or "which AI company's API is cheapest?".

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_token_prices"
  }
}

Input Schema

NameRequiredDescriptionDefault
sortNoThe order of the list's rows, as pressing a column header on the home page orders them: rank (the page's own order, its #, by trend strength), name (A to Z), or price, change_1d, change_1w, change_1m or trend (the signed trend score), each largest first. E.g. sort "price", order "asc": the cheapest company first; sort "change_1m": the largest 1-month rise first. A row without the value comes last.rank
orderNoWith sort: "asc" for the smallest first (name: A to Z; rank: 1 up), "desc" for the largest first. Without it: rank and name ascending, the others largest first, as the page's headers start.
companyNoOne company; omit for all listed companies.

Output Schema

NameRequiredDescriptionDefault
unitYes
fieldsNoOne company's: what its models and their figures are
licenseNo
sourcesNo
updatedYesWhen the token prices were last calculated (ISO 8601, UTC)
age_hoursNoHours from updated to this answer. updated is when the token file was last written, at each of the site's updates; the values are those of date, each UTC day's calculated once, after it ends
companiesYes
sorted_byNoThe order of the rows, when sort or order asked for another than the home page's own
not_listedNoThe list's: the index's companies not listed today, as on no list of the site (each needs a price, a month of history and a value for each change)
trend_noteNoWhat trend holds
methodologyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / company / enum
      Previous value: -[
      -  "Anthropic",
      -  "OpenAI",
      -  "Google",
      -  "xAI",
      -  "Meta",
      -  "Moonshot AI",
      -  "Alibaba",
      -  "DeepSeek",
      -  "Z.ai",
      -  "Xiaomi",
      -  "StepFun",
      -  "MiniMax",
      -  "Mistral",
      -  "Reflection AI",
      -  "NVIDIA",
      -  "Thinking Machines"
      -]New value: +[
      +  "Anthropic",
      +  "OpenAI",
      +  "Google",
      +  "xAI",
      +  "Meta",
      +  "Moonshot AI",
      +  "Alibaba",
      +  "DeepSeek",
      +  "Z.ai",
      +  "Xiaomi",
      +  "StepFun",
      +  "MiniMax",
      +  "Mistral",
      +  "Reflection AI",
      +  "NVIDIA",
      +  "Thinking Machines",
      +  "Tencent",
      +  "inclusionAI"
      +]
    • removedOutput schema / properties / companies / items / properties / bloomberg_tickers
      Removed value: -{
      -  "description": "As the site shows them beside the lab: Bloomberg tickers of benchmark indices for the same lab. Prices on this site are calculated independently and differ from those indices.",
      -  "items": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "type": [
      -    "array",
      -    "null"
      -  ]
      -}
    • removedOutput schema / properties / tickers_note
      Removed value: -{
      -  "type": [
      -    "string",
      -    "null"
      -  ]
      -}
  2. Changed3 schema fields changed
    • addedInput schema / properties / order
      Added value: +{
      +  "description": "With sort: \"asc\" for the smallest first (name: A to Z; rank: 1 up), \"desc\" for the largest first. Without it: rank and name ascending, the others largest first, as the page's headers start.",
      +  "enum": [
      +    "asc",
      +    "desc"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / sort
      Added value: +{
      +  "default": "rank",
      +  "description": "The order of the list's rows, as pressing a column header on the home page orders them: rank (the page's own order, its #, by trend strength), name (A to Z), or price, change_1d, change_1w, change_1m or trend (the signed trend score), each largest first. E.g. sort \"price\", order \"asc\": the cheapest company first; sort \"change_1m\": the largest 1-month rise first. A row without the value comes last.",
      +  "enum": [
      +    "rank",
      +    "name",
      +    "price",
      +    "change_1d",
      +    "change_1w",
      +    "change_1m",
      +    "trend"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / sorted_by
      Added value: +{
      +  "description": "The order of the rows, when sort or order asked for another than the home page's own",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  3. Changed2 schema fields changed
    • addedOutput schema / properties / companies / items / properties / trend
      Added value: +{
      +  "description": "Its price trend over 13 weeks, as the home page's Trend column and # show it",
      +  "properties": {
      +    "direction": {
      +      "description": "The arrow: rising, falling, or flat at a score of 0.0",
      +      "enum": [
      +        "up",
      +        "down",
      +        "flat",
      +        null
      +      ],
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "note": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "per_month_pct": {
      +      "description": "The trend line's speed per month, percent",
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "rank": {
      +      "description": "The home page's #: its place by trend strength among those listed, strongest first, rising or falling",
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "score": {
      +      "description": "The slope of a least-squares line through the logarithms of the index on 13 dates a week apart, over its standard error; negative when falling; none with less than 12 weeks of history",
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "strength": {
      +      "description": "strong: a score of 4 or more either way; moderate: 2 to 4; weak: under 2",
      +      "enum": [
      +        "strong",
      +        "moderate",
      +        "weak",
      +        null
      +      ],
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    }
      +  },
      +  "type": [
      +    "object",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / trend_note
      Added value: +{
      +  "description": "What trend holds",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  4. Changed1 schema field changed
    • changedOutput schema / properties / age_hours / description
      Previous value: -"Hours from updated to this answer: the token prices are calculated once a day, for each UTC day, shortly after it ends"New value: +"Hours from updated to this answer. updated is when the token file was last written, at each of the site's updates; the values are those of date, each UTC day's calculated once, after it ends"
  5. Changed6 schema fields changed
    • addedOutput schema / properties / age_hours
      Added value: +{
      +  "description": "Hours from updated to this answer: the token prices are calculated once a day, for each UTC day, shortly after it ends",
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
    • changedOutput schema / properties / companies / items / properties / errata / description
      Previous value: -"Errors found in these final values. As the page notes them under its value and the status page lists them: each a run of index days. A final value is never changed; the correct one is given when it can be recomputed, and the error is fixed from the next day"New value: +"Errors found in its final values: for one GPU or company, the last year's, as its page notes them under its value; in the list, those in the values its row gives (its latest, and the bases of its changes, which are changes of the values as published). As the page notes them under its value and the status page lists them: each a run of index days. A final value is never changed; the correct one is given when it can be recomputed, and the error is fixed from the next day"
    • addedOutput schema / properties / companies / items / properties / models / description
      Added value: +"Its models in the index: those in OpenRouter's daily top 50, as its page lists them"
    • changedOutput schema / properties / companies / items / properties / models / items / properties / usage_share / description
      Previous value: -"Share of the company's tokens that day (0 to 1)"New value: +"Share of the company's tokens among its models in OpenRouter's daily top 50 (0 to 1): the index's weight"
    • addedOutput schema / properties / fields
      Added value: +{
      +  "description": "One company's: what its models and their figures are",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / not_listed
      Added value: +{
      +  "description": "The list's: the index's companies not listed today, as on no list of the site (each needs a price, a month of history and a value for each change)",
      +  "items": {
      +    "type": [
      +      "string",
      +      "null"
      +    ]
      +  },
      +  "type": [
      +    "array",
      +    "null"
      +  ]
      +}
  6. Changed1 schema field changed
    • addedOutput schema / properties / companies / items / properties / errata
      Added value: +{
      +  "description": "Errors found in these final values. As the page notes them under its value and the status page lists them: each a run of index days. A final value is never changed; the correct one is given when it can be recomputed, and the error is fixed from the next day",
      +  "items": {
      +    "properties": {
      +      "correct": {
      +        "description": "The correct index value (none when it cannot be recomputed)",
      +        "type": [
      +          "number",
      +          "null"
      +        ]
      +      },
      +      "days": {
      +        "description": "Index days in the run",
      +        "type": [
      +          "integer",
      +          "null"
      +        ]
      +      },
      +      "from": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "published": {
      +        "description": "The index value as published those days (none when it differs from day to day)",
      +        "type": [
      +          "number",
      +          "null"
      +        ]
      +      },
      +      "reason": {
      +        "description": "Why it was wrong, as the status page says",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "to": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "url": {
      +        "description": "The status page's Errata",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      }
      +    },
      +    "required": [
      +      "from",
      +      "to",
      +      "days"
      +    ],
      +    "type": [
      +      "object",
      +      "null"
      +    ]
      +  },
      +  "type": [
      +    "array",
      +    "null"
      +  ]
      +}
  7. Changed3 schema fields changed
    • changedOutput schema / properties / companies / items / properties / change_1d_pct / description
      Previous value: -"Percent change from the value 1 day earlier"New value: +"Percent change from the latest value 1 to 4 days earlier (none: interpolated)"
    • changedOutput schema / properties / companies / items / properties / change_1m_pct / description
      Previous value: -"Percent change from the value 30 days earlier"New value: +"Percent change from the latest value 30 to 37 days earlier (none: interpolated)"
    • changedOutput schema / properties / companies / items / properties / change_1w_pct / description
      Previous value: -"Percent change from the value 7 days earlier"New value: +"Percent change from the latest value 7 to 10 days earlier (none: interpolated)"
  8. Changed2 schema fields changed
    • addedOutput schema / properties / companies / items / properties / bloomberg_tickers
      Added value: +{
      +  "description": "As the site shows them beside the lab: Bloomberg tickers of benchmark indices for the same lab. Prices on this site are calculated independently and differ from those indices.",
      +  "items": {
      +    "type": [
      +      "string",
      +      "null"
      +    ]
      +  },
      +  "type": [
      +    "array",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / tickers_note
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  9. Changed6 schema fields changed
    • changedInput schema / properties / company / enum
      Previous value: -[
      -  "Anthropic",
      -  "OpenAI",
      -  "Google",
      -  "xAI",
      -  "Meta",
      -  "Moonshot AI",
      -  "Alibaba",
      -  "DeepSeek",
      -  "Z.ai",
      -  "Xiaomi"
      -]New value: +[
      +  "Anthropic",
      +  "OpenAI",
      +  "Google",
      +  "xAI",
      +  "Meta",
      +  "Moonshot AI",
      +  "Alibaba",
      +  "DeepSeek",
      +  "Z.ai",
      +  "Xiaomi",
      +  "StepFun",
      +  "MiniMax",
      +  "Mistral",
      +  "Reflection AI",
      +  "NVIDIA",
      +  "Thinking Machines"
      +]
    • removedOutput schema / properties / companies / items / properties / models / items / properties / blended_price
      Removed value: -{
      -  "type": [
      -    "number",
      -    "null"
      -  ]
      -}
    • addedOutput schema / properties / companies / items / properties / models / items / properties / cache_read_price
      Added value: +{
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / companies / items / properties / models / items / properties / price
      Added value: +{
      +  "description": "The model's price at the mix, USD per 1M tokens",
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
    • changedOutput schema / properties / companies / items / properties / price / description
      Previous value: -"Latest index value, USD per 1M tokens (3 input : 1 output)"New value: +"Latest index value, USD per 1M tokens at the mix (87% cache read, 12% input, 1% output)"
    • addedOutput schema / properties / companies / items / properties / spend
      Added value: +{
      +  "properties": {
      +    "annualized": {
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "day": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "last_30_days": {
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "last_day": {
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    }
      +  },
      +  "type": [
      +    "object",
      +    "null"
      +  ]
      +}
  10. Changed14 schema fields changed
    • changedOutput schema / properties / companies / items / properties / company / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / companies / items / properties / date / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / companies / items / properties / models / items / properties / model / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / companies / items / properties / models / items / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
    • changedOutput schema / properties / companies / items / properties / models / type
      Previous value: -"array"New value: +[
      +  "array",
      +  "null"
      +]
    • changedOutput schema / properties / companies / items / properties / note / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / companies / items / properties / url / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / companies / items / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
    • changedOutput schema / properties / companies / type
      Previous value: -"array"New value: +[
      +  "array",
      +  "null"
      +]
    • changedOutput schema / properties / license / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / methodology / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / sources / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / unit / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / updated / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
  11. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "companies": {
      +      "items": {
      +        "properties": {
      +          "change_1d_pct": {
      +            "description": "Percent change from the value 1 day earlier",
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "change_1m_pct": {
      +            "description": "Percent change from the value 30 days earlier",
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "change_1w_pct": {
      +            "description": "Percent change from the value 7 days earlier",
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "company": {
      +            "type": "string"
      +          },
      +          "date": {
      +            "description": "The index day (UTC)",
      +            "type": "string"
      +          },
      +          "models": {
      +            "items": {
      +              "properties": {
      +                "blended_price": {
      +                  "type": [
      +                    "number",
      +                    "null"
      +                  ]
      +                },
      +                "input_price": {
      +                  "type": [
      +                    "number",
      +                    "null"
      +                  ]
      +                },
      +                "model": {
      +                  "type": "string"
      +                },
      +                "output_price": {
      +                  "type": [
      +                    "number",
      +                    "null"
      +                  ]
      +                },
      +                "usage_share": {
      +                  "description": "Share of the company's tokens that day (0 to 1)",
      +                  "type": [
      +                    "number",
      +                    "null"
      +                  ]
      +                }
      +              },
      +              "required": [
      +                "model"
      +              ],
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "note": {
      +            "type": "string"
      +          },
      +          "price": {
      +            "description": "Latest index value, USD per 1M tokens (3 input : 1 output)",
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "url": {
      +            "description": "The company's page",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "company",
      +          "price"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "license": {
      +      "type": "string"
      +    },
      +    "methodology": {
      +      "type": "string"
      +    },
      +    "sources": {
      +      "type": "string"
      +    },
      +    "unit": {
      +      "type": "string"
      +    },
      +    "updated": {
      +      "description": "When the token prices were last calculated (ISO 8601, UTC)",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "unit",
      +    "updated",
      +    "companies"
      +  ],
      +  "type": "object"
      +}
  12. First observed

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description adds genuinely non-obvious behavioral context: the index is a usage-weighted composite at a fixed 87/12/1 token mix, it includes derived 13-week trend statistics and ranks, and passing a company unlocks extra fields (usage shares, posted prices, OpenRouter spend). It does not state refresh cadence or what 'today' means, which is the one remaining behavioral gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The tool and its scope are front-loaded, which is good, but the body is a single sprawling sentence that stacks token-mix percentages, weighting, three change windows, four trend statistics, and two rank orderings. The parenthetical restating sort/order duplicates what the schema already documents in more precise terms, so some of the length is not earning its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, return values need not be enumerated, yet the description still gives an accurate mental model of the payload (index value, three change windows, 13-week trend, ranks). For a read-only lookup tool with a fully documented schema, the only material omissions are data freshness and update cadence.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline would be 3, but the description adds meaning beyond the schema by explaining the practical consequences of parameter choices — the sort/order combinations yield 'cheapest first' or 'largest 1-month change first', and supplying a company changes the shape of the response. This goes past restating enum values.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening clause names a specific resource and scope ('Today's AI token prices by company') and immediately defines the unit of measurement (USD per 1M tokens at a stated token mix), so an agent knows exactly what value it gets. It also names the sibling tools it is not (get_model_prices for one model, get_price_history for past values), making the boundary unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states when to use this tool ('what does Claude cost per 1M tokens?', 'which AI company's API is cheapest?') and explicitly routes two adjacent needs to named alternatives. The only gap is that it does not cover the other price siblings (get_provider_prices, get_gpu_prices), but the definition itself supplies enough selection logic without needing an exhaustive catalog.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources