Ai Cost Calculator

v1.2.4

AI 成本计算器 - 对比各大模型成本,优化 API 支出。适合:AI 应用开发者、成本敏感用户。

0· 110·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for yang1002378395-cmyk/ai-cost-calculator-cn.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Ai Cost Calculator" (yang1002378395-cmyk/ai-cost-calculator-cn) from ClawHub.
Skill page: https://clawhub.ai/yang1002378395-cmyk/ai-cost-calculator-cn
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Required binaries: curl
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install ai-cost-calculator-cn

ClawHub CLI

Package manager switcher

npx clawhub@latest install ai-cost-calculator-cn
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description (model cost comparison) align with the actual content: SKILL.md contains pricing tables, formulas, example calculations and simple curl commands to fetch pricing. Required binaries (curl) are appropriate and no unrelated credentials or filesystem access are requested. Minor metadata inconsistencies exist (skill.json version 1.2.0 vs SKILL.md 1.2.4 and SKILL.md footer v1.1), and the source/homepage are missing, which reduces provenance but does not contradict the stated purpose.
Instruction Scope
Runtime instructions only perform local calculations and basic curl fetches to public pricing endpoints; they do not instruct reading arbitrary user files, environment secrets, or sending user data to unknown endpoints. The curl lines are explicit and limited to pricing pages. Note: the instructions use grep -P and bc in examples, which are implementation details that may fail on some hosts but are not security risks.
Install Mechanism
No install spec and no code files — lowest risk. Nothing will be downloaded or written to disk by an installer. This is consistent with an instruction-only utility.
Credentials
The skill declares no required environment variables, no primary credential, and no config paths. The SKILL.md does not attempt to read environment secrets. The lack of requested credentials is proportionate to the stated functionality.
Persistence & Privilege
always:false and no install steps mean the skill does not request permanent system presence or elevated privileges. It does not modify other skills or system configuration.
Assessment
This skill appears to do what it says: calculate and compare model costs using local math plus occasional curl requests to public pricing pages. Before installing or running: 1) note the source/homepage is missing and metadata versions are inconsistent—prefer skills with clear provenance; 2) the example shell snippets make outbound HTTP requests (curl) — only run them in environments where network requests are allowed and safe; 3) the examples use grep -P and bc which may not be available on all systems; 4) the skill does not request credentials, so do not supply API keys or tokens to it unless you understand why and where they will be used. If you need stronger assurance, ask the publisher for a homepage or source repository and a clear changelog.

Like a lobster shell, security has layers — review code before you run it.

Runtime requirements

🧮 Clawdis
Binscurl
chinesevk974v7pa2hd35ay2629pn82jns83r0thlatestvk974v7pa2hd35ay2629pn82jns83r0thpricingvk974v7pa2hd35ay2629pn82jns83r0th
110downloads
0stars
1versions
Updated 1mo ago
v1.2.4
MIT-0

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

Comments

Loading comments...