{"uid":"cap_CU2b6cu5o_geF_BKtH7Bt","slug":"agent402-llm-token-cost-estimator-dd9c0ada","name":"Agent402 LLM Token Cost Estimator","description":"Don't burn tokens on deterministic work. Go/no-go jobs first: payout preflight, text firewall (PII/secrets), budget check — then rails, calendars, finmath. x402 USDC on Base. UK + global. agent402.co.uk — not agent402.tools. $0.001–$0.002 USDC on Base. No API keys.","url":"https://agent402.co.uk/v1/utils/token-cost","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"calls":{"type":"string","description":"Number of calls"},"model":{"type":"string","description":"Model id from /utils/model-rates"},"input_tokens":{"type":"string","description":"Input tokens per call"},"output_tokens":{"type":"string","description":"Output tokens per call"},"input_per_mtok":{"type":"string","description":"Override USD/MTok in"},"output_per_mtok":{"type":"string","description":"Override USD/MTok out"}}},"responseSchema":{"type":"json","example":{"valid":true,"total_usd":0.006,"vs_agent402_util_calls":6}},"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_CWF68RjlHt3EsGHNFboqb","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":"Estimates total USD cost for LLM API calls given model, token counts, and number of calls, with comparison to Agent402 utility call cost","exampleAgentPrompt":"How much would it cost in USD to run 500 calls to GPT-4o with 800 input tokens and 300 output tokens each? Also show me how that compares to the cost of 500 agent402 utility calls.","exampleUseCases":[{"title":"Budget LLM pipeline before launch","prompt":"I'm about to run 10,000 calls to Claude 3.5 Sonnet with around 600 input tokens and 200 output tokens per call — what's the total USD cost and how does it stack up against using agent402 utilities instead?"},{"title":"Compare custom model pricing","prompt":"I have a fine-tuned model with custom rates of $2.50 per million input tokens and $8.00 per million output tokens. Estimate the cost for 2,000 calls with 400 input tokens and 150 output tokens each."},{"title":"Spot-check agent workflow spend","prompt":"My agent made 250 calls to GPT-4-turbo with about 1,200 input tokens and 400 output tokens per call — what did that cost me in total USD?"}],"resultDescription":"Returns a JSON object with a validity flag, the total estimated USD cost for the specified number of LLM calls, and a ratio comparing that cost to the equivalent number of Agent402 utility calls at $0.001 each.","failureModes":["Missing required fields (model or token counts) returns validation error","Unknown model ID not found in /utils/model-rates returns error or null result","Non-numeric string values for tokens or calls may cause parse failure","Negative or zero token/call counts may return invalid result","Custom rate overrides with malformed values may be rejected"],"whenToPreferThis":"Use this endpoint when you need a fast, arithmetic estimate of LLM API spend before executing a workflow, or when comparing model costs against fixed-rate utility calls. Prefer it over manual calculation when dealing with multiple models or custom pricing tiers. It is not a real-time billing lookup — use it for pre-flight budgeting and cost-benefit analysis within an agentic pipeline.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:42:06.507Z","isFirstParty":false}