API Availability for Workspace Analytics Data (Last Login & Credit Usage)

We have an Edu workspace, and we want to know the user’s last login date and how many credits they have used.

Is there an API to get these details?

We can see this data in Workspace Analytics → Export. We would like to know whether there is an API option available to retrieve this information programmatically.

Welcome to the forum!

I think this depends on whether you mean ChatGPT Workspace Analytics or OpenAI API Platform usage.

For ChatGPT Enterprise/Edu Workspace Analytics, I can find documentation for the admin dashboard and CSV export flow, but I do not see a clearly documented public API for retrieving the same Workspace Analytics export programmatically:

https://help.openai.com/en/articles/10875114-workspace-analytics-for-chatgpt-enterprise-and-edu

For the API Platform, there are Admin APIs for organization administration and usage/costs. Those seem relevant for API usage or cost reporting, but they do not necessarily equal “last ChatGPT login” or the exact Edu Workspace Analytics export:

There is also documentation for exporting monthly API usage details from the API Usage Dashboard:

https://help.openai.com/en/articles/20001072-how-do-i-export-monthly-usage-details-from-the-api-usage-dashboard