npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

llm-cost-compare

v1.0.0

Published

See what your prompt costs across every major AI model. No API key needed.

Readme

💰 llm-cost

See what your prompt actually costs across every major AI model. No API key needed.

Built by @JuanAtLarge because I got tired of guessing.

Usage

No install needed:

npx llm-cost "your prompt here"

Examples

# Basic cost comparison
npx llm-cost "Summarize this article in 3 bullet points"

# With a file
npx llm-cost "Summarize this: $(cat mydoc.txt)"

# Specify expected output length
npx llm-cost "Write a blog post about AI agents" --output=1000

# Filter by provider
npx llm-cost "Hello world" --provider=Anthropic

# Show all models (default shows top 10 cheapest)
npx llm-cost "Hello world" --all

# Pipe input
echo "Explain quantum computing simply" | npx llm-cost

Sample Output

💰 llm-cost — prompt cost calculator
   by @JuanAtLarge | github.com/JuanAtLarge/llm-cost

📝 Prompt: "Write a blog post about AI agents"
📊 Estimated tokens: ~8 input / ~4 output

Model                  Provider     Per call      Per 1k calls
──────────────────────────────────────────────────────────────
Gemini 1.5 Flash       Google       $0.000002     $0.0016/1k calls
Mistral Small          Mistral      $0.000002     $0.0022/1k calls
Deepseek V3            Deepseek     $0.000003     $0.0026/1k calls
GPT-4o mini            OpenAI       $0.000003     $0.0030/1k calls
...

🏆 Cheapest:    Gemini 1.5 Flash (Google) — $0.000002/call
💸 Most exp:    Claude 3 Opus (Anthropic) — $0.000180/call
📈 Cost spread: 90× difference between cheapest and most expensive

Models Included

| Provider | Models | |----------|--------| | OpenAI | GPT-5.2 Pro, GPT-5.2, GPT-5, GPT-5 Mini, GPT-5 Nano, GPT-4o, GPT-4o mini, GPT-4 Turbo, o1, o1 mini, o3 mini | | Anthropic | Claude Opus 4.6, Claude Sonnet 4.6, Claude Haiku 4.5, Claude 3.5 Sonnet, Claude 3.5 Haiku, Claude 3 Opus | | Google | Gemini 3.1 Pro, Gemini 3 Flash, Gemini 2.5 Pro/Flash/Flash-Lite, Gemini 2.0 Flash, Gemini 1.5 Pro/Flash/Flash-8B | | Meta/OSS | Llama 3.3 70B, Llama 3.1 405B, Llama 3 70B, Llama 3 8B | | Mistral | Mistral Large, Mistral Small | | Deepseek | Deepseek V3, Deepseek R1 | | xAI | Grok 2, Grok 3, Grok 3 Mini |

Pricing updated March 2026. PRs welcome to keep it current.

Notes

  • Token count is estimated (~4 chars per token for English)
  • Output tokens default to ~50% of input — use --output=N for accuracy
  • Prices are API list prices and may not reflect your negotiated rates

License

MIT