Skip to main content


Official website

OpenAI is an artificial intelligence research organization that aims to develop and promote friendly AI in a way that benefits all of humanity. They have developed a number of AI models, including GPT-3 and GPT-4, arguably the most advanced natural language processing models in the world.

Connect your OpenAI Account

  • Go to the API Keys page on OpenAI.

  • Log in with your OpenAI account (or create a new account

  • Click the button labeled Create a new secret key

  • A new dialog window will appear, containing a text box with your API key.

  • Go to VSCode and choose OpenAI as Provider

  • Set connection on 🔑 button.

  • Paste API Key here, and click on Connect and Organization ID here:

Remove Key

If you want to remove your API Key from CodeGPT, select Edit Connection on 🔑, and click on Disconnect

GPT models available in Code GPT

  • gpt-4
  • gpt-4-32k
  • gpt-4-1106-preview
  • gpt-3.5-turbo
  • gpt-3.5-turbo-16k


To use this extension you must have credits loaded into your OpenAI account. This extension uses the Official OpenAI API which is a paid API.

If you do not have credits the extension will show the following OpenAI API error: You exceeded your current quota, please check your plan and billing details

To review your account and the credits you have available, you must log in with your account at

In the menu select Manage Account, then in the Usage section, you will be able to see the amount of credits available and used.

OpenAI Account

Manage Account

In this image you can see that $13 USD has been used out of a total of $18.



API Errors

If you are getting API errors check the following link: OpenAI API Errors

Typical OpenAI errors