Add API endpoint to fetch billing and usage data

Description:
Right now, the only way to see monthly spend and cost breakdowns is through the Groq Console UI. This works fine for manual checks, but it’s a bottleneck for automation.

An API endpoint that returns billing/usage data (similar to what’s displayed under Dashboard → Usage → Cost) would allow developers to:

  • Programmatically track spend in real time

  • Trigger alerts when spend exceeds a threshold

  • Integrate Groq usage into internal cost dashboards or budget systems

Requested features:

  • REST endpoint returning JSON with monthly spend, daily spend, and per-model usage

  • Support for date ranges

  • Same update frequency as the current console view (~15 min delay is fine)

This would save developers from having to scrape the UI and enable better spend management for production workloads.

2 Likes

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)

Thank you for the feature request!

I agree, this would open up a lot of options for account management. We’ve been considering adding an Accounts API but I’ll make sure the Eng team knows this is a requested feature. Thanks!

1 Like