Skip to main content
Microsoft Foundry provides one account for Azure OpenAI models and models from other publishers, including Anthropic, Cohere, Meta, and Mistral. The integration is generally available in TrueFoundry v0.175.0. It uses the OpenAI-compatible v1 surface for compatible deployments and provider-specific routes where required. Moving an existing Azure OpenAI or Azure AI Foundry account is covered in Migrate to Microsoft Foundry. Hub and hub-based Azure resources cannot be migrated.

Before you start

You need:
  • A Microsoft Foundry resource with one or more deployed models.
  • The resource’s OpenAI endpoint.
  • The project endpoint used for deployment discovery and provider-specific Foundry routes.
  • An API key or one of the supported Azure identity authentication methods.
  • A TrueFoundry API key for requests through the AI Gateway.

Add a Microsoft Foundry account

1

Select Microsoft Foundry (New) as the provider

From the TrueFoundry dashboard, go to AI Gateway > Models, click Add Model and choose To New Provider Account. Select Microsoft Foundry (New) from the provider list.
Add Provider Account page listing the supported model providers

Choose a provider in Add Provider Account

2

Configure the resource

Enter an account name, the Azure OpenAI endpoint, and the Microsoft Foundry project endpoint.The OpenAI endpoint should be the resource URL, for example:
The project endpoint should include the project path, for example:
Microsoft Foundry Endpoints

Microsoft Foundry Endpoints

Microsoft Foundry Configure Account form in the provider account setup drawer

Configure Account for Microsoft Foundry

3

Configure authentication

Configure authentication at the account level using an API key, certificate, client secret, or workload identity federation.See the guides for certificate authentication, client secret authentication, and workload identity federation.
4

Add or discover deployments

Use model discovery when the project endpoint is available, or add deployments manually.A model integration uses:
  • Name: the integration name used in Gateway model IDs.
  • Model ID: the deployment name in Microsoft Foundry.
  • Foundation model: the underlying model used for catalogue metadata and routing.
  • Deployment type: standard, global, datazone_us, or datazone_eu.
  • Model types: the operations supported by the deployment.
5

Save and grant access

Click Test Credentials to check the account against the selected models, or click Save without Testing. To keep the account in Git instead, click Apply using YAML and apply the generated spec with tfy apply.To let other users, teams or virtual accounts use or manage these models, open Manage Accounts, click ⋮ on the account and choose Access Control > Grant Access. See Access control.

Discover deployments

Model discovery reads deployments from the project endpoint. It uses the catalogue to infer model types and public cost metadata when the foundation model is known. Discovery is stateless. Include the current integrations in the request so existing integration names remain stable and new names avoid collisions. If the foundation model is not in the catalogue, the deployment is returned with inferred.model_types: true so you can select the model types manually.

Call a Microsoft Foundry model

Gateway model IDs use the format:
For example, if the account is my-foundry and the integration is gpt-4.1, use my-foundry/gpt-4.1 in the request body:
The TrueFoundry API key authenticates the Gateway request. The Azure credential configured on the provider account authenticates the upstream Microsoft Foundry request.

Supported operations

Microsoft Foundry models can use the following Gateway operations when the deployment and model integration declare the corresponding model type:
  • Chat completions and legacy text completions
  • Responses and Responses compaction
  • Embeddings
  • Image generation and image editing
  • Text-to-speech, audio transcription, and audio translation
  • Realtime WebSocket sessions
  • Files, batches, and fine-tuning
  • Cohere rerank and Cohere Embed v5 embeddings
  • Mistral Document AI OCR
  • Anthropic Messages and Messages token counting for Claude deployments
  • Decision for GPT-6 Luna (OpenAI Decisions) and Microsoft-Decision-1 (System One) deployments

OpenAI-compatible deployments

OpenAI-compatible deployments use the /openai/v1 upstream surface by default. The deployment name is sent as the upstream model value. If a deployment does not support v1, set api_version on that model integration. TrueFoundry then uses the deployment-scoped Azure route with that API version.

Claude deployments

Claude deployments use the native Anthropic Messages route. The provider account must include the project endpoint so TrueFoundry can reach the resource-level Anthropic surface. Use a Gateway model ID such as:

Cohere rerank deployments

Cohere rerank deployments use the Foundry Cohere route. Select rerank as the model type and use the deployment name as the integration’s model_id.

Cohere Embed v5 deployments

Cohere Embed v5 deployments (Cohere-Embed-V5-Fast and Cohere-Embed-V5-Pro) only answer on the Foundry Cohere route, not on the OpenAI-compatible /openai/v1/embeddings route. TrueFoundry sends them to {resource}/providers/cohere/v2/embed using Cohere’s request format, so the provider account must include the project endpoint. This is the same requirement as Cohere rerank and Claude. Which route a model uses is part of the model’s entry in the TrueFoundry model catalogue, not something you configure on the provider account. Catalogue entries for Embed v5 carry extra_configuration.microsoft_foundry_embed_route: cohere; models without it use the OpenAI-compatible route. The route is looked up by the integration’s foundation_model, so it is not inferred from the model or deployment name. Select embedding as the model type, set the integration’s model_id to the deployment name, and set foundation_model to the catalogue name of the Cohere model, for example Cohere-Embed-V5-Fast or Cohere-Embed-V5-Pro. If foundation_model is a different spelling that isn’t in the catalogue, such as a lowercase or versioned deployment name, requests use the OpenAI-compatible route and fail with api_not_supported. The gateway logs a warning naming the model when this happens. Model discovery fills in the foundation model from the deployment. Call the standard embeddings endpoint. input_type defaults to search_document; set it to search_query when embedding queries. dimensions is sent to Cohere as output_dimension, and v5 supports 256, 512, 768, 1024, 1536, and 2048.
Other Cohere embed models, such as Embed v3 and v4, use the OpenAI-compatible embeddings route unless their catalogue entry says otherwise.

Mistral Document AI OCR

Select ocr as the model type and call the existing Gateway OCR proxy. TrueFoundry derives the upstream Mistral OCR route from the provider account’s project_endpoint.

Decision

Microsoft Foundry serves two kinds of decision models. Add either one with Model Types set to Decision. The AI Gateway picks the upstream route from the Foundation model: Call POST /v1/decisions or POST /v1/systemone for either. The AI Gateway translates between the two formats. Full docs: Decisions API.

GPT-6 Luna (OpenAI Decisions)

Azure OpenAI serves OpenAI’s Decisions API for gpt-6-luna deployments. Set:
  • Model ID: your deployment name
  • Foundation model: gpt-6-luna. If the field is empty, the Model ID is used instead, so set it whenever the deployment name differs
  • Model Types: Decision
The AI Gateway uses the account’s Azure OpenAI Endpoint. It sends the deployment name as model and authenticates with the same API key or Microsoft Entra ID credential as chat. Because it is OpenAI’s own API, input_image parts work on /v1/decisions, and decisions bill input tokens only, so set the output cost to 0. Azure rolls Decisions out to the regions where gpt-6-luna is available, except East US 2.
Python

Microsoft-Decision-1 (System One)

Microsoft-Decision-1 deployments answer typed System One questions. Azure does not let you name a deployment Microsoft-Decision-1, so deploy it under another name and set:
  • Model ID: your deployment name
  • Foundation model: Microsoft-Decision-1
  • Model Types: Decision
Upstream, the AI Gateway posts to {resource}/providers/microsoft/v1/systemone, which needs the account’s Project Endpoint.
Python

Realtime models

Realtime models use the Gateway WebSocket endpoint:
For example:
The provider account is already present in the URL, so the realtime query parameter is the integration name rather than the full Gateway model FQN.