{"uid":"cap_Uy6CXxUHlKMh1_7rlbywq","slug":"agenttools-llm-cost-calculator-3c2a7dd8","name":"AgentTools 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.","url":"https://agenttools-hub.vercel.app/api/v1/dev/llm-cost-calculator?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["inputTokens"],"properties":{"calls":{"type":"number","description":"Number of calls"},"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","description":"Model"},"inputTokens":{"type":"number","description":"Input tokens"},"outputTokens":{"type":"number","description":"Output tokens"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_K12H2AurJmWmb41mTKzbk","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Calculates the USD cost of an LLM API call by multiplying input and output token counts by published per-million-token prices for 15 current models across OpenAI, Anthropic, Google, DeepSeek, xAI, and Meta.","exampleAgentPrompt":"How much would 500 calls to gpt-4o cost if each call uses 800 input tokens and 300 output tokens? Give me the total in USD.","exampleUseCases":[{"title":"Monthly LLM budget estimation","prompt":"I'm planning to run 20,000 calls to claude-sonnet-4 this month, each with roughly 1200 input tokens and 400 output tokens — what will that cost me in total?"},{"title":"Model cost comparison for app launch","prompt":"What's the per-call USD cost for gemini-2.5-flash with 600 input tokens and 200 output tokens? I want to compare it against gpt-4.1-mini with the same token counts."},{"title":"Spot-check a single expensive LLM call","prompt":"How much did that one claude-opus-4 call just cost me? It had 4500 input tokens and 1800 output tokens."}],"resultDescription":"Returns the calculated USD cost for the specified LLM model call, based on published per-million-token prices for input and output tokens respectively. Includes the per-call cost and, when a call count is provided, the estimated total cost across all calls.","failureModes":["Missing required inputTokens parameter returns a 400 error","Unsupported model name not in the enum list returns a validation error","Non-numeric token or call count values cause a bad request error","Network timeout or service unavailability on the Vercel deployment"],"whenToPreferThis":"Use this endpoint when an agent needs to compute or estimate the monetary cost of LLM API calls using official published pricing for specific named models. Prefer it over manual lookups when you need a quick, accurate cost figure for budgeting, billing estimation, or model comparison across the 15 supported models (OpenAI, Anthropic, Google, DeepSeek, xAI, Meta).","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T12:43:08.253Z","isFirstParty":false,"canonicalSlug":"agenttools-llm-cost-calculator-3c2a7dd8"}