Tok - トークン推定器

サブミクロ秒トークン推定ツールで、100+ AI モデルをサポートします。MB規模のプロンプトを最小限の依存関係と平均化式で処理し、モデル間互換性を実現します.

2025AI革新Published

主な機能

  • Multi-provider support: 'OpenAI, Anthropic, OpenRouter, Llama models'
  • Enterprise features: Per-million token pricing with separate prompt/completion rates
  • Lightweight design: Minimal dependencies for maximum performance

影響

- **Sub-microsecond performance** for instant token estimation - **100+ model support** through averaging formula approach - **MB-scale prompt handling** with minimal dependencies - **20MB size reduction** by removing TIC token dependency - **Developer Efficiency**: Instant cost visibility prevents budget overruns - **Enterprise Ready**: Supports programmatic budget management - **Global Adoption**: Used worldwide via npm registry - **Performance Optimization**: Trade-off of precision for significant performance gains

テクノロジースタック

コアスタック

TypeScriptJavaScriptNode.js
  • TypeScript/JavaScript
  • Node.js 18.0.0+
  • Plugin-based provider system
  • Averaging formula for token estimation

タグ

AIトークン推定コスト最適化LLM-コストサブミクロ秒マルチプロバイダー軽量OpenAIAnthropicClaudeGPT-4開発者ツールnpmパッケージ