Set up Microsoft Foundry
Configure Microsoft Foundry in Aperture so your team can access OpenAI GPT and Anthropic Claude models deployed in Foundry through your tailnet. Foundry serves OpenAI models through an OpenAI-compatible /openai endpoint and Anthropic models through an Anthropic-compatible /anthropic endpoint. Because each endpoint uses a different API format, you configure each as its own provider in Aperture. The model names must match your Foundry deployment names.
Your client and selected provider must support the same API format. Refer to Supported providers and clients for available setup options and requirements.
Prerequisites
Before you begin, you need:
- An Aperture gateway accessible from your device. Refer to get started with Aperture if you have not set this up.
- A Microsoft Foundry resource and project with at least one model deployment.
- A Foundry API key for your resource.
Configure the providers
Add Microsoft Foundry to your Aperture configuration. Aperture's Foundry integration supports OpenAI GPT models and Anthropic Claude models, served through separate endpoints. Configure each endpoint as its own provider entry. Find your resource, project, and deployment names in the Foundry portal. Use the exact deployment names in each provider's models list.
OpenAI GPT models
Configure Foundry's /openai endpoint to serve GPT models:
{
"providers": {
"microsoft-foundry-openai": {
"baseurl": "https://<your-resource>.services.ai.azure.com/api/projects/<your-project>/openai/",
"apikey": "<your-foundry-api-key>",
"name": "Microsoft Foundry (OpenAI)",
"models": ["gpt-5.4", "gpt-5.4-mini", "gpt-5.4-nano", "gpt-5.3-codex"],
"cost_basis": "azure",
"compatibility": {
"openai_chat": true,
"openai_responses": true
}
}
}
}
The configuration fields work as follows:
baseurlintentionally ends with/openai/. Unlike most providers, where you supply only the API root, Foundry serves its OpenAI-compatible API under a project-scoped path. Aperture appends the incoming request path to this base, producing upstream URLs likehttps://<your-resource>.services.ai.azure.com/api/projects/<your-project>/openai/v1/chat/completions. Keep the trailing slash and do not strip the path segments.openai_responsesenables the Responses API, which tools like OpenAI Codex use. When you include acompatibilityblock, set both flags explicitly. Without a compatibility block, Aperture enables onlyopenai_chatby default.cost_basisis set toazureso Aperture prices requests using Azure OpenAI list prices instead of standard OpenAI prices. Useazure-eufor EU-region pricing. Set this field explicitly, because Aperture would otherwise inferopenaipricing from the compatibility flags.
Anthropic Claude models
Configure Foundry's /anthropic endpoint to serve Claude models as a second provider entry:
{
"providers": {
"microsoft-foundry-anthropic": {
"baseurl": "https://<your-resource>.services.ai.azure.com/anthropic/",
"apikey": "<your-foundry-api-key>",
"authorization": "x-api-key",
"name": "Microsoft Foundry (Anthropic)",
"models": ["claude-sonnet-4-6", "claude-opus-4-8", "claude-haiku-4-5"],
"cost_basis": "azure",
"compatibility": {
"anthropic_messages": true
}
}
}
}
This entry differs from the OpenAI provider as follows:
baseurluses the resource-scoped/anthropic/endpoint, without/api/projects/<your-project>. Aperture appends/v1/messages, producinghttps://<your-resource>.services.ai.azure.com/anthropic/v1/messages. Keep the/anthropic/path in the base URL.authorizationis set tox-api-keyto send your Foundry API key in the required header. Foundry's Claude endpoint uses bearer authorization for Microsoft Entra ID tokens, not resource API keys. Refer to Claude in Microsoft Foundry authentication for details.anthropic_messagestells Aperture to use the Anthropic Messages API format (/v1/messages) instead of the OpenAI chat completions format.
Refer to the compatibility flags reference for the full list of flags.
Verify the provider
The best way to verify a connection to a specific model is to send a test request through the Models tab of the Aperture dashboard.
- Open the Aperture dashboard and select the Models tab.
- Find the model you want to test in the list of configured models. If the model is not listed, check your provider configuration and ensure the model name is correct.
- Select the Play icon to the left of the model name to send a test request. If the request succeeds, the icon changes to a green check mark. If it fails, the icon changes to a red "X".
This sends a request from your web browser to the tailnet to verify that Aperture can successfully route requests to the model through the configured provider and that your user account has the necessary permissions to access the model.
Next steps
- Grant model access: Control which models each user or group can access through Aperture.
- Set up the chat UI: Let users talk to your configured models from their browser.
- Set up LLM clients: Connect coding tools to route requests through Aperture.