Use models with your own API keys
Using your own API keys is mandatory if you're on a subscription plan. Keys also offer several benefits:
More models. Access a wider range of models.
More control. Monitor and manage your AI usage and costs directly from the AI provider's console.
Improved privacy. We do not log inputs and outputs when you use a model with your own key. See our privacy policy.
Reduced costs. If you're on pay-per-use pricing, using your own key reduces costs. You pay the model usage fees directly to the AI provider, while paying a reduced service fee for GPT for Work.
Create API keys
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 your own API key, go to the AI provider's platform and follow their instructions:
OpenAI Platform for GPT models, fine-tuned models, and OpenAI Assistants
Anthropic Console for Claude models
DeepSeek Platform for DeepSeek models
Google AI Studio for Gemini models
Mistral AI for Mistral models
OpenRouter for access to various models from different AI providers using a single API key
Perplexity for Perplexity models
xAI Cloud Console for xAI models
Set API keys in GPT for Work
You can set your own API keys either in the GPT for Work dashboard or directly in the add-ons.
If you want to share your key with the members of your space, set the key as a space key.
- Excel
- Sheets
- Word
- Docs
Open a Microsoft Excel workbook.
Click GPT for Excel Word in the Home tab.
infoYou can also go to Home > Add-ins > My add-ins > GPT for Excel Word.
In the sidebar menu, select API keys & endpoints.
Enter your API key in the appropriate field and click Save.
You have set the API key. You can now use any model available with the key in GPT for Excel.
You must be the Creator, Editor, or Owner of the spreadsheet to set the API key.
Open a Google spreadsheet.
Select Extensions > GPT for Sheets and Docs > Open.
In the sidebar menu, select API keys.
Enter your API key in the appropriate field and click Save.
You have set the API key. You can now use any model available with the key in GPT for Sheets.
Open a Microsoft Word document.
Click GPT for Excel Word in the Home tab.
infoYou can also go to Home > Add-ins > My add-ins > GPT for Excel Word.
In the sidebar menu, select Manage API keys.
Enter your API key in the appropriate field and click Save.
You have set the API key. You can now use any model available with the key in GPT for Word.
You must be the Creator, Editor, or Owner of the document to set the API key.
Open a Google document.
In the menu bar, select Extensions > GPT for Sheets and Docs > Set API keys.
Enter your API key in the appropriate field and click Save key.
You have set the API key. You can now use any model available with the key in GPT for Docs.
Select a model with an API key
- Excel
- Sheets
- Word
- Docs
Expand the model switcher.
Select a model with a key icon.
Models that are available with your API keys are listed under Use your API key or endpoint and have a key icon in front of their name.
GPT for Excel uses the selected model to generate all responses.
Expand the model switcher.
Select a model with a key icon.
Models that are available with your API keys are listed under Use your API key or endpoints and have a key icon in front of their name.
GPT for Sheets uses the selected model to generate all responses.
Expand the model switcher.
Select a model with a key icon.
Models that are available with your API keys are listed under Use your API key or endpoint and have a key icon in front of their name.
GPT for Word uses the selected model to generate all responses.
Expand the model settings.
Select a model.
Models that are available with your API keys are listed under Use your API key.
GPT for Docs uses the selected model to generate all responses.
Troubleshoot OpenAI API keys
You can use our API key checker to verify that your OpenAI API key is working.
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.
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.

If your API key is not working, check on the OpenAI Platform that the key's permissions aren't restricted. The following permissions are required:
Permission | Description |
---|---|
Models | List available models. |
Model capabilities | Use model capabilities, such as chat completion. |
Assistants | Connect OpenAI Assistants to Google Sheets or Microsoft Excel. |
Fine-tuning | Connect OpenAI fine-tuned models to Google Sheets or Microsoft Excel. |
Files | Use OpenAI Assistants with file search. |
What's next
Learn more about models:
Put your selected model to use:
- Excel
- Sheets
- Word
- Docs
Use bulk AI tools to run prompts on entire spreadsheet columns at once without writing any formulas.
Use GPT functions to run prompts from inside spreadsheet cells.
Use bulk AI tools to run prompts on entire spreadsheet columns at once without writing any formulas.
Use GPT functions to run prompts from inside spreadsheet cells.