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).


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