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
RECOMMENDATION:
- Optimal performance with Google Add-Ons is by using the Google Chrome browser.
- If you use multiple accounts in the same Google Chrome Profile, please create a separated Google Chrome Profile for this account. (Google sometime unstable with multi-accounts cookies)
- If you use company email - sometime company emails have restrictions with installation add-ons. It could require asking admin of the company email to configure for allowing installation add-ons or USE a PERSONAL ACCOUNT. (if needed to move subscription, please write to support chat or email — yaroslav91@gmail.com)
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
2. Click on Create new secret key
3. Copy your key to your clipboard
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
7. Click on ‘Refresh account’ after that there will be appeared ‘Set Up OpenAI Key’ button
8. Click on ‘Set Up OpenAI Key’
9. Paste your OpenAI API key where indicated, and click ‘Check’ button
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!
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
Exception: Request failed for https://api.openai.com returned code 404. Truncated server response: { “error”: { “message”: “The model gpt-4-0125-preview does not exist or you do not have access to it.”, “type”: “invalid_requ… (use muteHttpExceptions option to examine full response) (line 366).
It happens due to of your tier in Open AI, please increase your tier in OpenAI and the model will appear for your account.
Official message from OpenAI
On July 6, 2023, we gave access to the GPT-4 API (8k) to all API users who have made a successful payment of $1 or more. We plan to open up access to all developers soon, and then start raising rate-limits after that depending on compute availability. For API accounts created after August 18, 2023, you can get instant access to GPT-4 after purchasing $0.50 worth or more of pre-paid credits. You can read about prepaid billing.
Useful links
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