Programatically obtaining Usage information via API

Is there a way to obtain obtain Usage information programatically via API call(s) ?

Am looking to get the data that is shown in the page OpenAI API and implement custom alerts based on that.
Is there a better way to do this than via web scraping ?

P.S.: Looks like the only alerting that is direct provided is hitting soft limit (and possibly hitting hard limit).

1 Like