HomeTechnologyNewsHow to get an OpenAI API key

How to get an OpenAI API key

- Advertisement -
- Advertisement -
- Advertisement -
- Advertisement -


Hannah Stryker / Instructional Geek
  1. Go to the OpenAI platform website at platform.openai.com and sign in with an OpenAI account.
  2. Click on your profile icon in the top right corner of the page and select “View API Keys”.
  3. Click “Create new secret key” to generate a new API key.

Many AI apps and tools now require you to bring your own OpenAI API key. You can generate one on the OpenAI website and it comes with $5 of free credit. Here’s how to get started with the OpenAI API to get ChatGPT-style AI features outside of the standard ChatGPT interface.

How to get an OpenAI API key

To get started, head over to the official OpenAI platform website. If you haven’t already, create an account by following the easy steps on the website. After that, you can enter the email address and password linked to your OpenAI account to sign in or sign in with an existing Google or Microsoft account.

Once you’ve created an account or logged into an existing account, you’ll see your name and profile icon in the upper right corner of the OpenAI platform home page.

To get an API key, click on your name in the top right corner to open a dropdown menu. Then, click on the “View API Keys” option.

Numbered red arrows showing how to get to the OpenAI website page where you can generate an API key.

At this point, you’ll be on a page that has an option to “Create a new secret key” near the center. If you don’t have an API key, click this button to get one. Make sure to save the API key as soon as possible. Once the window displaying it is closed, you will not be able to open it again.

A red arrow pointing to a button that says "Create new secret key".

Is an OpenAI API key free?

You can create an OpenAI API key for free. New users of the free trial receive a $5 (USD) credit. However, this expires after three months. Once your credit has been used up or expires, you can enter your billing information to continue using the API of your choice. Please note that if you do not enter any billing information, you will still have login access, but you will not be able to make any further API requests.

OpenAI imposes rate limits at the organization level; if you are using their tools for business, you will have to pay depending on a few factors. Rate limits are measured in two ways: RPM (requests per minute) and TPM (tokens per minute).

If you’re looking for specific costs based on the AI ​​model you want to use (for example, GPT-4 or gpt-3.5-turbo, as used in ChatGPT), see OpenAI’s AI model pricing page. In many cases, the API could be much cheaper than a paid ChatGPT Plus subscription, although it depends on how much you use it. For a full overview of exact rate limits, examples, and other useful information, visit the OpenAI Rate Limits page.

RELATED: GPT 3.5 vs. GPT 4: What’s the difference?

How to fix “Incorrect provided API key” for OpenAI

Before sending email complaints to OpenAI, you should check the following:

  • Look for typos and extra spaces in your API key
  • Make sure you are not using the API key for a different organization or AI project
  • Check if your API key has been deleted, disabled or cached

Avoiding the errors mentioned above can quickly and easily solve your problem and get you back to work as soon as possible.

What to do if an open AI API key doesn’t work

If you’re still having trouble despite not having any of the errors we listed above, try clearing your browser’s cache and cookies before trying again.

To ensure that your API key is in the correct format, you can check the authentication page on the OpenAI platform website. This page details how to check if your API is working through how requests are made and also lists some useful examples. If all else fails, you can potentially generate a new API key (follow the steps at the top of this article).

Additionally, we recommend that you refer to the OpenAI article on best practices for API key security. It can help you avoid common problems and also explains how the API key process works.

RELATED: What is an “API” and how is it used?


- Advertisement -
- Advertisement -
Must Read
- Advertisement -
Related News
- Advertisement -