Does openAI support seeing cost per API key and allow limits to be set at API key level?

In our org, we want to use API for 3 different use cases. We plan to create 3 API keys. However, we want to track cost for each use case separately.

In dashboard, I could see that it allows cost and limits only to be set at “Account” level. For “paid accounts” does this support cost breakup and limits at “API key” level ?

8 Likes

Welcome to the community.

It’s all lumped together. Usually, it’s best to sort and bill them on your end depending on token usage. Are you not tracking on your end when they use your apps?

1 Like

As we’re developing a few apps in parallel, it would be nice to track costs and usage for keys separately.

Maybe check this?


from OpenAI API

I have not tried it myself yet though

2 Likes

I don’t think it breaks down on the usage page, though. I find myself checking that less and less, though, and relying on my own backend code to keep it sorted. Would be kinda useful, but I imagine it would make that page load even slower. I’ve watched it evolve for a couple years now. It’s loading a lot faster, but some information was lost as it was too costly to run repeatedly, I imagine. I’m sure they’ll keep iterating and improving.

I think it might?

The way it looks to me, the whole platform page switches to another organization

1 Like

Ooh, as I said, I haven’t been on that page in a few days, but it appears you’re correct.

ooh

Very cool!

But I guess, they mean it in a way that each organization is a separate account?
And I can invite someone to my organization, and then he can use his own API keys with the API header of my org to have the cost/usage go to my org.

Or at least I dont see how to create another org / label on my account.

I might have misunderstood this part


I guess I thought you can have multiple “labels” in one org

hmm
not quite sure here

1 Like

We do plan to track number of calls. But, we were not planning to track number of tokens used in each API call and specific model used…If openAI does not track at API key level, we may need to track these and store them

1 Like

We’re in need of this too, and while it’s probably coming at some point, it just seems like the current API key/auth pattern is really structured for individual use rather than most other services that are project/app-based. So we plan on building a small language-agonistic tool to automatically track costs by key (and more). If anyone is interested in this send me a message and I’ll see what we can do.

2 Likes

Any updates here? It would be a waste to let userland figure out billing here, and then later having to throw away that effort because OpenAI understood the importance (and saw $ in it).

Think of OpenAI as an electricity supplier, they track how much you use, but not what you use it for, it is your responsibility to track your users usage, and by extension your API keys usage at the application level and not from the account panel.

It could be that at some future point usage by key becomes available, but as keys can be transient, I doubt it.

So he thinks of openAI’s services as a “Utility” (legal speak)

Sure, thats an eventual possibility.

Also a good sign. (i wont explain why)

However, the short form is, people are expecting quality from the models as well as consistently.

Thats why version numbers are so important to display on the front end of the service.
that said, its also important to consider what those services are.