For those who are interested in knowing the length of tokens and their values before sending requests to the OpenAI API (by default you get the number of tokens in the OpenAI response).
I've created a cross-platform API that allows everyone to easily transform text to tokens, obtain the number of tokens, and also transform tokens back to the initial text.
Feel free to check it out 🙂
https://rapidapi.com/um3rit/api/gpt-3-encoder-tokenizer
RapidAPI
This is the official GPT-3 tokenizer, the same tokenizer is being used by OpenAI here https://platform.openai.com/tokenizer.
contact : um3r.it@gmail.com