How to calculate the cost of a specific request made to the web API (and its reply), in tokens?

Great thanks to both. For now, I’ll try to use the usage page per the suggestion by @sps.