How to charge my users who're using one API Key?

Hi All, greetings!
I am new in this wonderful forum, and also new developing in ChatGPT powered mobile apps.
I read most of the messages and replies on this topic, but unfortunately didn’t find (or understand) a solution that I can use or modify.
I have developed a simple GPT app but stuck on the pricing… after weighing differnt options now I am thinking of limiting the customers to a very small group (for now) and compile individual API key to each customer.
Please let me now how to know how many tokens a user have used, so I can use it and publish it to the stores, using just a single API key.
Best regards, MOSA

1 Like

Welcome to the dev forum.

Much better solution to do accounts on your end and bill via Stripe, PayPal, or another service.

I have heard that what you’re requesting is wanted by a lot of others, so maybe OpenAI will make it easier to do in the future.

There’s quite a bit of software that will allow you to do paid accounts via WordPress sites, etc.

Thank you so much for the prompt reply,
I never used stripe before but will give it a shot…
The challenge is, my app uses one API key that’s consumed by all users… but how to know each individual usage is mind blowing to me. OpenAI didn’t think about B2B.

Best, -M

When people sign-up for an account, assign them an id and just attach all their usage to that id?

Or, it’s more they gave us devs a small window to develop our own apps using their API. :wink:

Exactly and that’s what I did. I paid a few bucks and used the API Key in my Android app. I can open an account for each customer and bill them according to their usage… problem is, how can I know the usage of individual customers using the (same) API Key?
Maybe I am missing something…

" have heard that what you’re requesting is wanted by a lot of others, so maybe OpenAI will make it easier to do in the future."
I hope so. A platform to manage your customers, so you can suspend a nonpaying customer… etc.
Thank you for your help

OpenAI is not responsible for anything that happens between you and your clients unless it involves breaking their policies.

If you want to track how each user uses your key you need to track & implement this yourself.

If you plan on billing each person separately you NEED to have this feature.

Thanks Ron for the tip. I will act accordingly.

1 Like

You’ll have to track how much token they use and set a max token per reply to make sure they don’t use too much token!

I have also created an app using OpenAI API but on my side I did a bring your own API key so I don’t have to deal with this pricing. But it depends on what type of experience you want to offer. You can look at my app here: https://www.openassistantgpt.io/