Nodes/ERPK Collection/Claude Token Counter
ComfyUI Node

Claude Token Counter

Count tokens and estimate API costs for Claude models.

By eRepublik-Labs·Created 10 months ago·Updated about a month ago· 0
Claude Token Counter
  • client
  • token_count
  • summary
text
modelclaude-sonnet-5
CategoryERPK/Claude

Inputs (3)

NameTypeDefaultDescription
textSTRINGText to count tokens for
modelCOMBOclaude-sonnet-5Model for token counting and cost estimation
clientoptCLAUDE_API_CLIENTOptional: Connect client for accurate API-based counting (otherwise uses ~4 chars/token estimation)

Outputs (2)

NameTypeDescription
token_countINT
summarySTRING