Skip to content
JS
Package

ai-sdk-cost-calculator

Cost calculator for Vercel AI SDK token usage. Supports OpenAI, Anthropic, Google, xAI (Grok), and DeepSeek with long context pricing, prompt caching, and reasoning tokens.

v7.1.14, 22 Sept 2026MITESM + CommonJSTypes: Bundled
$ npm install ai-sdk-cost-calculator

Key numbers

As of 25 Sept 2026
Weekly downloads
5.4k
- over 12 months
Gzip bundle size
-
No Bundlephobia data
Dependencies
0
Direct, from package.json
Last release
2 days ago
v7.1.14
GitHub stars
2
0 forks
Open issues / PRs
1 / 0
Contributors
-
Commits, last 52 weeks
63

Downloads

Last week 2026-09-15 to 2026-09-21
02k4k6k8kSept 2025Mar 2026Sept 2026High 6.6k (8 Sept 2026)Low 0 (23 Sept 2025)
Weekly npm downloads, one point per week, weeks starting 23 Sept 2025 to 15 Sept 2026. The y axis starts at zero.

5,353 downloads last week, 16,308 in the last month. No 52-week series has been fetched yet.

Releases, last 12 months
-
Latest version
7.1.14, 22 Sept 20262 days ago
First published
-
Last push to GitHub
10 Sept 202614 days before the snapshot
Repository archived
No
Open issues
1
Open pull requests
0
Commits, last 52 weeks
63
Dependents on npm
0

Major versions

-

Recent releases

-

Module format
ESM + CommonJSFrom package.json type, main and exports fields
TypeScript types
Bundled
Node.js engine range
>=18.0.0
Runtimes
-
Unpacked size (npm)
466 kB
Dependencies (0)
None
Peer dependencies (1)
ai
npm install ai-sdk-cost-calculator
  • jsDelivrhttps://cdn.jsdelivr.net/npm/ai-sdk-cost-calculator@7.1.14/
  • unpkghttps://unpkg.com/ai-sdk-cost-calculator@7.1.14/
  • esm.shhttps://esm.sh/ai-sdk-cost-calculator@7.1.14
Sources: npm registry, npm downloads API, GitHub API. Data fetched 25 Sept 2026.

Indexability: Not indexed (discovery only): downloads_week 5353 < 10000; no category.