ComparEdge LLM Cost
v1.0.0Token cost math for LLM API calls: verified per-1M-token rates for 69 models, 17 providers.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_providers
List every LLM API provider ComparEdge tracks, with model count, whether a batch API is available, and the cheapest model per provider. BEHAVIOR: Returns every provider we track (OpenAI, Anthropic, Google, DeepSeek, Amazon, Groq, Mistral, xAI, and more), each with its model count and a one-line cheapest-model summary. Prices are USD per 1M tokens. USAGE GUIDELINES: - Use first when the user asks "which providers exist?" or "who sells the cheapest tokens?". - Use before list_models when you want the provider slug to filter by. - No parameters. EXAMPLE QUERIES: "What LLM providers are there?"…
list_models
List LLM models with their per-1M-token input and output prices, cached-input rate where offered, context window, and tier. Optionally filter to one provider. BEHAVIOR: Returns every model (or just one provider's) with id, display name, input/output/cached rates, context window, and tier (flagship, standard, fast, reasoning). The id is what estimate_cost, compare_models_cost, and monthly_budget expect. USAGE GUIDELINES: - Use to find the exact model id before pricing a call. - Pass provider (a slug like "openai", "anthropic", "google") to narrow the list. - Use cheapest_models instead when t…
| Parameter | Type | Description |
|---|---|---|
provider | string | Optional provider slug to filter by (e.g. "openai", "anthropic", "google", "deepseek", "mistral") |
estimate_cost
Estimate the exact dollar cost of one LLM call, or a batch of identical calls, from input and output token counts. Returns a per-call breakdown plus cached-input and batch-API savings where the model supports them. BEHAVIOR: Resolves the model reference (id or display name, fuzzy matched), then computes input_tokens/1M x input_rate + output_tokens/1M x output_rate. Multiplies by calls for a total. If the model offers cached-input pricing or a batch API, it shows those cheaper totals too. USAGE GUIDELINES: - Use whenever the user knows roughly how many tokens a call reads and writes. - A roug…
| Parameter | Type | Description |
|---|---|---|
input_tokens * | number | Number of input (prompt) tokens per call |
model * | string | Model id or name (e.g. "claude-opus-4-8", "GPT-5.5", "gemini-3.1-pro"). Use list_models if unsure. |
output_tokens * | number | Number of output (completion) tokens per call |
calls | number | How many identical calls to price (default: 1) |
compare_models_cost
Price the same call across 2 to 6 models and rank them from cheapest to most expensive, with a multiplier showing how much more each costs than the cheapest option. BEHAVIOR: Resolves each model reference, computes the per-call cost at the given token counts, sorts ascending, and reports each model's cost and its ratio to the cheapest. If any reference cannot be resolved, it says which one and stops so you can correct it. USAGE GUIDELINES: - Use when the user is choosing between named models for a known workload. - Pick the token counts that reflect the real task, not a round guess, so the r…
| Parameter | Type | Description |
|---|---|---|
input_tokens * | number | Input tokens per call, applied to every model |
models * | array | Array of 2 to 6 model ids or names to compare |
output_tokens * | number | Output tokens per call, applied to every model |
cheapest_models
List the cheapest LLM models, optionally filtered to those with at least a given context window. Ranked by a blended input:output rate. BEHAVIOR: Ranks models by a blended per-1M rate weighted 3:1 input to output (most workloads read more than they write), lowest first. min_context filters out models with a smaller context window. Returns the blended rate plus the raw input and output rates so you can sanity-check against your own token split. USAGE GUIDELINES: - Use when the user wants "the cheapest model" without naming candidates. - Pass min_context when the task needs a large window; it…
| Parameter | Type | Description |
|---|---|---|
limit | number | How many models to return (default: 5, max: 30) |
min_context | number | Minimum context window. Pass 200 for 200K, or 200000 for raw tokens (default: no minimum) |
monthly_budget
Project the daily, monthly, and yearly spend for a recurring LLM workload from calls-per-day and average token counts. Includes cached-input and batch-API projections where available. BEHAVIOR: Computes per-call cost from average input and output tokens, then scales to daily (x calls), monthly (x30 days), and yearly (x365) totals, and reports the monthly token volume. Cheaper cached-input and batch paths are shown when the model supports them. USAGE GUIDELINES: - Use for planning a feature that calls an LLM on a steady cadence (per ticket, per user action, per cron run). - avg_input_tokens a…
| Parameter | Type | Description |
|---|---|---|
avg_input_tokens * | number | Average input tokens per call |
avg_output_tokens * | number | Average output tokens per call |
daily_calls * | number | Number of calls per day |
model * | string | Model id or name to budget for |