The maximum number of tokens allowed in the API call for ChatGPT is 4096 tokens. Note that tokens are not always just one character, they can be as short as one character or as long as one word. For instance, “ChatGPT is great!” is encoded into six tokens: [“Chat”, “G”, “PT”, “ is”, “ great”, “!”]. If a conversation exceeds this limit, you will need to truncate or shorten your text.