Hello Mohamed,
Thanks for reaching out to us. I can understand this feature is truly useful for usage moderation, however, at this moment there is no API can get total consumed token per thread - https://learn.microsoft.com/en-us/azure/ai-services/openai/assistants-reference-threads?tabs=python#tool_resources-properties
I will forward your feedback to product team but we have no ETA for it.
Right now, only run object provides usage information - https://learn.microsoft.com/en-us/azure/ai-services/openai/assistants-reference-runs?tabs=python#run-object
Assistant API is only in preview stage so please feel free to share your feedback!
Regards,
Yutong
-Please kindly accept the answer if you feel helpful to support the community, thanks a lot.