API Access to Hard Limit / Usage / Billing data

Hey there,

is there any way to have access to the billing limit and/or current spenting per month through an api?

I want to be transparent with my users and show them how much money has already been used and i don’t want to rely solely on counting the tokens used.

Tokens used per month * openAI pricing model = $ spent per month

I know I could do that using data.usage.total_tokens and counting dallE access but they I would still be missing the configured hard limit. Would need to hardcode that and update the code everytime I up or downgrade the limit

Also you dont get token counts when you are streaming replies

1 Like

Like @sehrknusprig, I have a use case that would need such an API. My current project would at least require read access to current and historical usage, and usage limits.

@drewworkman3245’s suggestion is insufficient when monitoring your own costs while using tools developed by others or while using multiple tools with the same account.

:point_right: Ideally, having API access to ‘Account’ would open up great opportunities for improving the user experience of free Apps that use OpenAI.

I searched for a way to submit this as a #FeatureRequest but only found community forum posts, not an official resource.

Does this functionality already exist
somewhere? If not, has anyone found a workaround?
Did I miss an official resource to submit feature requests?

A great feature would be token used and $ per API key.