{"uid":"cap_WAl6J5xuaHosycfFLW-zl","slug":"llm-cost-capacity-calc-model-ranker-a1893ebc","name":"LLM Cost & Capacity Calc – Model Ranker","description":"Rank 2 to 20 models by cost for a workload from your own prices; flags models whose context window is too small.","url":"https://llm-cost-calc.x402tookit.com/model-compare?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":["models","inputTokens","outputTokens"],"properties":{"models":{"type":"string","description":"JSON array of {name, inputPricePerMTok, outputPricePerMTok, contextWindow?}"},"requests":{"type":"integer","description":"Number of requests (default 1000)"},"inputTokens":{"type":"number","description":"Input tokens per request"},"outputTokens":{"type":"number","description":"Output tokens per request"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"asOf":{"type":["null","string"]},"ranked":{"type":["array","null"],"items":{"type":"object","properties":{"name":{"type":["null","string"]},"totalCost":{"type":["null","number"]},"fitsContext":{"type":["boolean","null"]},"contextWindow":{"type":["null","number"]},"costPerRequest":{"type":["null","number"]}}}},"source":{"type":["null","string"]},"reasons":{"type":["array","null"]},"summary":{"type":["null","string"]},"verdict":{"type":["null","string"]},"cheapest":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"requests":{"type":["null","number"]},"disclaimer":{"type":["null","string"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"tokensPerRequest":{"type":["null","number"]}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_BSj46wn-pxcJJ1KvfPBTP","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Ranks 2–20 LLM models by total cost for a given workload using caller-supplied prices, and flags models whose context window is too small.","exampleAgentPrompt":"Compare these three models for a workload of 1000 requests with 800 input tokens and 300 output tokens each — GPT-4o at $5/$15 per million tokens with a 128k context window, Claude 3.5 Sonnet at $3/$15 with a 200k context window, and Gemini 1.5 Pro at $1.25/$5 with a 1M context window — and tell me which is cheapest and which ones fit the context window.","exampleUseCases":[{"title":"Picking cheapest model for a chatbot","prompt":"I'm building a customer support chatbot that sends about 2000 requests a day with roughly 600 input tokens and 200 output tokens per turn. Compare GPT-4o at $5/$15 per million tokens, Claude Haiku at $0.25/$1.25, and Gemini Flash at $0.075/$0.30 — all with context windows over 100k — and rank them by total cost."},{"title":"Context window eligibility check for long docs","prompt":"I need to process legal documents that require about 80,000 input tokens and 2,000 output tokens per request, 500 requests total. Rank these models by cost and tell me which ones actually have a large enough context window: Claude 3 Opus at $15/$75 with 200k context, GPT-4 Turbo at $10/$30 with 128k context, and Mistral Large at $8/$24 with 32k context."},{"title":"Budget-driven model selection for a startup","prompt":"We're on a tight budget and running 50,000 requests per month with 400 input and 150 output tokens each. Can you rank Llama 3 70B at $0.59/$0.79, Mixtral 8x7B at $0.27/$0.27, and GPT-3.5 Turbo at $0.50/$1.50 — all per million tokens with 32k context windows — by total monthly cost?"}],"resultDescription":"Returns a ranked array of models sorted by total cost, each with total cost, cost per request, context window size, and a boolean flag indicating whether the model's context window fits the workload. Also includes a summary verdict, the name of the cheapest model, reasons for the ranking, and optional disclaimers.","failureModes":["Missing required parameters (models, inputTokens, outputTokens) returns an error","Malformed JSON in the models array causes a parse error","Models array with fewer than 2 entries may return an incomplete ranking","Invalid or negative token counts may produce unexpected results","Context window field omitted from a model entry means no context fit check is performed for that model"],"whenToPreferThis":"Use this endpoint when you need to compare multiple LLM models side-by-side on cost using your own negotiated or published prices, especially when context window fit is also a concern. Prefer this over single-model cost calculators when the goal is to select the best model from a candidate list rather than just compute spend for a known model.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T13:14:24.826Z","isFirstParty":false,"canonicalSlug":"llm-cost-capacity-calc-model-ranker-a1893ebc"}