llmcost 0.1.0
Compute per-call and monthly cost of an LLM API from token counts and per-million-token pricing: the arithmetic behind any LLM pricing calculator, with no built-in price table to go stale.
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
llmcost
Compute per-call and monthly cost of an LLM API from token counts and per-million-token pricing — the arithmetic behind any LLM pricing calculator. Holds no price table of its own, because published per-model prices change and a library that hardcodes them goes stale.
A worked table of per-model conversation costs is at KickLLM's chatbot cost breakdown.
Usage
import llmcost;
const auto perCall = callCost(2000, 500, 3.0, 15.0); // $/call
const auto perMonth = monthlyCost(1000, 2000, 500, 3.0, 15.0); // $/month, 1,000 convos
License: MIT
- 0.1.0 released a day ago
- theluckystrike/llmcost-d
- kickllm.com/answers/cost-of-llm-chatbot-per-month.html
- MIT
- Copyright (c) 2026 Michael Lip
- Authors:
- Dependencies:
- none
- Versions:
-
Show all 2 versions0.1.0 2026-Aug-14 ~main 2026-Aug-14 - Download Stats:
-
-
0 downloads today
-
1 downloads this week
-
1 downloads this month
-
1 downloads total
-
- Score:
- 0.0
- Short URL:
- llmcost.dub.pm