Create account and API key with API?

Howdy,

Is there a way to create new accounts and or API keys with the API. Am I overlooking it?

It seems like a pretty common B2B use case would be creating open ai accounts (or apikeys) for clients when onboarding them into a SaaS product.

Otherwise the only other options are:

  1. Tell your clients to go create an OpenAI account and send us your API key so you can track your OpenAI fees.
  2. Build an elaborate usage tracking system that tracks all your clients’ usages, with all usage tied to your own API key

there is another option. you can create the API keys in advance and just pop one by one during user registration. the only problem is you need to store the unused API keys somewhere.

1 Like

Thanks supershaneski,

Good idea about pre creating them.
I wonder if there is a limit on how many API keys one account or organization can have.

And yes great points about unused key storage.
Definitely security risks here if these are not encrypted at rest and in transit.
It would need to be done really well.

Did you find a solution?

I am also looking to create several API Keys and assign them to my clients…

Count the tokens per User and invoice them. Just needs one key.

1 Like