API for the billing costs

Hey there,

is there any option to gather information about the cost using API?

Generally, need a piece of information about the cost for the desired time period. Is there any API option (didn’t find it in the official API reference).

Thanks!

1 Like

Hi and welcome to the developer forum!

There is no API for account information and costings. Currently you need to implement such a system yourself by logging token counts and API model calls.

Thanks for your reply @Foxalabs, will be great to have that option :+1: in the future.

You could try llm.report (I have not yet tried it by myself)

That would be great.

As a developer I can check the dashboard myself, but if a product uses the final consumer’s api keys, it would be convenient to allow them to check the usage without having to go to the dashboard.

1 Like

Same, I think some simple billing API endpoints would be good to have!
Maybe even just Balance, Usage (API Requests)

Sure would be helpful.

You have to refresh your “not a robot” oauth2 token about every week to then use another endpoint to get a session key.

Access by a regular API key would basically be a “how much is this account worth” tool for leaked keys. The opposite of using such an endpoint to monitor unauthorized spending.