# Manage API keys

As a space owner or admin, you can set [API keys](https://autosheet.com/docs/resources/guides/concepts#api-key) for your [space](https://autosheet.com/docs/resources/guides/concepts#space). Models available with the keys will be accessible to all users in the space.

Using API keys offers several benefits:

- **More models.** Access a [wider range of models from a bigger pool of AI providers](https://autosheet.com/docs/resources/models/ai-providers-and-models#byok) than what is available [without an API key](https://autosheet.com/docs/resources/models/ai-providers-and-models#tk).
- **More control.** Monitor and manage AI usage and costs directly on the AI provider's platform.
- **Improved privacy.** We do not log inputs and outputs when you use a connected model. For more information, see our [security and privacy FAQ](https://autosheet.com/docs/resources/security-and-privacy-faq#how-is-my-data-processed).
- **Reduced costs.** If you're on a [pay-as-you-go space](https://autosheet.com/docs/resources/pricing/pay-as-you-go), using an API key reduces costs. You pay the model usage fees directly to the AI provider, while paying a reduced service fee for Autosheet.

## 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:

- [OpenAI Platform](https://platform.openai.com/api-keys) for GPT models and fine-tuned models
- [Anthropic Console](https://platform.claude.com/settings/keys) for Claude models
- [DeepSeek Platform](https://platform.deepseek.com/api_keys) for DeepSeek models
- [Google AI Studio](https://aistudio.google.com/app/apikey) for Gemini models
- [Mistral AI](https://admin.mistral.ai/organization/api-keys) for Mistral models
- [Perplexity](https://www.perplexity.ai/account/api/keys) for Perplexity models
- [xAI Cloud Console](https://console.x.ai/) for xAI models

## Set API keys

**Prerequisites**

You are the owner or an admin of the space.

**Google**

1. Create an API key or request an API key from your AI provider platform admin. [Learn more.](https://autosheet.com/docs/gpt-for-sheets/setup/manage-models/manage-api-keys#create-api-keys)

2. Sign in to the [Autosheet dashboard](https://dashboard.autosheet.com/) 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](https://autosheet.com/docs/article-images/dashboard/api-keys-set-google.png)

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](https://autosheet.com/docs/article-images/dashboard/api-keys-save.png)

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

**Microsoft**

1. Create an API key or request an API key from your AI provider platform admin. [Learn more.](https://autosheet.com/docs/gpt-for-excel/setup/manage-models/manage-api-keys#create-api-keys)

2. Sign in to the [Autosheet dashboard](https://dashboard.autosheet.com/) with your Microsoft or 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](https://autosheet.com/docs/article-images/dashboard/api-keys-set-microsoft.png)

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](https://autosheet.com/docs/article-images/dashboard/api-keys-save.png)

You have set the API key. All users in the space can now use any model available with the key in GPT for Excel – Autosheet and GPT for Word.

## Check API keys

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

### Check all API keys at once

**Google**

1. Sign in to the [Autosheet dashboard](https://dashboard.autosheet.com/) with your Google account.

2. In the sidebar, select **AI provider keys**.

3. Click **Check all API keys**.

   ![Edit an API key](https://autosheet.com/docs/article-images/dashboard/api-keys-check-all.png)

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

   ![Edit an API key](https://autosheet.com/docs/article-images/dashboard/api-keys-check-all-invalid.png)

   If a key is invalid, [create a new key](https://autosheet.com/docs/gpt-for-sheets/setup/manage-models/manage-api-keys#create-api-keys) and replace the invalid value with the new one.

**Microsoft**

1. Sign in to the [Autosheet dashboard](https://dashboard.autosheet.com/) with your Microsoft or Google account.

2. In the sidebar, select **AI provider keys**.

3. Click **Check all API keys**.

   ![Edit an API key](https://autosheet.com/docs/article-images/dashboard/api-keys-check-all.png)

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

   ![Edit an API key](https://autosheet.com/docs/article-images/dashboard/api-keys-check-all-invalid.png)

   If a key is invalid, [create a new key](https://autosheet.com/docs/gpt-for-excel/setup/manage-models/manage-api-keys#create-api-keys) and replace the invalid value with the new one.

### Check a specific API key

**Google**

1. Sign in to the [Autosheet dashboard](https://dashboard.autosheet.com/) 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](https://autosheet.com/docs/article-images/dashboard/api-keys-edit.png)

4. Click **Check**.

   ![Edit an API key](https://autosheet.com/docs/article-images/dashboard/api-keys-check-one.png)

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

   ![Valid API key](https://autosheet.com/docs/article-images/dashboard/api-keys-check-one-valid.png)

   ![Invalid or revoked API key](https://autosheet.com/docs/article-images/dashboard/api-keys-check-one-invalid.png)

   If the key is invalid, [create a new key](https://autosheet.com/docs/gpt-for-sheets/setup/manage-models/manage-api-keys#create-api-keys) and replace the invalid value with the new one.

**Microsoft**

1. Sign in to the [Autosheet dashboard](https://dashboard.autosheet.com/) with your Microsoft or 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](https://autosheet.com/docs/article-images/dashboard/api-keys-edit.png)

4. Click **Check**.

   ![Edit an API key](https://autosheet.com/docs/article-images/dashboard/api-keys-check-one.png)

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

   ![Valid API key](https://autosheet.com/docs/article-images/dashboard/api-keys-check-one-valid.png)

   ![Invalid or revoked API key](https://autosheet.com/docs/article-images/dashboard/api-keys-check-one-invalid.png)

   If the key is invalid, [create a new key](https://autosheet.com/docs/gpt-for-excel/setup/manage-models/manage-api-keys#create-api-keys) and replace the invalid value with the new one.

## What's next

**Google**

- [Invite users to your space.](https://autosheet.com/docs/admin/user-management/create-team#invite-users-to-your-space)
- [Manage models for your space.](https://autosheet.com/docs/admin/ai-configuration/manage-models)
- [Manage users in your team.](https://autosheet.com/docs/admin/user-management)

**Microsoft**

- [Invite users to your space.](https://autosheet.com/docs/admin/user-management/create-team#invite-users-to-your-space)
- [Manage API endpoints for your space.](https://autosheet.com/docs/admin/ai-configuration/manage-api-endpoints)
- [Manage models for your space.](https://autosheet.com/docs/admin/ai-configuration/manage-models)
- [Manage users in your team.](https://autosheet.com/docs/admin/user-management)
