Skip to main content

Azure AI

The Mistral AI open and commercial models can be deployed on your Azure subscription.

This page explains how to easily get started with Mistral Large deployed as an Azure AI endpoint. If you use the Mistral AI Python client, it should be a drop-in replacement where you only need to change the client parameters (endpoint URL, API key, model name).

Deploying Mistral Small and Large

Mistral AI models can be deployed on Azure AI either as:

  • pay-as-you-go managed services billed on endpoint usage,
  • real-time endpoints with quota-based billing indexed on the infrastructure you choose (only for existing open-weight models).

To deploy Mistral Small or Large as a pay-as-you-go managed service, follow the instructions from the Azure AI documentation and select the model that your endpoint should serve.

Querying the model

Once your model is deployed and provided that you have the relevant permissions, consuming it will basically be the same process as for a Mistral AI platform endpoint.

To run the examples below, you will need to define the following environment variables:

  • AZUREAI_ENDPOINT is your endpoint URL, should be of the form https://your-endpoint.inference.ai.azure.com/v1/chat/completions.
  • AZUREAI_API_KEY is your authentication key.
curl --location $AZUREAI_ENDPOINT/v1/chat/completions \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $AZUREAI_API_KEY' \
--data '{
"model": "azureai",
"messages": [
{
"role": "user",
"content": "What is the best French cheese ?"
}
]
}'

Going further

For other usage examples, you can also check the following notebooks: