← Back to Skills Marketplace
yang1002378395-cmyk

Ai Cost Calculator

by yang1002378395-cmyk · GitHub ↗ · v2.0.0 · MIT-0
cross-platform ⚠ suspicious
94
Downloads
0
Stars
1
Active Installs
1
Versions
Install in OpenClaw
/install ai-cost-calculator-v2
Description
AI 成本计算器 - 对比各大模型成本,优化 API 支出。适合:AI 应用开发者、成本敏感用户。
README (SKILL.md)

AI 成本计算器 Skill

对比各大 AI 模型成本,帮你省钱。

支持模型

模型 输入价格 输出价格 特点
GPT-4o $2.5/1M $10/1M 多模态,性能强
GPT-4o-mini $0.15/1M $0.6/1M 性价比高
Claude 3.5 Sonnet $3/1M $15/1M 编程强
Claude 3 Haiku $0.25/1M $1.25/1M 快速便宜
DeepSeek V3 ¥1/1M ¥2/1M 国内最便宜
GLM-4 ¥10/1M ¥10/1M 国产大模型
Qwen-Max ¥20/1M ¥20/1M 阿里云

使用方法

计算成本

计算 10 万字用 DeepSeek V3 的成本

模型对比

对比 GPT-4o 和 DeepSeek V3 处理 100 万 tokens 的成本

推荐模型

推荐最适合日常对话的便宜模型

成本计算公式

总成本 = (输入tokens × 输入价格 + 输出tokens × 输出价格) / 1000000

示例计算

场景:处理 10 万字文档

模型 输入成本 输出成本 总计
GPT-4o $0.25 $1.00 $1.25
Claude 3.5 Sonnet $0.30 $1.50 $1.80
DeepSeek V3 ¥0.10 ¥0.20 ¥0.30 (≈$0.04)
GLM-4 ¥1.00 ¥1.00 ¥2.00

DeepSeek 比 GPT-4o 便宜 30 倍!

快速对比脚本

# 计算不同模型的月度成本
# 假设:每天 10 万 tokens,30 天

echo "📊 月度成本对比(日用量 10 万 tokens)"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "GPT-4o:           \$"$(echo "scale=2; 0.1 * 30 * 2.5 / 100 + 0.1 * 30 * 10 / 100" | bc)
echo "GPT-4o-mini:      \$"$(echo "scale=2; 0.1 * 30 * 0.15 / 100 + 0.1 * 30 * 0.6 / 100" | bc)
echo "Claude Sonnet:    \$"$(echo "scale=2; 0.1 * 30 * 3 / 100 + 0.1 * 30 * 15 / 100" | bc)
echo "DeepSeek V3:      ¥"$(echo "scale=2; 0.1 * 30 * 1 + 0.1 * 30 * 2" | bc)
echo "GLM-4:            ¥"$(echo "scale=2; 0.1 * 30 * 10 + 0.1 * 30 * 10" | bc)

省钱策略

1. 分层使用

简单任务 → GPT-4o-mini / DeepSeek V3
复杂任务 → Claude Sonnet / GPT-4o

2. 缓存结果

相同问题 → 缓存回答 → 避免重复调用

3. 批量处理

多条消息 → 合并一次请求 → 减少请求次数

4. 选择性使用

不需要高级模型的任务 → 用便宜模型
- 翻译:DeepSeek 足够
- 摘要:GPT-4o-mini 足够
- 编程:Claude Sonnet 最佳

价格监控

获取最新价格

# OpenAI 官方
curl -s "https://openai.com/api/pricing" | grep -oP '\$[\d.]+/1M'

# DeepSeek 官方
curl -s "https://api.deepseek.com/zh-CN/zh/cewin" | grep -oP '¥[\d.]+/百万'

价格变化提醒

设置价格预警:当 GPT-4o 降价超过 20% 时通知我

输出格式

成本报告

🧮 AI 成本计算报告
━━━━━━━━━━━━━━━━━━━━
📝 输入:100,000 tokens
📝 输出:50,000 tokens

💰 各模型成本:
  GPT-4o:           $0.75
  GPT-4o-mini:      $0.08
  Claude Sonnet:    $1.05
  DeepSeek V3:      ¥0.20 (≈$0.03)

✅ 最省钱选择:DeepSeek V3
💸 最大差价:35 倍

注意事项

  • 价格实时变动,以官网为准
  • 部分模型有免费额度
  • 国内模型可能需要实名
  • 企业用户有批量折扣

创建:2026-03-12 更新:2026-03-14 版本:1.1

🆕 v1.1 更新

新增模型

模型 输入价格 输出价格 特点
GLM-5 ¥0.5/1M ¥2/1M 最新智谱,性价比极高
DeepSeek V3.2 ¥1/1M ¥2/1M 国产最强,价格亲民
Qwen-2.5-Max ¥20/1M ¥20/1M 阿里最新
Doubao-1.5 ¥0.8/1M ¥2/1M 字节跳动

性价比排行(2026-03)

  1. DeepSeek V3 - 最便宜,日常首选
  2. GLM-5 - 国产新贵,API 稳定
  3. GPT-4o-mini - 国际入门首选
  4. Claude Haiku - 编程辅助

省钱实战案例

场景:每天处理 10 万字

  • GPT-4o:$37.5/月
  • DeepSeek V3:¥9/月(≈$1.2)
  • 年省:$430+

推荐策略

预算敏感 → DeepSeek V3 / GLM-5
编程任务 → Claude Sonnet / DeepSeek V3
多模态 → GPT-4o / Qwen-VL
企业稳定 → GPT-4o / GLM-4
Usage Guidance
This skill appears to do what it says (compare model pricing) but has some issues to consider before installing or running the example scripts: - Source trust: the package author and homepage are unknown. That increases risk if you plan to run their scripts or automate price polling. - Missing declared tools: the SKILL.md uses bc and grep -P but the skill only declares curl. Ensure your environment has the needed tools or modify the scripts; grep -P is not available in all grep builds. - Network calls: the skill's scripts call external URLs (openai.com and api.deepseek.com). That's expected for price lookups, but be aware these requests go to third-party endpoints and may change behavior over time. - Safety: because the skill is instruction-only, no code will be installed by the registry, but running provided shell snippets on your machine executes commands locally. Review and run them in a safe/isolated environment (or translate them into a language-safe routine) before use. If you want to proceed: verify the endpoints are correct and current, ensure required command-line tools (curl, bc, a grep build that supports -P or adjust regexes), and prefer running snippets in a container or dedicated VM. If you need higher assurance, ask the author for a canonical source or repository and clearer declared dependencies.
Capability Analysis
Type: OpenClaw Skill Name: ai-cost-calculator-v2 Version: 2.0.0 The skill bundle is a legitimate AI cost calculator designed to compare API pricing across various models. The provided bash snippets in SKILL.md use standard tools like curl, echo, and bc for arithmetic and fetching pricing data from official domains (openai.com, deepseek.com), with no evidence of data exfiltration, malicious execution, or prompt injection.
Capability Assessment
Purpose & Capability
Name and description match the instructions: the SKILL.md contains pricing tables, cost formulas, comparison examples and curl-based price lookups. However, the declared requirement list only mentions curl while the provided scripts use other command-line tools (bc and grep -P) that are not declared — an inconsistency in required binaries.
Instruction Scope
Instructions are focused on cost calculation and model comparison and do not ask to read unrelated files or credentials. They do run curl against external sites (openai.com and api.deepseek.com) and include shell scripts that evaluate expressions and parse output. The scripts use grep -P (PCRE) which is not portable on all systems; they also assume bc is present.
Install Mechanism
This is an instruction-only skill with no install spec and no code files to write to disk, which is the lowest-risk install profile.
Credentials
No environment variables, credentials, or config paths are requested. The lack of required secrets aligns with the stated purpose.
Persistence & Privilege
always is false and the skill does not request persistent or elevated privileges; it does not attempt to modify other skills or system-wide settings.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install ai-cost-calculator-v2
  3. After installation, invoke the skill by name or use /ai-cost-calculator-v2
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v2.0.0
Version 2.0.0 Summary: Major update with new models, enhanced comparisons, and expanded saving strategies. - 新增模型:GLM-5、DeepSeek V3.2、Qwen-2.5-Max、Doubao-1.5,补充多家国产与国际模型最新价格。 - 更新模型性价比排行及应用推荐,更直观显示不同场景下的最佳选择。 - 增加省钱实战案例,帮助用户直观对比各模型年度成本。 - 扩展价格监控方法、输出格式和节省策略指南。 - 多项细节和表格优化,内容更丰富,覆盖更多实际应用场景。
Metadata
Slug ai-cost-calculator-v2
Version 2.0.0
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 1
Frequently Asked Questions

What is Ai Cost Calculator?

AI 成本计算器 - 对比各大模型成本,优化 API 支出。适合:AI 应用开发者、成本敏感用户。 It is an AI Agent Skill for Claude Code / OpenClaw, with 94 downloads so far.

How do I install Ai Cost Calculator?

Run "/install ai-cost-calculator-v2" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Ai Cost Calculator free?

Yes, Ai Cost Calculator is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Ai Cost Calculator support?

Ai Cost Calculator is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Ai Cost Calculator?

It is built and maintained by yang1002378395-cmyk (@yang1002378395-cmyk); the current version is v2.0.0.

💬 Comments