Skip to main content

Set and manage API keys

Using API keys offers several benefits:

If you're on a subscription plan, using an API key is mandatory since you do not have access to models without a key.

Create API keys

info

Make sure your keys belong to an organization or project with the following rate limits:

  • RPM (requests per minute) ≥ 1,000

  • TPM (tokens per minute) ≥ 1,000,000

The actual limits required depend on your workload requirements.

To create an API key, go to the AI provider's platform and follow their instructions:

Set API keys

You set API keys for your space in the GPT for Work dashboard. You set the keys per platform, so the keys you set for a Google account space apply to both GPT for Sheets and GPT for Docs, while the keys your set for a Microsoft account space apply to both GPT for Excel and GPT for Word.

note

The API keys you set work for all users in your space. Users automatically have access to models associated with the keys, but only the space owner (you) and admins can set and manage the keys. Billing for a key reflects its usage by all users.

  1. Create an API key or request an API key from your AI provider platform admin. Learn more.

  2. Sign in to the GPT for Work dashboard with your Google account.

  3. In the sidebar, select API keys.

  4. In the AI providers list, click the provider whose API key you want to set.

    Select the AI provider
  5. Set the API key:

    1. In the text field, enter the key.

    2. Click Check to verify that the key is valid.

    3. Click Save.

    Set the API key

You have set the API key. You can now use any model available with the key in GPT for Sheets and GPT for Docs.

Check API keys

You can verify whether the API keys you have set are valid.

Check all API keys at once

  1. Sign in to the GPT for Work dashboard with your Google account.

  2. In the sidebar, select API keys.

  3. Click Check all API keys.

    Edit an API key

    The page displays a warning for each key that is invalid.

    Edit an API key

    If a key is invalid, create a new key and replace the invalid value with the new one.

Check a specific API key

  1. Sign in to the GPT for Work dashboard with your Google account.

  2. In the sidebar, select API keys.

  3. Click the edit icon for the key you want to check.

    Edit an API key
  4. Click Check.

    Edit an API key

    The UI displays a message indicating whether the key is valid or invalid.

    Valid API key
    Invalid or revoked API key

    If the key is invalid, create a new key and replace the invalid value with the new one.

Troubleshoot OpenAI API keys

You can use our API key checker to check which models are available through your OpenAI key.

  1. Open the OpenAI API key checker and click Use template.

    Google Sheets creates a copy of the spreadsheet in your Google drive and opens the spreadsheet for editing.

  2. Enter your OpenAI API key in cell B12.

The results show the status of your OpenAI API key and the models and Assistants available through the key.

API key tester

If your API key is not working, check on the OpenAI Platform that the key's permissions are not restricted. The following permissions are required:

PermissionDescription
List modelsList all available models.
Model capabilitiesUse model capabilities, such as chat completion.
AssistantsConnect OpenAI Assistants to Google Sheets or Microsoft Excel.
Fine-tuningConnect OpenAI fine-tuned models to Google Sheets or Microsoft Excel.
FilesUse OpenAI Assistants with file search.

What's next