Skip to main content

Installation

Install Visual Studio Code

Visual Studio Code: Download

Install the Code GPT Extension

You can install the extension from the Visual Studio Marketplace, Open VSX, or directly from the Extensions tab in Visual Studio Code.

Get your API key

This will differ depending on the provider you choose:

  • OpenAI

    • 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.
    • Copy this API Key to your clipboard.

  • CodeGPT Plus

    • Request your API Key from the CodeGPT Plus
    • Go to the Settings / Access tokens and copy your API Key
    • In VSCode press cmd + shift + p and search Set API Key
    • Paste your API Key

  • Google PaLM 2 with MakerSuite

    • Request access to PaLM 2 in this link PaLM 2 MakerSuite
    • Go to the Get API key menu
    • Create a new API key
    • Copy this API Key to your clipboard
    • In VSCode press cmd + shift + p and search Set API Key
    • Paste your API Key

  • Microsoft Azure

    • Create an account in Microsoft Azure
    • Get access to Azure OpenAI Services
    • Go to Azure OpenAI Studio
    • Get your Endpoint and Secret Key
    • In CodeGPT Settings change the provider to Azure and the model to azure
    • In VSCode press cmd + shift + p and search Set Azure Data
    • Paste the Endpoint and Secret Key

  • Cohere

    • Create an account in cohere.ai
    • Go to your dashboard
    • Copy the API Key
    • In VSCode press cmd + shift + p and search Set API Key
    • Paste your API Key

  • AI21

    • Create an account in AI21
    • Go to your account
    • Copy the API Key
    • In VSCode press cmd + shift + p and search Set API Key
    • Paste your API Key

  • Anthropic

    • Create an account in Anthropic
    • Go to yours API Keys
    • Generate and copy the API Key
    • In VSCode press cmd + shift + p and search Set API Key
    • Paste your API Key

Enter your API Key

Once you have your API Key, you can enter it into CodeGPT:

  • Paste your API Key into the text box and press Enter⏎.
  • Run the command Developer: Reload Window
caution

If you want to remove your API Key from CodeGPT, open the Command Palette and search for CodeGPT: Remove API KEY.

Providers that do not need api key

  • GPT4All

    • Download GPT4All at the following link: gpt4all.io
    • Go to the Downloads menu and download all the models you want to use
    • Go to the Settings section and enable the Enable web server option

  • Ollama

    • Download Ollama at the following link: ollama.ai
    • Install Ollama and then run this command ollama pull codellama
    • You can get more models like: llama2, llama2:13b and llama2:70b