How to know the Azure OpenAI Usage?

I am using Azure OpenAI to generate response. I want to know the usage of the Azure OpenAI using python. Lets say how many percentage of total tokens are used till now, if 80% then connect to another model.
I am using gpt-4-32k model.