{
  "x402Version": 2,
  "id": 35426,
  "slug": "35426",
  "resource": "https://agentstoolshub.com/api/v1/dev/llm-cost-calculator",
  "description": "Calculate the API cost of an LLM call: input and output tokens × published per-million prices for 15 current models (OpenAI, Anthropic, Google, DeepSeek, xAI, Meta). Batch multiplier included for monthly estimates. Use this when an agent needs to tokens × current per-model prices = USD.",
  "type": "http",
  "serviceName": "AgentTools",
  "resourceType": "AI Inference",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0x8a0F2b0a6C82D1c54B16E2e4DEcd18fF0802b0f6",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "2000",
      "amountUsd": 0.002,
      "maxTimeoutSeconds": 300
    }
  ],
  "outputSchema": {
    "properties": {
      "example": {
        "type": "object"
      },
      "type": {
        "type": "string"
      }
    },
    "required": [
      "type"
    ],
    "type": "object"
  },
  "extensions": {
    "analytics": {},
    "bazaar": {
      "info": {
        "input": {
          "method": "GET",
          "queryParams": {
            "calls": 1,
            "inputTokens": 12000,
            "model": "gpt-4o",
            "outputTokens": 1500
          },
          "type": "http"
        },
        "output": {
          "example": {
            "result": {
              "answer": "$0.0450",
              "answerLabel": "Cost — OpenAI gpt-4o",
              "details": [
                {
                  "label": "Input cost",
                  "value": "$0.030000 (12,000 tok × $2.5/M)"
                },
                {
                  "label": "Output cost",
                  "value": "$0.015000 (1,500 tok × $10/M)"
                },
                {
                  "label": "Per call",
                  "value": "$0.045000"
                },
                {
                  "label": "Projected monthly (1 call/day)",
                  "value": "$1.3500"
                }
              ],
              "steps": [
                "input: 12,000 ÷ 1e6 × $2.5",
                "output: 1,500 ÷ 1e6 × $10",
                "× 1 call(s) = total"
              ],
              "table": {
                "columns": [
                  "Model",
                  "Vendor",
                  "$/M input",
                  "$/M output"
                ],
                "rows": [
                  [
                    "gpt-5",
                    "OpenAI",
                    1.25,
                    10
                  ],
                  [
                    "gpt-5-mini",
                    "OpenAI",
                    0.25,
                    2
                  ],
                  [
                    "gpt-4.1",
                    "OpenAI",
                    2,
                    8
                  ],
                  [
                    "gpt-4.1-mini",
                    "OpenAI",
                    0.4,
                    1.6
                  ],
                  [
                    "gpt-4o",
                    "OpenAI",
                    2.5,
                    10
                  ],
                  [
                    "o4-mini",
                    "OpenAI",
                    1.1,
                    4.4
                  ],
                  [
                    "claude-opus-4",
                    "Anthropic",
                    15,
                    75
                  ],
                  [
                    "claude-sonnet-4",
                    "Anthropic",
                    3,
                    15
                  ],
                  [
                    "claude-haiku-4",
                    "Anthropic",
                    0.8,
                    4
                  ],
                  [
                    "gemini-2.5-pro",
                    "Google",
                    1.25,
                    10
                  ],
                  [
                    "gemini-2.5-flash",
                    "Google",
                    0.3,
                    2.5
                  ],
                  [
                    "gemini-2.0-flash",
                    "Google",
                    0.1,
                    0.4
                  ],
                  [
                    "deepseek-v3",
                    "DeepSeek",
                    0.27,
                    1.1
                  ],
                  [
                    "grok-3",
                    "xAI",
                    3,
                    15
                  ],
                  [
                    "llama-4-maverick",
                    "Meta",
                    0.22,
                    0.88
                  ]
                ]
              },
              "value": 0.045
            },
            "tool": "llm-cost-calculator"
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "method": {
                "enum": [
                  "GET"
                ],
                "type": "string"
              },
              "queryParams": {
                "properties": {
                  "calls": {
                    "description": "Number of calls",
                    "type": "number"
                  },
                  "inputTokens": {
                    "description": "Input tokens",
                    "type": "number"
                  },
                  "model": {
                    "description": "Model",
                    "enum": [
                      "gpt-5",
                      "gpt-5-mini",
                      "gpt-4.1",
                      "gpt-4.1-mini",
                      "gpt-4o",
                      "o4-mini",
                      "claude-opus-4",
                      "claude-sonnet-4",
                      "claude-haiku-4",
                      "gemini-2.5-pro",
                      "gemini-2.5-flash",
                      "gemini-2.0-flash",
                      "deepseek-v3",
                      "grok-3",
                      "llama-4-maverick"
                    ],
                    "type": "string"
                  },
                  "outputTokens": {
                    "description": "Output tokens",
                    "type": "number"
                  }
                },
                "required": [
                  "inputTokens"
                ],
                "type": "object"
              },
              "type": {
                "const": "http",
                "type": "string"
              }
            },
            "required": [
              "type",
              "method"
            ],
            "type": "object"
          },
          "output": {
            "properties": {
              "example": {
                "type": "object"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          }
        },
        "required": [
          "input"
        ],
        "type": "object"
      }
    }
  },
  "tags": [
    "dev",
    "crypto-dev",
    "analytics",
    "bazaar"
  ],
  "sourceHost": "agentstoolshub.com",
  "lastUpdated": "2026-10-11T22:54:14.747Z",
  "quality": {
    "calls30d": 2,
    "uniquePayers30d": 2,
    "lastCalledAt": "2026-10-11T22:54:14.584Z"
  },
  "metadata": {
    "serviceName": "AgentTools",
    "extensions": {
      "analytics": {},
      "bazaar": {
        "info": {
          "input": {
            "method": "GET",
            "queryParams": {
              "calls": 1,
              "inputTokens": 12000,
              "model": "gpt-4o",
              "outputTokens": 1500
            },
            "type": "http"
          },
          "output": {
            "example": {
              "result": {
                "answer": "$0.0450",
                "answerLabel": "Cost — OpenAI gpt-4o",
                "details": [
                  {
                    "label": "Input cost",
                    "value": "$0.030000 (12,000 tok × $2.5/M)"
                  },
                  {
                    "label": "Output cost",
                    "value": "$0.015000 (1,500 tok × $10/M)"
                  },
                  {
                    "label": "Per call",
                    "value": "$0.045000"
                  },
                  {
                    "label": "Projected monthly (1 call/day)",
                    "value": "$1.3500"
                  }
                ],
                "steps": [
                  "input: 12,000 ÷ 1e6 × $2.5",
                  "output: 1,500 ÷ 1e6 × $10",
                  "× 1 call(s) = total"
                ],
                "table": {
                  "columns": [
                    "Model",
                    "Vendor",
                    "$/M input",
                    "$/M output"
                  ],
                  "rows": [
                    [
                      "gpt-5",
                      "OpenAI",
                      1.25,
                      10
                    ],
                    [
                      "gpt-5-mini",
                      "OpenAI",
                      0.25,
                      2
                    ],
                    [
                      "gpt-4.1",
                      "OpenAI",
                      2,
                      8
                    ],
                    [
                      "gpt-4.1-mini",
                      "OpenAI",
                      0.4,
                      1.6
                    ],
                    [
                      "gpt-4o",
                      "OpenAI",
                      2.5,
                      10
                    ],
                    [
                      "o4-mini",
                      "OpenAI",
                      1.1,
                      4.4
                    ],
                    [
                      "claude-opus-4",
                      "Anthropic",
                      15,
                      75
                    ],
                    [
                      "claude-sonnet-4",
                      "Anthropic",
                      3,
                      15
                    ],
                    [
                      "claude-haiku-4",
                      "Anthropic",
                      0.8,
                      4
                    ],
                    [
                      "gemini-2.5-pro",
                      "Google",
                      1.25,
                      10
                    ],
                    [
                      "gemini-2.5-flash",
                      "Google",
                      0.3,
                      2.5
                    ],
                    [
                      "gemini-2.0-flash",
                      "Google",
                      0.1,
                      0.4
                    ],
                    [
                      "deepseek-v3",
                      "DeepSeek",
                      0.27,
                      1.1
                    ],
                    [
                      "grok-3",
                      "xAI",
                      3,
                      15
                    ],
                    [
                      "llama-4-maverick",
                      "Meta",
                      0.22,
                      0.88
                    ]
                  ]
                },
                "value": 0.045
              },
              "tool": "llm-cost-calculator"
            },
            "type": "json"
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "input": {
              "additionalProperties": false,
              "properties": {
                "method": {
                  "enum": [
                    "GET"
                  ],
                  "type": "string"
                },
                "queryParams": {
                  "properties": {
                    "calls": {
                      "description": "Number of calls",
                      "type": "number"
                    },
                    "inputTokens": {
                      "description": "Input tokens",
                      "type": "number"
                    },
                    "model": {
                      "description": "Model",
                      "enum": [
                        "gpt-5",
                        "gpt-5-mini",
                        "gpt-4.1",
                        "gpt-4.1-mini",
                        "gpt-4o",
                        "o4-mini",
                        "claude-opus-4",
                        "claude-sonnet-4",
                        "claude-haiku-4",
                        "gemini-2.5-pro",
                        "gemini-2.5-flash",
                        "gemini-2.0-flash",
                        "deepseek-v3",
                        "grok-3",
                        "llama-4-maverick"
                      ],
                      "type": "string"
                    },
                    "outputTokens": {
                      "description": "Output tokens",
                      "type": "number"
                    }
                  },
                  "required": [
                    "inputTokens"
                  ],
                  "type": "object"
                },
                "type": {
                  "const": "http",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "method"
              ],
              "type": "object"
            },
            "output": {
              "properties": {
                "example": {
                  "type": "object"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            }
          },
          "required": [
            "input"
          ],
          "type": "object"
        }
      }
    }
  },
  "liveness": {
    "reliability": null
  },
  "verified": false,
  "featured": false,
  "provider": {
    "host": "agentstoolshub.com",
    "manifest_name": "agentstoolshub.com",
    "source": "cdp-mirror",
    "source_manifest_url": "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources",
    "submitted_at": "2026-10-14T01:15:01.050Z"
  },
  "exampleResponse": {
    "example": {},
    "type": "string"
  }
}