AI generations cost compute which is not free so for products to employ the premium model tokens are a way to control a users allocation when each generation costs a different amount.
Primarily employed for non paying users to preview a product with limitations, this means that clearly communicating the allocation & how/when it's spent is important for a positive user experience.
A potentially useful pattern for advanced users in a context where indicating the compute cost was relevant. These users wouldn't have an allocation but a cost per prompt could be useful.
The key elements in not making tokens frustrating for users is making it clear what allocation users have available, when & how they're spent & when they replenish.
Ensure your UI includes the following: