How to set up OpenAI, Claude, Gemini, and Mistral API keys - GPT for Google Sheets

Before you have started

  • Install GPT for Sheets Add-On
  • Upgrade subscription to Pro User plan
  • Optional -> RECOMMENDATION: The best way to ensure optimal performance with Google Add-Ons is by using the Google Chrome browser. This helps bypass any potential issues that may arise from compatibility with other browsers.

!!! After subscribing or changing your plan, please click on the ‘Refresh Account’ button located on the sidebar

refresh-account.png

RECOMMENDATION: The best way to ensure optimal performance with Google Add-Ons is by using the Google Chrome browser. This helps bypass any potential issues that may arise from compatibility with other browsers.

Create an OpenAI API key

Create an OpenAI API key to gain access to the ChatGPT API and other OpenAI APIs. This key allows OpenAI to track your usage and generate accurate billing.

1. Log in or sign up to the OpenAI platform

sign-up-openai.png

2. Click on Create new secret key

generate-api-key.png

3. Copy your key to your clipboard

created-api-key.png

4. Open a spreadsheet with installed add-on and Launch the sidebar Extensions > GPT for Docs, Sheets, Forms, Slides > Launch

5. Please make sure that you have removed all other add-ons that provides GPT functions, to dont have conflicts

6. At this step you should have subscription to Pro User plan

created-api-key.png

7. Click on ‘Refresh account’ after that there will be appeared ‘Set Up OpenAI Key’ button

refresh-account.png

8. Click on ‘Set Up OpenAI Key’

set-up-api-key.png

9. Paste your OpenAI API key where indicated, and click ‘Check’ button

check-and-save-api-key.png

10. Click on ‘Save’ button

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

=GPT(“Write a title for coffee shop”)

Important!

IMPORTANT-GPT-for-Sheets

After getting a final result, please click on ‘Replace All GPTs’ or ‘Replace Selected’ button to replace the formula with the result. If to don’t do this - Google Sheets re-execution all formulas on refreshing page and every 1–2 minutes. (could affect your credits on Open AI or Internal credits, depends on plan)

Troubleshooting

You exceeded your current quota, please check your plan and billing details

OpenAI transitioned to prepaid plans starting March 25, 2024. Please review your OpenAI API Key account here: Billing for OpenAI Account

Other possible issues could be found here: Troubleshooting

You’ve configured your OpenAI API key within GPT for Sheets and Docs. Now, any user granted Editor access to this spreadsheet can utilize GPT functions using this API key

How to create Mistral API keys

1. Please create an account https://console.mistral.ai/

2. Go to https://console.mistral.ai/api-keys/ and create an api key

3. Here is the pricing page for the Mistral api keys: https://docs.mistral.ai/platform/pricing/

How to create Claude (Anthropic) api key

1. Please follow this official page https://docs.anthropic.com/claude/reference/getting-started-with-the-api

2. If you have already account, check your keys here: https://console.anthropic.com/settings/keys

How to create Gemini API keys

You can create your api key at this page: https://aistudio.google.com/app/apikey