With ChatGPT API keys, you can use OpenAI’s ChatGPT API features for your websites or apps. We’ll show you how to generate keys and use the API.

What is the ChatGPT API?

ChatGPT can not only be used online via a free OpenAI account. It can also be in­teg­rated into your projects. In March 2023, OpenAI released an API pro­gram­ming interface, more commonly known as an API, to support de­velopers. This API is used to exchange data and func­tion­al­it­ies between ap­plic­a­tions and projects. By lever­aging in­tel­li­gent speech gen­er­a­tion and text creation in your services via the ChatGPT API, you can expand your op­por­tun­it­ies in online marketing, customer service, and product de­vel­op­ment. ChatGPT uses trans­former neural networks for in­tel­li­gent natural language pro­cessing. To do this, the chatbot uses publicly available data and in­form­a­tion from search engines like Google and other databases, among other things.

Chatbots in online marketing are a great example of this. They play an in­creas­ingly important role in improving services like Google or Bing. This is already evident in the speed with which Microsoft expanded its part­ner­ship with OpenAI after the release of ChatGPT. In a very short time, Microsoft made its own AI-powered copilot chatbot in Bing available with the help of ChatGPT. Thanks to the API, other de­velopers can use ChatGPT’s features for their own projects.

Find out more about the basics of ChatGPT in our articles on ar­ti­fi­cial in­tel­li­gence and deep learning.

How do you use ChatGPT’s API?

There are some re­quire­ments to using ChatGPT’s API to develop or optimise your own software. These include:

  • OpenAI account: All users who want to use ChatGPT or the ChatGPT API need an OpenAI account. To do this, register on the OpenAI website with your email address, name, and phone number. You can also use an existing Google or Microsoft account. It’s free to create and takes about a minute. If you already have an account with OpenAI, you can use it for the API.
  • ChatGPT API keys: To use ChatGPT’s API, you need an API Key to give you au­thor­ised access. You can create these via the item ‘View API keys’ in your account menu or via a direct link to ChatGPT’s OpenAI API keys.
  • ChatGPT in­teg­ra­tion: You can now use API keys to integrate ChatGPT’s text- and voice-based func­tion­al­it­ies directly into your websites, ap­plic­a­tions, or projects.
IONOS AI Model Hub
Your gateway to a sovereign mul­timod­al AI platform
  • 100% GDPR-compliant and securely hosted in Europe
  • One platform for the most powerful AI models
  • No vendor lock-in with open source

How do you request ChatGPT API keys?

Creating and in­teg­rat­ing API keys are at the heart of the ChatGPT API, because without au­then­tic­a­tion keys, you don’t have access. That’s why we’re ded­ic­at­ing the next section to ChatGPT API keys, to show you how to create a key and where to find your API keys:

Step 1: Log in using your OpenAI account or your linked Google or Microsoft account. Here you’ll see the item ‘API’.

Image: The API menu within OpenAI apps
To use APIs and create API keys, select ‘API’.

Step 2: Detailed in­form­a­tion on the purpose and ap­plic­a­tion of APIs can be found in the OpenAI menu under ‘API reference’.

Image: The item ‘API reference’ in the OpenAI menu
Choose ‘API reference’ for a com­pre­hens­ive overview of how to use APIs.

Step 3: Go to ‘View API keys’ in the menu or go directly to the page for OpenAI API keys. Here you’ll find API keys that are already created and in use with in­form­a­tion on when they were created and last used.

Image: The ‘View API keys’ tab in the menu
From your user menu, you can find your API keys or create keys via ‘View API keys’.

Step 4: Create a new API key by clicking on ‘Create new secret key’. You can now use the generated key for your own ap­plic­a­tions or services. Each key provides access to GPT-4 func­tion­al­it­ies as well as ChatGPT models.

Image: The ‘Create new secret key’ option in the API Key menu
In the API keys menu, select ‘Create new secret key’ to create a new API key.

Not only does OpenAI let you create keys in the API Keys menu, it also gives you access to API documents, tutorials, and examples. You can even test out the func­tion­al­it­ies in the OpenAI Play­ground first. Here you can learn how to integrate a chatbot via the API, how to embed ChatGPT in programs, complete code, or use image gen­er­a­tion and text com­ple­tion.

IONOS Developer API
Manage your hosting products through our powerful API
  • DNS man­age­ment
  • Easy SSL admin
  • API doc­u­ment­a­tion

How much does the API cost?

Unlike an OpenAI account, using the ChatGPT API and API keys isn’t free. Depending on the number of words generated through ChatGPT’s API, you’ll pay a certain amount. This is cal­cu­lated in tokens from OpenAI. It’s good to know that the paid use of the API isn’t included in the paid sub­scrip­tion for ChatGPT Plus. Sub­scribers will be charged an extra $20 ( around £17) per month. New users will also receive $5 (around £4) worth of free tokens, which they can use to test the API play­ground.

Roughly speaking, you can plan for the following costs. Although the specific costs are still subject to changes by OpenAI:

  • About 750 words equals 1,000 tokens
  • With GPT-4, 1,000 tokens cost about $0.03 to $0.12 (around £0.025 to £0.10)
  • With GPT-3.5 Turbo (Davinci version), 1,000 tokens cost about $0.02 (around £0.016)
  • To avoid un­man­age­able costs, the maximum amount can be capped
Tip

Our Digital Guide is packed with more how-tos to help you with other API keys:

Go to Main Menu