← 返回 Skills 市场
yang1002378395-cmyk

Ai Cost Calculator

作者 yang1002378395-cmyk · GitHub ↗ · v1.2.4 · MIT-0
cross-platform ⚠ suspicious
642
总下载
0
收藏
6
当前安装
56
版本数
在 OpenClaw 中安装
/install ai-cost-calculator
功能描述
AI 成本计算器 - 对比各大模型成本,优化 API 支出。适合:AI 应用开发者、成本敏感用户。
使用说明 (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
安全使用建议
This skill appears to do what it says (compare model costs) and requests no secrets, but review a few points before enabling it: (1) The examples/scripts call bc and grep -P but the skill only declares curl — ensure your agent environment has bc and a grep that supports -P, or the scripts will fail. (2) The SKILL.md uses curl to fetch pricing from third-party endpoints (openai.com, api.deepseek.com); verify those endpoints are trustworthy and that you are comfortable allowing the agent network access. (3) The price-alerting feature is described but not implemented — clarify how alerts would be delivered before relying on it. (4) Some numeric formulas/units in the examples look inconsistent (units and scaling by 100/1M); test the calculations with known values before using them for billing decisions. If you need stronger assurance, request the author to declare all required binaries (bc, grep) and to provide a concrete, auditable mechanism for price alerts.
功能分析
Type: OpenClaw Skill Name: ai-cost-calculator Version: 1.2.4 The skill is a legitimate AI cost calculator designed to compare pricing across various LLM providers. It uses standard bash utilities like 'bc' for arithmetic and 'curl' to fetch pricing data from official domains (openai.com and api.deepseek.com), which is consistent with its stated purpose in SKILL.md and skill.json. No evidence of data exfiltration, malicious execution, or harmful prompt injection was found.
能力评估
Purpose & Capability
The name/description (AI cost comparison) align with the SKILL.md: it compares model prices and gives formulas/scripts. However, the declared requirements list only 'curl' while the provided example scripts also use bc and grep (with -P), which are not declared; this is a mismatch between claimed requirements and actual instructions.
Instruction Scope
Runtime instructions are instruction-only and limited to local arithmetic and curling vendor endpoints to scrape pricing. They do not request credentials or read local sensitive files. Some instructions are vague (e.g., '设置价格预警' has no concrete notification mechanism). The scripts assume GNU grep with -P and availability of bc; those environment assumptions are not declared.
Install Mechanism
There is no install spec and no code files; nothing is written to disk or downloaded. Instruction-only skills have a smaller attack surface than ones that fetch/execute code.
Credentials
The skill requests no environment variables, no credentials, and no config paths — proportional for a cost-calculator that only fetches public pricing pages.
Persistence & Privilege
always is false and the skill is user-invocable; it does not request persistent/privileged presence or modification of other skills/settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install ai-cost-calculator
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /ai-cost-calculator 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.2.4
定期更新
v1.2.3
- 降级版本号为 1.2.3,并与之前的版本对齐 - 未引入新功能或内容,仅同步版本号和元数据 - 现有说明、模型、策略、示例等内容保持不变
v2.0.0
重大更新:新增模型价格对比,优化成本计算
v1.0.52
No code or documentation changes in this version. - Version bump from 1.0.52 to 1.2.24 with no file changes. - No new features, fixes, or documentation updates detected.
v1.0.51
No code or documentation changes detected in this release. - Version number updated only; no new features or fixes introduced.
v1.0.50
No file changes detected in this release. - Version number updated to 1.0.50. - No new features, bug fixes, or documentation changes included. - Existing functionality remains unchanged.
v1.0.49
No changes detected in this version.
v1.0.48
No user-facing changes in this version. - No file changes detected from the previous release.
v1.0.47
- No file changes detected in this version. - Version number updated to 1.0.47, but content remains unchanged.
v1.0.46
No visible changes in this version. - No file or documentation updates detected. - Skill functionality and documentation remain unchanged.
v1.0.45
No file changes detected in this version. No updates or modifications were made to the skill.
v1.0.44
No code or documentation changes detected in this version. - No updates or modifications were made in version 1.0.44 compared to the previous release.
v1.0.43
No changes detected in this version. - Version 1.0.43 released with no file changes.
v1.0.42
No file changes detected in this release. - No modifications were made to code or documentation. - Version number and all content remain unchanged from the previous release.
v1.0.41
- No file changes detected in this version. - Version number updated to 1.0.41. - No new features, fixes, or documentation changes included.
v1.0.40
No changes detected in this version. - Version bumped to 1.0.40. - No file changes present.
v1.0.39
No file changes detected in this version. There are no updates or modifications included in this release.
v1.0.38
No code or documentation changes detected in this version. - Version bump from 1.0.38 to 1.2.24 without any file modifications. - No new features, fixes, or content updates included in this release.
v1.0.37
No changes detected in this version. No updates or modifications were made.
v1.0.36
No file changes detected in this release; version number updated only. - No new features, fixes, or documentation changes.
元数据
Slug ai-cost-calculator
版本 1.2.4
许可证 MIT-0
累计安装 6
当前安装数 6
历史版本数 56
常见问题

Ai Cost Calculator 是什么?

AI 成本计算器 - 对比各大模型成本,优化 API 支出。适合:AI 应用开发者、成本敏感用户。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 642 次。

如何安装 Ai Cost Calculator?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install ai-cost-calculator」即可一键安装,无需额外配置。

Ai Cost Calculator 是免费的吗?

是的,Ai Cost Calculator 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Ai Cost Calculator 支持哪些平台?

Ai Cost Calculator 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Ai Cost Calculator?

由 yang1002378395-cmyk(@yang1002378395-cmyk)开发并维护,当前版本 v1.2.4。

💬 留言讨论