Add API endpoint to fetch billing and usage data

Agree this would be useful. I’m writing an MCP server to help me get Claude Code to budget for himself - so he can hit the MCP and see his current cost & usage data (or 15 minutes delayed cost & usage data anyway) and he can monitor somewhat his token usage based on local files.

It would be great to be able to pull this data from the Groq API, or from a separate Groq billing API. Anthropic had no such capability last time I looked, but then two weeks passed and now I see they’ve got one. But I don’t want to use Anthropic’s API, because it’s expensive and over-powered for my tasks! I’m using claude-code-router or similar to get Claude Code on gpt-oss here, it’s a really solid experience, and the cost is probably 30x less.

Granted I’m using much weaker models but the fact that I can fine-tune it and level up models step-wise as I go, according to my own needs, rather than as soon as Claude thinks I should get a better model, is excellent. I don’t need anything that your dashboard isn’t providing, it would just be nice to be able to fetch this in my MCP server and give it the same treatment as the other budget data I’m gathering there. (+1 this issue)