PromptSpend

v0.1.11
io.github.AndrewAvery7/promptspend Checked 5 hours ago Published 1 month ago

LLM pricing where every rate carries its source and the date it was last confirmed.

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

get_price

List price for one LLM in USD per million tokens, with its source and last-confirmed date. Returns disputed=true when two sources disagree, and close matches when the model is unknown. To cost a workload, use estimate_cost.

ParameterTypeDescription
model_name *stringModel id or name, e.g. gpt-5 or "Claude Opus 5".
as_ofstringPast date YYYY-MM-DD: the rate published then.

estimate_cost

Monthly cost of a described workload, or of measured usage, on each model. Accounts for history compounding, cache writes, long-context tiers and reasoning tokens. Use this instead of multiplying prices by hand.

ParameterTypeDescription
models *arrayUp to about 8.
cached_input_sharenumber0-1. Default 0.
conversations_per_daynumberDefault 1000.
output_tokensnumberTypical reply. Default 350.
reasoning_multipliernumberBill output at this multiple. Default 1.
system_tokensnumberSystem prompt size. Default 800.
turnsnumberTurns per conversation. Default 4.
usageobjectMeasured totals to price instead: input, output, cache_read, cache_write tokens (input excludes cache reads).
use_batch_apibooleanApply batch discounts.
user_tokensnumberTypical user message. Default 150.

find_cheaper

Cheaper models that score at or above the given one on capability, costed on the same workload. Returns candidates to test, not a recommendation.

ParameterTypeDescription
model *stringThe model currently in use.
conversations_per_daynumberDefault 1000.
min_capabilitynumber0-100. Defaults to the given model’s score.
output_tokensnumberDefault 350.
system_tokensnumberDefault 800.
turnsnumberDefault 4.
user_tokensnumberDefault 150.