Home/Insights/Data Engineering

How to Create an OpenAI API Key & Set Up Billing (Full Step-by-Step Guide)

By Ani BjörkströmPublished 9 August 2025Reviewed 20 September 20262 min video + articleData Engineering

How to Create an OpenAI API Key & Set Up Billing (Full Step-by-Step Guide)
▶ Watch the full 2-minute tutorial · free on YouTube

AI TOOLS

How Do You Create an OpenAI API Key and Set Up Billing Correctly?

In short: Everything happens on platform.openai.com: account creation, API key generation, billing setup and organization ID all live in the same dashboard.

Key takeaways

  • Everything happens on platform.openai.com: account creation, API key generation, billing setup and organization ID all live in the same dashboard.
  • Copy your secret key immediately after creating it — it is shown only once and must never be shared publicly.
  • Set a budget limit and an email alert (the tutorial uses an $8 alert) so API usage can never silently drain your payment card.

In this step-by-step guide, Ani Björkström covers the four things every new OpenAI API user needs: creating an account, setting up billing, generating an API key, and finding the organization ID.

How do you create an OpenAI platform account and API key?

Go to platform.openai.com and click "sign up", or "log in" if you already have an account; with a Gmail address, "continue with Google" authenticates you directly without typing your name or email. Once inside, type "API key" into the left search bar, click "create new secret key", name it, select the default project, and create it. Copy the key right away — you will not be able to see it again later — and never share it publicly.

How do you add billing and control your spending?

New users must add payment details before the API works. Search for "billing overview", open "payment methods", and add your credit or debit card. Then, under "overview", define how much money the API may draw from your account: "edit budget" sets a limit, and alerts notify you by email — in the tutorial's setup, an alert fires as soon as usage reaches $8.

Where do you find your organization ID?

The organization ID sits under "General" on the left side of the platform. Open that section and copy the ID from its field. The full setup order is summarized below.

StepWhereAction
1. Accountplatform.openai.comSign up, ideally with "continue with Google"
2. API keySearch: "API key"Create new secret key, copy it immediately
3. BillingSearch: "billing overview"Add payment method, set budget and alerts
4. Organization IDGeneral settingsCopy the organization ID

FAQ

Can I view my API key again after creating it?

No. The key is shown once at creation, so copy it right away.

Do I need a payment card before using the API?

Yes. New users must add a credit or debit card under billing before API calls will work.

How do I stop the API from overspending?

Use "edit budget" to cap spend, and create an email alert — for example at $8 — so you are warned early.

Full transcript of the video (460 words, 3 sections)

0:00 Hey there, Annie here. Welcome to this step-by-step tutorial on setting up your OpenAI API account. Today, we will walk through one, creating your account. Two, setting up billing. Three, creating an API key. Four, getting your organization ID. Let's get started. First, let's create your account. Open your web browser and navigate to platform.openai.com. On the right side of the screen, you'll see two options. Click login if you already have an account on platform.openai.com. If you don't have an account, click sign up. If you have a Gmail account, I recommend choosing continue with Google. Once you select it, you'll be authenticated directly via your Google account. No need to manually type in your first name, last name, or email. When you're inside the platform, go to the search bar on the left side of the screen, type API key and press enter.

0:55 As you can see here, I already have an API key set up. If this is your first time, click create new secret key on the left side. Give your key a name, select default project under project, and then click create secret key. Your key will now be generated. Make sure you copy it right away because you won't be able to see it again later. Also, remember, this is sensitive information. Do not share your API key publicly. If you're a new user, you'll also need to add your payment details before you can use the API. In this step, I will help you to add a billing account, and for doing it, you will go to the search button, and you will type billing overview. And here, you will click on payment methods, add payment method, and you will add information about your credit card or debit card, and after that, you will do add payment method.

1:42 You can see that I have already added my payment method, and after that, you will go to overview and define how much money you want ChatGPT to take from your billing account. And if you're clicking on edit budget, you can define the limit for you. You can even create alerts. In my case, as soon as it will use $8, then I will get an alert sent to my email. In this section, I will show you how to get your organization ID. You will go to general on the left side of the screen, and then under general, you can see organization ID and copy-paste your own organization ID. And that's it. You now have your OpenAI API account fully set up. I'd love to hear from you. Drop a comment below telling me what tutorial you'd like to see next. Thanks for watching, and I'll see you in the next one.

Want this working inside your finance team?

Ani Björkström

Ani Björkström — founder of QvantX Sweden AB, a Stockholm consultancy building AI solutions for banks, asset managers and finance teams. Anthropic partner. Every article starts from a real client build, minus the confidential parts. LinkedIn →