ModelCostComparison

v1.0.1
io.github.Lazige/modelcostcomparison Checked 4 days ago Published 2 months ago

Find AI model pricing, estimate token costs and compare offers.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_models

Use first when you know a model name or provider but need exact pricing-offer IDs for pricing or calculations. Search recorded labels and API IDs; case, spacing and punctuation variants are accepted. Multiple tariffs are returned as separate choices. Defaults to current reviewed offers; check costing_supported before calculating. This discovers pricing offers, not model capability recommendations.

ParameterTypeDescription
cursorstringOpaque next_cursor returned by list_models. Omit on the first page; on later pages repeat the original filters and limit unchanged. Restart without a cursor if it expires or the dataset changes.
limitintegerMaximum offers per page to return: 1–50; default 20.
pricing_tierstringOptional exact tariff name from offer identity, such as standard or peak. Use to restrict results to a tariff; omit to include all tariffs.
provider_idstringOptional exact provider_id returned by list_providers or offer identity. Use to restrict results to one provider; omit for all providers.
querystringOptional model name, recorded label or API ID to search. Use when the exact offer ID is unknown; omit to browse. Matching tolerates case, spacing and punctuation differences.
statusstringUse current (default) for reviewed offers. Choose expired, unreviewed or all only to inspect catalogue records; those records may not support calculations.

get_model_pricing

Use after list_models when you need the rates, tariff identity, sources and freshness of one exact offer, without calculating a workload. Supply the returned model_id. Prices are recorded USD text-token rates; expired or unreviewed rates are informational only. Use calculate_cost for a workload estimate.

ParameterTypeDescription
model_id *stringExact pricing-offer ID returned by list_models or find_cheapest_models. Do not substitute a display name or guessed API model name.

calculate_cost

Use when you have one exact offer ID and token usage and want its USD text-token subtotal. Discover the ID with list_models first. Total input includes cached input; do not add cached tokens twice. Excludes cache writes, storage, search, tool fees and taxes. Requires current reviewed, supported rates; does not invoke a model. Use compare_model_costs for several known offers.

ParameterTypeDescription
model_id *stringExact pricing-offer ID returned by list_models or find_cheapest_models. Do not substitute a display name or guessed API model name.
usage *objectToken totals for the period or scenario being estimated, not dollars or request counts. Supply input and output separately; cached input is a subset of total input.
expected_dataset_revisionstringOptional consistency check: copy meta.dataset_revision from a prior tool response to require the same current pricing snapshot. Omit to use the current snapshot. A mismatch returns DATASET_CHANGED; re…

compare_model_costs

Use when you already have 2–20 exact offer IDs and want their USD text-token subtotals for the same usage and pricing snapshot. Equal token counts are a comparison assumption, not equivalent tokenization of the same text. Returns supported results and per-offer exclusions. Excludes cache writes, storage, search, tool fees and taxes; does not rank quality. Use find_cheapest_models to search without a shortlist.

ParameterTypeDescription
model_ids *arrayDistinct exact pricing-offer IDs returned by discovery. Choose 2–20 offers to compare; do not supply display names.
usage *objectToken totals for the period or scenario being estimated, not dollars or request counts. Supply input and output separately; cached input is a subset of total input.
expected_dataset_revisionstringOptional consistency check: copy meta.dataset_revision from a prior tool response to require the same current pricing snapshot. Omit to use the current snapshot. A mismatch returns DATASET_CHANGED; re…

find_cheapest_models

Use when you know your token workload but have not selected offers: rank eligible current reviewed offers by USD text-token subtotal and return their exact IDs. Defaults to standard tariffs. Cheapest means within the eligible catalogue and supplied filters, not best quality or the entire market. Equal token counts do not imply tokenizer equivalence. Excludes cache writes, storage, search, tool fees and taxes; reports exclusion counts. Optional capacity filtering uses reviewed pricing input limits, not full context windows.

ParameterTypeDescription
usage *objectToken totals for the period or scenario being estimated, not dollars or request counts. Supply input and output separately; cached input is a subset of total input.
expected_dataset_revisionstringOptional consistency check: copy meta.dataset_revision from a prior tool response to require the same current pricing snapshot. Omit to use the current snapshot. A mismatch returns DATASET_CHANGED; re…
limitintegerMaximum ranked results to return: 1–20; default 10.
min_input_tokens_per_requestintegerOptional minimum reviewed per-request pricing input limit an offer must support. Unknown or smaller limits are excluded. This is not the model context window and does not replace usage.max_input_token…
pricing_tierstringOptional exact tariff name from offer identity, such as standard or peak. Omit to rank standard tariffs.
provider_idstringOptional exact provider_id returned by list_providers or offer identity. Use to restrict results to one provider; omit for all providers.

list_providers

Use to discover provider IDs and catalogue coverage before filtering model searches. Returns distinct API model counts, offer counts and current supported input/output rate ranges in USD per million tokens. The two rate minima may belong to different offers. For a workload estimate use find_cheapest_models or calculate_cost; ranges are not capability rankings.

ParameterTypeDescription
pricing_tierstringOptional exact tariff name from offer identity, such as standard or peak. Use to restrict results to a tariff; omit to include all tariffs.
provider_idstringOptional exact provider_id returned by list_providers or offer identity. Use to restrict results to one provider; omit for all providers.