返回 Skill 列表
extension
分类: 开发与工程无需 API Key

Claude Token Counter

使用Claude分词器近似估算文本的Token数和API费用,并提供针对上下文限制的切块建议。

person作者: mosonchan2023hubclawhub

Claude Token Counter

Accurately estimates the number of tokens in a given text based on Claude's tokenizer (approximate, as Claude's actual tokenizer is proprietary).

Features

  • Token Estimation: Get a close approximation of token usage
  • Pricing Calculator: Estimate API costs based on current Claude pricing
  • Chunking Advice: Get suggestions on how to split text if it exceeds context limits

Pricing

  • Price: 0.001 USDT per API call
  • Payment: Integrated via SkillPay.me

Use Cases

  • Budget management
  • Context window management
  • API call optimization

Example Input

{
  "text": "Hello, how are you today?",
  "model": "claude-3-5-sonnet-20241022"
}

Example Output

{
  "success": true,
  "estimated_tokens": 7,
  "estimated_cost": 0.000021,
  "message": "Token estimation completed."
}

Integration

This skill is integrated with SkillPay.me for automatic micropayments. Each call costs 0.001 USDT.