OpenAI API Key

OpenAI provides access to models such as GPT-4o, GPT-5, and others through its developer platform. The API key you generate here is separate from any ChatGPT subscription you might have.

Prerequisites

You need the following:

  • An email address, or a Google, Microsoft, or Apple account for single sign-on

  • A payment method (credit or debit card) for purchasing API credits

Step-by-step instructions

Follow the steps to set up the OpenAI API key:

1

Go to platform.openai.comarrow-up-right, and create your account using an email address or a single sign-on (SSO) provider.

2

Review the information. If prompted, enter a password in the Password field, and then click Continue.

3

In the Full name field, enter your name, enter your date of birth in the Birthday field, and then click Finish creating account.

4

On the Welcome to OpenAI Platform page, enter a name in the Organization name field, select an option in the What best describes you? list, and then click Create organization.

5

On the Invite your team page, enter email addresses in the Emails field, assign the designated role, and then click Continue. To skip this step, click I'll invite my team later.

6

On the Make your first API call page, enter a name in the API key name and Project name fields, and then click Generate API Key. To skip this step, click I'll do this later. Every API key belongs to a project inside your organization. You can create a project or use the default one.

circle-info

Tip: Go to https://platform.openai.com/api-keysarrow-up-right, and click Edit to redefine the API key permissions.

7

On the Make your first API call page, click Copy to copy your new API key. You can also try out the new API key by selecting the curl, Node, or Python tab to view the code examples. Click Continue.

circle-exclamation
8

On the Add some API credits page, select a credit amount, and then click Purchase credits. To skip this step, click I'll buy credits later.

Test your key

Store your key as an environment variable (for example, OPENAI_API_KEY), and use the official Python or Node.js SDK. Alternatively, test with a simple curl request using the Authorization: Bearer header.

Last updated