Manage API endpoints
As a space owner or admin, you can set up API endpoints for your space. Models available through the endpoints will be accessible to all users in the space
API endpoints are available only for Microsoft accounts.
Connect to Azure OpenAI​
GPT for Excel and GPT for Word can connect to Azure AI to use OpenAI models. In Azure AI, each model has a dedicated API endpoint that you use to access the model.
Prerequisites
You are the owner or an admin of the space.
Your space is on the Business or Enterprise plan or pay-as-you-go pricing.
You have an Azure account with Azure AI service access.
You have deployed a model in a project.
To connect to an Azure OpenAI API endpoint:
Get the Azure OpenAI API endpoint details​
To connect to Azure AI from GPT for Excel and Word, you need the endpoint URL, API key, deployment name, and model name for the Azure OpenAI model you want to use.
-
Sign in to Microsoft Foundry.
-
Select the project that has the model you want to use.
-
Click View deployments.
-
In Deployed models, in the models list, click the name of the model you want to use.

-
Select Details.
-
In the model details, copy the Target URI, Key, Deployment name, and Model name.

Set up the Azure OpenAI API endpoint​
-
Sign in to the GPT for Work dashboard with your Microsoft account.
-
In the sidebar, select Custom API endpoints.
-
Click Azure OpenAI API endpoints.
tipIf you already have Azure OpenAI API endpoints set up, click Add an Azure OpenAI API endpoint.
-
Define the endpoint settings:
-
Endpoint URL: Enter the endpoint URL for the model using the Azure OpenAI Chat Completions API endpoint format:
https://<resource-name>.<domain>/openai/deployments/<deployment-name>/chat/completions?api-version=<api-version>If the URL you copied does not use the above format, rewrite it. For example, let's assume that your deployment name is
gpt-5.4-mini, the API version is2025-04-01-preview, and you copied the following URL:https://company-resource.services.ai.azure.com/openai/v1/responsesTo rewrite the URL into the Chat Completions API format, replace everything after the domain with
/openai/deployments/<deployment-name>/chat/completions?api-version=<api-version>and replace the placeholders with your deployment name and the API version:https://company-resource.services.ai.azure.com/openai/deployments/gpt-5.4-mini/chat/completions?api-version=2025-04-01-previewinfoThe
api-versionis the Azure OpenAI REST API version, which is not shown on the Microsoft Foundry model details page. As a rule, use2025-04-01-previewas the value. -
Model name: Enter the model name.
-
API key: Enter the API key for accessing the endpoint.
-
Display name (optional): Enter a custom display name for the model. If not set, the model switcher uses Model name as the display name.

-
-
Click Check to validate the settings and click Save.

You have set up the Azure OpenAI API endpoint. All space users can now use the endpoint model in GPT for Excel and GPT for Word.
To set up another Azure OpenAI API endpoint with a different model, click Add an Azure OpenAI API endpoint and repeat the previous two steps.

Connect to OpenAI-compatible API endpoints​
GPT for Excel and GPT for Word can connect to any AI service that provides an OpenAI-compatible API endpoint. You can connect to two main types of services: cloud-based platforms, which provide access to models over the internet with no software installation or setup required on your part, and local servers, which you run on a local machine, such as your own computer or another computer on a local network. Once connected, all models available through the service become available to use in the add-ins.
Here are some popular services that provide an OpenAI-compatible API endpoint:
-
Cloud-based platforms:
-
Local servers:
Prerequisites
You are the owner or an admin of the space.
Your space is on the Business or Enterprise plan or pay-as-you-go pricing.
You have an endpoint URL and, if needed, an API key for accessing the service.
The endpoint must support the following OpenAI-compatible API resource paths:
/v1/models/v1/completions
You cannot currently use models from OpenAI-compatible API endpoints with the Agent.
Depending on the model you use, the model settings defined in GPT for Work (temperature (creativity), top-p, frequency penalty, and presence penalty) may not work as expected. If you get bad results, try tweaking the settings.
-
Sign in to the GPT for Work dashboard with your Microsoft account.
-
In the sidebar, select Custom API endpoints.
-
Click OpenAI-compatible endpoints.
tipIf you already have OpenAI-compatible API endpoints set up, click Add another OpenAI compatible endpoint.
-
Define the endpoint settings:
-
Endpoint URL: Enter the URL of the service that provides the endpoint.
-
Display name (optional): Enter a short name that is prefixed to the model names in the model switcher. By default, the model names are prefixed with "custom/".
-
API key (optional): If required, enter the API key for accessing the service.

-
-
Click Check to validate the settings and click Save.

You have set up the OpenAI-compatible API endpoint. All space users can now use all models available through the endpoint in GPT for Excel and GPT for Word.
To set up another OpenAI-compatible API endpoint, click Add another OpenAI compatible endpoint and repeat steps 4 and 5.
