Tokenization
Tokenization is the process of breaking input text down into smaller units. Depending on the tokenization method the model uses, a single word can be represented by one token or may be broken down into multiple sub-word tokens. Here’s how different text types typically tokenize:Input and output token usage
Every API call consumes tokens for both the prompt you send and the response generated:Inspect token usage
You can inspect theusage
information from the API response to see the token usage for each response.
The prompt tokens reported in the response include the tokens used for the model’s system prompt.