Skip to main content

Set up your Anthropic API key

Set up an Anthropic API key within the add-on settings to use Claude models in GPT for Sheets. You can register both an Anthropic key and an OpenAI key to benefit from a wider range of models.

Prerequisites
  1. Check your permissions on the current spreadsheet, depending on its location:

    • My Drive: You must be the Owner of the spreadsheet. You can find out who the Owner of a file is by checking the file Details.
    • Shared Drive: You must be the Creator of the spreadsheet. You can find out who the Creator of a file is by checking the file Activity.

    If your permissions differ from these, create a Google spreadsheet or ask someone with the appropriate permissions to set up the OpenAI API key for you.

  2. Select Extensions > GPT for Sheets and Docs > Open.

  3. Select API keys from the add-on menu.

  4. Paste your Anthropic API key where indicated, then click Save API key.

  5. (Highly recommended) Test your Anthropic API key:

    1. Open the model switcher dropdown, and select one of the Anthropic Claude models.

    2. Type a simple formula in a cell and get a response from GPT:

      =GPT("Write a tagline for a car")
note

Check our Troubleshooting section if you encounter any issue.

You have set up your Anthropic API key in GPT for Sheets and Docs. Any user with Editor's access to this spreadsheet can now execute GPT functions using this API key. Learn more about who can execute GPT functions in a shared Google spreadsheet.

What's next