Skip to main content

Use models with your own API keys

You do not need your own API key to use GPT for Work extensions (except GPT for Docs), but using your own key offers several benefits:

  • Models: Access a wider range of models.
  • Control: Monitor and manage your AI usage and costs directly from the AI provider's console.
  • Privacy: We do not log inputs and outputs when you use a model with your own API key. See our privacy policy.
  • Costs: If you're on self-service pricing, using your own API 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

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

Check your API key (OpenAI)

You can check that your OpenAI API key is working with our API key tester.

  1. Open the API key tester.

  2. Click Use template to create a copy of the template in your own Google Sheets.

  3. 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 your API key.

If your API key is not working, check in the OpenAI platform that its permissions aren't restricted. The following permissions are required:

PermissionDescription
Models and Model capabilitiesFor all API keys
AssistantsTo connect OpenAI Assistants to Google Sheets / Microsoft Excel
Fine-tuningTo connect OpenAI fine-tuned models to Google Sheets / Microsoft Excel
FilesTo use OpenAI Assistants with File search

Set API keys in GPT for Work

  1. Open a Microsoft Excel workbook.
  2. Click GPT for Excel Word in the Home tab.

    Home Ribbon
    info

    You can also go to Home > Add-ins > My add-ins > GPT for Excel Word.

  3. Select API keys from the sidebar menu.

  4. Enter your API key in the appropriate field and click Save. For OpenAI API keys, you can also enter your OpenAI organization ID. If you are part of multiple organizations, entering an organization ID ensures that you get billed on the correct account.

You have set your own API key in GPT for Excel. You can now expand the model switcher, and select one of the models or Assistants associated with your API key.

What's next
Use GPT for Excel bulk tools or GPT functions.

Learn more

For more information about selecting a model, see: