Count the number of tokens a string uses for an LLM, using the same BPE encodings the major models use (o200k_base for GPT-4o/o1, cl100k_base for GPT-4/3.5 and embeddings). Optionally pass a USD price per million tokens to get an estimated cost. Lets an agent budget context and spend before a call.
| Network | Scheme | Amount | Pay To |
|---|---|---|---|
| solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp | exact | 0.01 tokens | HJfYcc...aoJe |
| Base | exact | $0.01 USDC | 0x954c...5555 |
| Polygon | exact | $0.01 USDC | 0x954c...5555 |