Skip to main content

[GPT for Sheets] API key issues

OpenAI API not working with your key

Problem: While your OpenAI API key is recognized as valid, it is not working due to one or more of the following reasons:

  • You haven't purchased OpenAI credits (if you're on a prepaid billing plan).
  • You haven't added a payment method to your OpenAI account (if you're on a legacy monthly billing plan).
  • Your default OpenAI organization isn't correctly set.
  • You have added a payment method or purchased OpenAI credits within the last 30 minutes and you still get this message.
Solutions
  1. Go to OpenAI billing settings.
  2. Add payment details.
  3. Purchase OpenAI credits.
  4. Select API keys from the add-on menu to ensure your OpenAI organization is correctly configured.
  5. Wait up to 30 minutes for your OpenAI API key to become active.
Solution for immediate use: If immediate use is needed and using your API key is not a priority, select Continue without API key to clear it from GPT for Sheets. Learn more about billing.

I've entered my OpenAI API key and it's not working

Problem: You have entered an OpenAI API key in the GPT for Sheets sidebar and you cannot use it.
Solutions
  • While you have entered your OpenAI API key, you also need to purchase a pack in GPT for Sheets to use GPT functions within a Google spreadsheet. Learn more.
  • If you have purchased a pack in GPT for Sheets and it's still not working, then you can check if your OpenAI API key is valid by trying the solutions in Your API key is too limited

Your API key is too limited

Problem: If your OpenAI organization is using a free trial, the rate limits of your API key will be too low to be used in GPT for Sheets.
Solutions

If you are not using an OpenAI free trial account

Check that your OpenAI organization is correctly set in GPT for Sheets:

  1. Select API keys from the add-on menu.
  2. Enter your OpenAI organization ID in the format org-xxxxxxxxxxx, and click Save. This step is crucial if you are part of multiple organizations, as it ensures that billing for usage in both GPT for Sheets and GPT for Docs is attributed to the appropriate account.

    Important Note: To check if the organization you are using has remaining credits, follow these steps:

    1. Click on your user icon in the bottom left corner and select the appropriate organization.

    2. Go to Billing settings to check if you have remaining credits.

If you are using an OpenAI free trial account

  • Option 1: Continue without an API key.
    This option is suitable for immediate use and if using your API key is not a priority. Select Continue without API key to clear it from GPT for Sheets. Learn more about billing.
  • Option 2: Buy OpenAI credits for increased API rate limits.
    1. Go to OpenAI billing settings.
    2. Add your payment details.
    3. Purchase OpenAI credits starting at $5 to upgrade your account from the Free tier to Tier 1. This change increases your rate limit from 3 to 3,500 requests per minute with the gpt-3.5-turbo model. Note that TPM (Tokens Per Minute) limitations still apply, and further tier progression is necessary for greater TPM access.
    4. Wait up to 30 minutes for the new API key limit to become active.