r/GithubCopilot • • 25d ago

Help/Doubt ❓ Is there an official API to programmatically retrieve Copilot Business AI Credits usage and monthly limit?

Hi everyone. I use GitHub Copilot Business with a seat managed by my enterprise. In VS Code, the “Monthly limit” panel shows AI Credit usage—for example, 935 / 5,000 AI credits—and the date the limit resets.

I’d like to display those same live values in a small native macOS app. I’m specifically interested in the “Monthly limit” for AI Credits, not premium requests, model usage, or context-window usage.

I checked the official documentation:

I haven’t tried undocumented endpoints or inspected network traffic. I attempted a preliminary macOS Accessibility check of the UI, but macOS denied the required permission. No data was read, and I didn’t change any settings.

Is there an official API or supported interface for retrieving these fields? If you’ve found a way to access them, what source and Copilot license type did you use (Business, Enterprise, or Individual)? I’m especially interested in whether it works with an enterprise-managed Business seat.

6 Upvotes

7 comments sorted by

1

u/Smettbobezwinger 25d ago

I am using the Copilot API, Export them to Azure Blob Storage and visualize them in Grafana.

1

u/Cloud--Man 24d ago

Thanks! Could you share which exact API endpoint and report fields you use? I’m trying to retrieve the current “Monthly limit” shown in VS Code (credits used / total credits and reset date), not general Copilot usage metrics.

I’m an ordinary Copilot Business seat holder, not an enterprise admin, so I don’t have enterprise-admin permissions. Is there an API I can access with regular user permissions that provides those exact values? If the endpoint requires admin access, could you clarify that?

1

u/anno2376 23d ago

Yes you need administrative permission.
If you want get access to this data ask your administrator.

2

u/Mario0412 25d ago

Are you referring to the non-Github Copilot API? Aka M365 Copilot? Because as far as I'm aware, like OP mentioned, I also have not been able to find an API for Github Copilot's usage reporting.

1

u/AutoModerator 25d ago

Hello /u/Cloud--Man. Looks like you have posted a query. Once your query is resolved, please reply the solution comment with "!solved" to help everyone else know the solution and mark the post as solved.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.