What are tokens and how do I count them?

Tokens are characters or pieces of text processed by AI models. Use the API response object to see exact token counts of your requests for billing.