Skip to main content
Glama

AI model API prices

get_model_prices
Read-onlyIdempotent

Each AI model's posted API prices in USD per 1M input, cached input and output tokens and its price at the mix of tokens agents send (the models behind the token index and the Intelligence Index chart's, each with its page), with its usage share and its 1-month change. Give a model (name or page id, e.g. "Claude Opus 5.5" or "kimi-k3") for its daily price history as its page's chart draws it (a name several models share, or a family's name such as "Qwen" or "GLM", answers with each one's prices), or a company to list its models. Every other model OpenRouter prices is on the Every AI model page (https://computescreener.com/models): give its name or id (e.g. "meta-llama/llama-3.3-70b-instruct"), any company on it (e.g. "Cohere"), or every: true to list them, with sort: "price" for the cheapest input price first (sort "output" and order "desc": the dearest by output price). For questions like "what does Claude Sonnet cost per 1M input and output tokens?", "the cheapest AI model API" or "which provider serves a model cheapest" (its name, as the Every AI model page's Cheapest column shows it), or "the cheapest model with a 1M context window" (every: true, min_context: 1000000, sort: "price"): each row carries the model's context window in tokens, the page's Context column. Prices and context only: the pages list no speed or benchmark scores.

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_model_prices"
  }
}

Input Schema

NameRequiredDescriptionDefault
sortNo"price": the cheapest input price first, then output (every model's default); "output": the cheapest output price first; "name": by company and name; "context": the smallest context window first (order "desc": the largest). A company's models otherwise come by usage, as its page lists them.
everyNoList every model on the Every AI model page (/models), not only those with a page.
limitNoHow many models to list (the Every AI model page lists over 300).
modelNoA model's name, a family's name (e.g. "Qwen"), page id or OpenRouter id; omit to list models.
orderNoWith sort: "desc" for the dearest first (e.g. sort "output", order "desc", limit 5: the five dearest by output price).asc
companyNoList only this company's models: one of the token index's companies (Anthropic, OpenAI, Google, xAI, Meta, Moonshot AI, Alibaba, DeepSeek, Z.ai, Xiaomi, StepFun, MiniMax, Mistral, Reflection AI, NVIDIA, Thinking Machines, Tencent, inclusionAI) or any other company on the Every AI model page (e.g. "Cohere", "Amazon").
min_contextNoOnly models whose context window is at least this many tokens (the Every AI model page's Context column), e.g. 1000000 for 1M. Without a company, it lists from every model on that page.

Output Schema

NameRequiredDescriptionDefault
noteNo
unitYes
totalNoHow many models the list has before limit
fieldsNoWhat each figure of a model's row is
modelsYes
licenseNo
sourcesNo
updatedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / company / description
      Previous value: -"List only this company's models: one of the token index's companies (Anthropic, OpenAI, Google, xAI, Meta, Moonshot AI, Alibaba, DeepSeek, Z.ai, Xiaomi, StepFun, MiniMax, Mistral, Reflection AI, NVIDIA, Thinking Machines) or any other company on the Every AI model page (e.g. \"Cohere\", \"Amazon\")."New value: +"List only this company's models: one of the token index's companies (Anthropic, OpenAI, Google, xAI, Meta, Moonshot AI, Alibaba, DeepSeek, Z.ai, Xiaomi, StepFun, MiniMax, Mistral, Reflection AI, NVIDIA, Thinking Machines, Tencent, inclusionAI) or any other company on the Every AI model page (e.g. \"Cohere\", \"Amazon\")."
  2. Changed4 schema fields changed
    • addedInput schema / properties / min_context
      Added value: +{
      +  "description": "Only models whose context window is at least this many tokens (the Every AI model page's Context column), e.g. 1000000 for 1M. Without a company, it lists from every model on that page.",
      +  "maximum": 100000000,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • changedInput schema / properties / sort / description
      Previous value: -"\"price\": the cheapest input price first, then output (every model's default); \"output\": the cheapest output price first; \"name\": by company and name. A company's models otherwise come by usage, as its page lists them."New value: +"\"price\": the cheapest input price first, then output (every model's default); \"output\": the cheapest output price first; \"name\": by company and name; \"context\": the smallest context window first (order \"desc\": the largest). A company's models otherwise come by usage, as its page lists them."
    • changedInput schema / properties / sort / enum
      Previous value: -[
      -  "price",
      -  "output",
      -  "name"
      -]New value: +[
      +  "price",
      +  "output",
      +  "name",
      +  "context"
      +]
    • addedOutput schema / properties / models / items / properties / context_tokens
      Added value: +{
      +  "description": "Its context window in tokens (the Every AI model page's Context)",
      +  "type": [
      +    "integer",
      +    "null"
      +  ]
      +}
  3. Changed3 schema fields changed
    • addedInput schema / properties / order
      Added value: +{
      +  "default": "asc",
      +  "description": "With sort: \"desc\" for the dearest first (e.g. sort \"output\", order \"desc\", limit 5: the five dearest by output price).",
      +  "enum": [
      +    "asc",
      +    "desc"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / sort / description
      Previous value: -"\"price\": the cheapest input price first, then output (every model's default); \"name\": by company and name. A company's models otherwise come by usage, as its page lists them."New value: +"\"price\": the cheapest input price first, then output (every model's default); \"output\": the cheapest output price first; \"name\": by company and name. A company's models otherwise come by usage, as its page lists them."
    • changedInput schema / properties / sort / enum
      Previous value: -[
      -  "price",
      -  "name"
      -]New value: +[
      +  "price",
      +  "output",
      +  "name"
      +]
  4. Changed2 schema fields changed
    • changedInput schema / properties / model / description
      Previous value: -"A model's name, page id or OpenRouter id; omit to list models."New value: +"A model's name, a family's name (e.g. \"Qwen\"), page id or OpenRouter id; omit to list models."
    • changedOutput schema / properties / models / items / properties / usage_share / description
      Previous value: -"Share of the company's tokens that day (0 to 1); null outside the index"New value: +"Share of the company's tokens among its models in OpenRouter's daily top 50 (0 to 1), the index's weight; null outside the index"
  5. Changed1 schema field changed
    • addedOutput schema / properties / models / items / properties / errata
      Added value: +{
      +  "description": "Errors found in the final values of its company's index on days the model's prices were wrong. 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"
      +        ]
      +      },
      +      "index": {
      +        "description": "The index whose values were wrong (the model's company)",
      +        "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"
      +  ]
      +}
  6. Changed8 schema fields changed
    • changedInput schema / properties / sort / description
      Previous value: -"\"price\": the cheapest at the mix first (every model's default); \"name\": by company and name. A company's models otherwise come by usage, as its page lists them."New value: +"\"price\": the cheapest input price first, then output (every model's default); \"name\": by company and name. A company's models otherwise come by usage, as its page lists them."
    • removedOutput schema / properties / models / items / properties / list_price
      Removed value: -{
      -  "description": "3 input : 1 output, USD per 1M tokens (break-even throughput uses it)",
      -  "type": [
      -    "number",
      -    "null"
      -  ]
      -}
    • removedOutput schema / properties / models / items / properties / lowest_price
      Removed value: -{
      -  "description": "The lowest provider's price at the mix, USD per 1M tokens",
      -  "type": [
      -    "number",
      -    "null"
      -  ]
      -}
    • addedOutput schema / properties / models / items / properties / lowest_provider / description
      Added value: +"The cheapest provider serving it (the Every AI model page's Cheapest)"
    • changedOutput schema / properties / models / items / properties / price / description
      Previous value: -"USD per 1M tokens at the mix (87% cache read, 12% input, 1% output)"New value: +"USD per 1M tokens at the mix (87% cache read, 12% input, 1% output), as the model's own page shows it (models with a page only)"
    • removedOutput schema / properties / models / items / properties / priced_by
      Removed value: -{
      -  "description": "company: its maker's own price; providers: the median of the providers serving it",
      -  "type": [
      -    "string",
      -    "null"
      -  ]
      -}
    • changedOutput schema / properties / models / items / properties / providers / description
      Previous value: -"Providers serving it at a standard price"New value: +"Providers serving it (the Every AI model page's Providers)"
    • removedOutput schema / properties / models / items / properties / source_url
      Removed value: -{
      -  "description": "Where its prices can be checked",
      -  "type": [
      -    "string",
      -    "null"
      -  ]
      -}
  7. Changed7 schema fields changed
    • changedInput schema / properties / company / description
      Previous value: -"List only this company's models."New value: +"List only this company's models: one of the token index's companies (Anthropic, OpenAI, Google, xAI, Meta, Moonshot AI, Alibaba, DeepSeek, Z.ai, Xiaomi, StepFun, MiniMax, Mistral, Reflection AI, NVIDIA, Thinking Machines) or any other company on the Every AI model page (e.g. \"Cohere\", \"Amazon\")."
    • removedInput schema / properties / company / enum
      Removed value: -[
      -  "Anthropic",
      -  "OpenAI",
      -  "Google",
      -  "xAI",
      -  "Meta",
      -  "Moonshot AI",
      -  "Alibaba",
      -  "DeepSeek",
      -  "Z.ai",
      -  "Xiaomi",
      -  "StepFun",
      -  "MiniMax",
      -  "Mistral",
      -  "Reflection AI",
      -  "NVIDIA",
      -  "Thinking Machines"
      -]
    • addedInput schema / properties / limit
      Added value: +{
      +  "default": 50,
      +  "description": "How many models to list (the Every AI model page lists over 300).",
      +  "maximum": 400,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / sort
      Added value: +{
      +  "description": "\"price\": the cheapest at the mix first (every model's default); \"name\": by company and name. A company's models otherwise come by usage, as its page lists them.",
      +  "enum": [
      +    "price",
      +    "name"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / fields
      Added value: +{
      +  "description": "What each figure of a model's row is",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / note
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / total
      Added value: +{
      +  "description": "How many models the list has before limit",
      +  "type": [
      +    "integer",
      +    "null"
      +  ]
      +}
  8. Changed7 schema fields changed
    • addedInput schema / properties / every
      Added value: +{
      +  "description": "List every model on the Every AI model page (/models), not only those with a page.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / model / description
      Previous value: -"A model's name or page id; omit to list models."New value: +"A model's name, page id or OpenRouter id; omit to list models."
    • addedOutput schema / properties / models / items / properties / lowest_price
      Added value: +{
      +  "description": "The lowest provider's price at the mix, USD per 1M tokens",
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / models / items / properties / lowest_provider
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / models / items / properties / priced_by
      Added value: +{
      +  "description": "company: its maker's own price; providers: the median of the providers serving it",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / models / items / properties / providers
      Added value: +{
      +  "description": "Providers serving it at a standard price",
      +  "type": [
      +    "integer",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / models / items / properties / source_url
      Added value: +{
      +  "description": "Where its prices can be checked",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  9. Changed13 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 / models / items / properties / blended_price
      Removed value: -{
      -  "description": "3 input : 1 output, USD per 1M tokens",
      -  "type": [
      -    "number",
      -    "null"
      -  ]
      -}
    • addedOutput schema / properties / models / items / properties / cache_read_price
      Added value: +{
      +  "description": "Posted USD per 1M cached input tokens (the input price where none is posted)",
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
    • changedOutput schema / properties / models / items / properties / change_1m_pct / description
      Previous value: -"Blended price change over 30 days, percent"New value: +"Change of its price at the mix over 1 month, percent (its page's 1M)"
    • removedOutput schema / properties / models / items / properties / changes
      Removed value: -{
      -  "items": {
      -    "properties": {
      -      "date": {
      -        "type": [
      -          "string",
      -          "null"
      -        ]
      -      },
      -      "input_price": {
      -        "type": [
      -          "number",
      -          "null"
      -        ]
      -      },
      -      "output_price": {
      -        "type": [
      -          "number",
      -          "null"
      -        ]
      -      }
      -    },
      -    "type": [
      -      "object",
      -      "null"
      -    ]
      -  },
      -  "type": [
      -    "array",
      -    "null"
      -  ]
      -}
    • removedOutput schema / properties / models / items / properties / history / items / properties / input_price
      Removed value: -{
      -  "type": [
      -    "number",
      -    "null"
      -  ]
      -}
    • removedOutput schema / properties / models / items / properties / history / items / properties / output_price
      Removed value: -{
      -  "type": [
      -    "number",
      -    "null"
      -  ]
      -}
    • addedOutput schema / properties / models / items / properties / history / items / properties / price
      Added value: +{
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
    • removedOutput schema / properties / models / items / properties / history / items / properties / usage_share
      Removed value: -{
      -  "type": [
      -    "number",
      -    "null"
      -  ]
      -}
    • removedOutput schema / properties / models / items / properties / last_change
      Removed value: -{
      -  "description": "Last day its posted prices changed",
      -  "type": [
      -    "string",
      -    "null"
      -  ]
      -}
    • addedOutput schema / properties / models / items / properties / list_price
      Added value: +{
      +  "description": "3 input : 1 output, USD per 1M tokens (break-even throughput uses it)",
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / models / items / properties / price
      Added value: +{
      +  "description": "USD per 1M tokens at the mix (87% cache read, 12% input, 1% output)",
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
    • changedOutput schema / 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 that day (0 to 1); null outside the index"
  10. Changed16 schema fields changed
    • changedOutput schema / properties / license / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / models / items / properties / changes / items / properties / date / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / models / items / properties / changes / items / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
    • changedOutput schema / properties / models / items / properties / changes / type
      Previous value: -"array"New value: +[
      +  "array",
      +  "null"
      +]
    • changedOutput schema / properties / models / items / properties / company / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / models / items / properties / date / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / models / items / properties / history / items / properties / date / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / models / items / properties / history / items / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
    • changedOutput schema / properties / models / items / properties / history / type
      Previous value: -"array"New value: +[
      +  "array",
      +  "null"
      +]
    • changedOutput schema / properties / models / items / properties / model / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / models / items / properties / url / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / models / items / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
    • changedOutput schema / properties / models / type
      Previous value: -"array"New value: +[
      +  "array",
      +  "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. Added

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive, closed-world, so the safety bar is low; the description adds real context: the data scope is prices and context only, with no speed or benchmark scores, the Every AI model page holds 300+ models, and giving a shared or family name yields each model's prices rather than a single answer. It does not discuss rate limits or currency conversion, but nothing essential is omitted.

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 content is on-topic, but it is delivered as long, heavily parenthesized run-on sentences that bury the primary purpose behind page and chart references. Information is front-loaded in spirit but the nested clauses force re-reading.

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

Completeness5/5

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

Seven optional parameters, an output schema, and 100% schema coverage mean the description's job is mostly example routing and scope, both of which it delivers: family names, OpenRouter ids, every/min_context/sort combinations, and the explicit limitation to prices and context.

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 coverage is 100%, so baseline is 3; the description still adds value by tying parameters to observable columns and defaults ('the page's Context column', provider shown as the Cheapest column, a company's models otherwise come by usage as its page lists them) and by pairing sort: "output" with order: "desc" in a worked example.

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

Purpose4/5

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

States a specific verb+resource (posted API prices per 1M input, cached input and output tokens) plus the token-mix price, usage share and 1-month change, and mentions returning a daily price history when a model is given. It is clear what the tool returns, but it never names or contrasts the sibling tools that appear to cover similar pricing/history territory, so an agent must infer routing.

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

Usage Guidelines4/5

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

Strong on when-to-use: several concrete example questions are mapped to parameter choices ('the cheapest model with a 1M context window' -> every: true, min_context: 1000000, sort: "price"), and it explains that the Every AI model page is where models without their own page live. No explicit when-not-to-use or statement about the price-history siblings, so it stops short of a 5.

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