Forum Academy Marketplace Showcase Pricing Features

How to set max API tokens as per User Role

Hello, I need help understanding how to set max API tokens as per the User Role. I have an API that uses tokens based on the number of characters the API generates. Can someone tell me how to do this? Or is there any blog or tutorial someone can point me to?