{"uid":"cap_Os2UFA9tRRREYXnVg-Ek1","slug":"agenttools-llm-cost-calculator-48527df9","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://agentstoolshub.com/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.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_jljhs10Ct5pdH8wJ9hOPv","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","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 it cost to call claude-sonnet-4 with 3000 input tokens and 800 output tokens? I want to know the USD price for a single call.","exampleUseCases":[{"title":"Budget check before deploying agent","prompt":"I'm about to run my AI agent in production using gpt-4o — each call uses roughly 1500 input tokens and 400 output tokens. How much will a single call cost me?"},{"title":"Monthly bill estimate for batch pipeline","prompt":"I'm running a nightly batch job that makes 50000 calls to gemini-2.5-flash each month, with about 800 input tokens and 200 output tokens per call. What's my estimated monthly API cost?"},{"title":"Model cost comparison for budget planning","prompt":"What does one call to grok-3 cost if I use 2000 input tokens and 1000 output tokens? I'm trying to decide between models based on price."}],"resultDescription":"Returns the calculated USD cost for the specified LLM call, broken down by input token cost, output token cost, and total cost, based on current published per-million-token prices for the selected model. If multiple calls are specified, includes a total estimate.","failureModes":["Missing required inputTokens parameter returns a validation error","Unsupported or misspelled model name returns an enum validation error","Negative or non-numeric token counts may cause a 400 bad request","Network or upstream pricing data unavailability returns a 5xx error"],"whenToPreferThis":"Use this endpoint when you need a fast, accurate USD cost estimate for a specific LLM model call using current published pricing. It covers 15 models across all major providers (OpenAI, Anthropic, Google, DeepSeek, xAI, Meta) in a single call, making it ideal for cost-aware agents, budget planning tools, or monthly spend estimators — without having to hardcode or maintain pricing tables yourself.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-12T12:30:02.550Z","isFirstParty":false,"canonicalSlug":"agenttools-llm-cost-calculator-48527df9"}