{"uid":"cap__vf1OSyWqfQoQnHLMP_k4","slug":"freetier-agent-api-ai-model-cost-calculator-7972cdcc","name":"FreeTier Agent API — AI Model Cost Calculator","description":"Pay-per-call data API for AI agents: AI model prices and cost calculator, 4,259 MCP servers, email domain checks, text-to-JSON extraction, country/holiday/currency lookup, page and link checks, page-to-markdown, 2,230 verified APIs. x402, USDC on Base, no signup. Sources cited in every response.","url":"https://freetier-agent-api.pages.dev/api/llm-cost?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":[],"properties":{"text":{"type":"string"},"calls":{"type":"string"},"models":{"type":"string"},"input_tokens":{"type":"string"},"output_tokens":{"type":"string"}}}}},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"calls":1000,"results":[{"model":"openai/gpt-4o-mini","total_usd":0.36,"cost_per_call_usd":0.00036}],"input_tokens":1200,"output_tokens":300}},"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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_YczzpHg6Ry7SDyOphXgzD","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Calculates the estimated USD cost of running AI model inference for a given number of calls, input tokens, and output tokens across specified models","exampleAgentPrompt":"How much would it cost me to run openai/gpt-4o-mini for 1000 calls with 1200 input tokens and 300 output tokens each?","exampleUseCases":[{"title":"Budget planning for AI agent fleet","prompt":"I'm building an agent that will make about 5000 calls a day to openai/gpt-4o-mini with roughly 800 input tokens and 200 output tokens each — how much will that cost me per day in USD?"},{"title":"Comparing model costs before deployment","prompt":"Can you compare the total cost of running 2000 calls on openai/gpt-4o versus anthropic/claude-3-5-sonnet with 1000 input tokens and 500 output tokens per call so I can pick the cheaper one?"},{"title":"Estimating LLM spend for a specific project","prompt":"I need to estimate the cost of processing 10000 calls using google/gemini-flash with 600 input tokens and 150 output tokens each — what's the total USD cost and cost per call?"}],"resultDescription":"Returns a JSON object with the number of calls, a list of model results each containing the model name, total cost in USD, and cost per call in USD, plus the input and output token counts used in the calculation.","failureModes":["Missing required 'models' parameter results in empty or error response","Invalid or unrecognized model name may return no results or zero cost","Non-numeric values for calls, input_tokens, or output_tokens may cause computation errors","Stale model pricing data may not reflect the latest provider price changes"],"whenToPreferThis":"Use this endpoint when you need a quick, programmatic, pay-per-call cost estimate for specific AI models without signing up for any service. It is ideal for agents that need to self-evaluate inference costs, compare models by price, or project budgets. Prefer this over scraping provider pricing pages or maintaining your own pricing database.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-18T12:30:02.516Z","isFirstParty":false,"canonicalSlug":"freetier-agent-api-ai-model-cost-calculator-7972cdcc"}