{"uid":"cap_5ig2kJeRwzE3IyvrJSdKG","slug":"modell-halowerk-com-llm-cost-estimator-fb352155","name":"modell.halowerk.com LLM Cost Estimator","description":"Works out what a call would cost. Give either the text itself or a token count, plus the expected output length, and get input, output, cache-read and cache-write cost per model with the total. Token counts derived from text are estimates from character and word statistics, not a tokeniser, and typically land within about 15 percent — where an exact count matters, count with the vendor tokeniser.","url":"https://modell.halowerk.com/v1/cost-estimate","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text":{"type":"string","maxLength":200000,"description":"The prompt text. Either this or input_tokens."},"batch":{"type":"boolean","default":false,"description":"Apply the batch discount where the model has one."},"calls":{"type":"integer","default":1,"maximum":1000000,"minimum":1,"description":"Number of identical calls to multiply by."},"models":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Model ids to price. All known models if omitted."},"input_tokens":{"type":"integer","maximum":10000000,"minimum":0,"description":"Known input token count. Either this or text."},"output_tokens":{"type":"integer","default":500,"maximum":1000000,"minimum":0,"description":"Expected output length in tokens."},"cached_input_tokens":{"type":"integer","minimum":0,"description":"Of the input tokens, how many are served from cache."}}},"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_eeajqLeFOCAkLWluyerfz","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":"Estimates the total API cost for a given LLM call by computing input, output, cache-read, and cache-write costs across models based on text or token counts.","exampleAgentPrompt":"How much would it cost to send this 5,000-word document as input and get back a 500-token response — give me the input, output, cache-read, and cache-write cost breakdown per model using modell.halowerk's cost estimator?","exampleUseCases":[{"title":"Pre-flight cost check for a long prompt","prompt":"Before I send this 8,000-token system prompt plus user message to the API, can you estimate what the input and output costs will be, assuming a 1,000-token response? Break it down by model so I can pick the cheapest one."},{"title":"Budget planning for a cached RAG pipeline","prompt":"I'm building a RAG pipeline where I'll cache a 50,000-token knowledge base and send 200-token queries expecting 300-token answers. How much will each call cost per model once the cache is warm, including cache-read and cache-write fees?"},{"title":"Comparing model costs for a customer support bot","prompt":"My support bot handles about 500 messages a day, each with a 1,200-token input and 400-token output. Can you estimate the daily cost across different models so I can see which one gives me the best price?"}],"resultDescription":"A breakdown of estimated costs per model including input cost, output cost, cache-read cost, cache-write cost, and total cost. Token counts are estimated from character and word statistics if raw text is provided (within ~15% accuracy), or taken directly if a token count is supplied.","failureModes":["Missing both text and token count — request must supply one or the other","Invalid or unrecognized model name — returns error or excludes that model from results","Negative or zero output length provided — may return validation error","Very short text producing low-confidence token estimates — accuracy degrades below ~15% bound","Network timeout if request payload is extremely large"],"whenToPreferThis":"Use this endpoint when you need a fast, pre-call cost estimate for one or more LLM API calls — especially useful for budget planning, model selection, or pipeline cost analysis. It is ideal when exact tokenization is not critical and a ~15% estimate is acceptable; for exact token counts, tokenize with the vendor's tokenizer first and supply the count directly. Prefer this over the model comparison catalogue endpoint when you have a specific prompt or token count and want cost figures rather than a feature comparison.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:34:12.607Z","isFirstParty":false}