API Keys and usage in multi user application

Hi all,

We are creating a mullti user application using Open AI apis. In order to manage billing, usage and rate limits, considering multiple users can use the application at the same time providing attachments which can take large amounts of tokens. We were thinking about creating key per user to manage this. This way we can pass the cost to the user as well easily. How does Open AI support this architecture ? What is the best way to go about this ? Any information, guidance, docs, policies around this will help.

Thanks a lot

1 Like

OpenAI API keys are for you not your users.

They should be used internally to track different departments/projects/products/etc.

You should be tracking your users’ individual use yourself.

Look at it this way, say one of your users thinks you are overbilling them, okay? They sue you. You need to justify what you have billed them. That’s going to be harder to do if all of the numbers are OpenAI’s.

TL;DR: Use your own use and billing software for your clients.