tryAGI/Tiktoken

This project implements token calculation for OpenAI's gpt-4 and gpt-3.5-turbo model, specifically using `cl100k_base` encoding.

45
/ 100
Emerging

This tool helps developers accurately calculate the number of tokens in text or chat messages for OpenAI's GPT models (like GPT-4 and GPT-3.5-turbo), or for any model using a HuggingFace tokenizer. You input text or structured chat messages, and it outputs the precise token count or the tokens themselves. This is crucial for managing API costs and ensuring your prompts fit within model limits when building applications that interact with large language models.

Use this if you are a developer building applications with OpenAI's GPT models or other BPE-based language models, and you need a fast, accurate, and memory-efficient way to count or encode text tokens in .NET.

Not ideal if you are an end-user needing to count tokens for a one-off task without any programming, or if you are working with models that do not use OpenAI's encodings or standard HuggingFace BPE tokenizers.

AI application development LLM cost management prompt engineering text processing API integration
No Package No Dependents
Maintenance 10 / 25
Adoption 9 / 25
Maturity 16 / 25
Community 10 / 25

How are scores calculated?

Stars

82

Forks

7

Language

C#

License

MIT

Last pushed

Mar 09, 2026

Commits (30d)

0

Get this data via API

curl "https://pt-edge.onrender.com/api/v1/quality/llm-tools/tryAGI/Tiktoken"

Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.