Skip to main content

Manage API keys for GPT for Sheets

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. The keys you set for a Google account space apply to GPT for Sheets.

info

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 AI provider 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.

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 AI provider keys.

  3. Click Check all API keys.

    Check all API keys

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

    Invalid API keys

    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 AI provider keys.

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

    Edit an API key
  4. Click Check.

    Check 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​

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.
Fine-tuningConnect OpenAI fine-tuned models to Google Sheets.

What's next​