Set up Microsoft Foundry
Last validated:
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 base URLs are specific to your Foundry resource and project, and the model names must match your Foundry deployment names.
Aperture routes requests based on the model name, not the LLM client. Any LLM client configured to use Aperture can access any provider your admin has set up. Refer to the provider compatibility reference for the full list of supported providers and API formats.
Prerequisites
Before you begin, you need:
- An Aperture instance 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. Both base URLs are specific to your resource and project; find your resource and project names in the Foundry portal. Model names must match the deployment names in your Foundry project exactly.
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/api/projects/<your-project>/anthropic/",
"apikey": "<your-foundry-api-key>",
"name": "Microsoft Foundry (Anthropic)",
"models": ["claude-sonnet-4-6", "claude-opus-4-7", "claude-haiku-4-5"],
"cost_basis": "azure",
"compatibility": {
"anthropic_messages": true
}
}
}
}
This entry differs from the OpenAI provider as follows:
baseurlends with/anthropic/instead of/openai/, pointing to Foundry's Anthropic-compatible endpoint. The same path-append behavior applies, so keep the trailing slash and do not strip the path segments.anthropic_messagestells Aperture to use the Anthropic Messages API format (/v1/messages) instead of the OpenAI chat completions format. Both providers use the same Foundry API key with the defaultbearerauthorization.
Refer to the provider compatibility 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 LLM clients: Connect coding tools to route requests through Aperture.