Detailed Explanation
A token is a piece of a word, a whole word, or a punctuation mark used by LLMs to process text. For example, the word 'hamburger' might be split into the tokens 'ham', 'bur', and 'ger'. Language models read and generate text one token at a time. AI APIs usually charge based on the number of tokens processed (input tokens) and generated (output tokens).