Open AI Usage API

is there currently an endpoint or API for getting the amount of tokens left on an account?

Hi @Loomisgitarrist,

I guess you get that info in a API Call?

Maybe you could try this too?

curl -X GET \
  'https://api.openai.com/v1/usage?date=2023-04-02' \
  -H 'Authorization: Bearer YOUR_API_SECRET_KEY'

Thank you

Hey I don’t think it is possible for overall account Usage (I.E Dev Account) to be returned in one call. But you can as @dilon_perera has pointed out you get usage on each individual call. So in theory, you could set up a calculation for overall account usage.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.