Skip to main content
Lesson 4 of 14 · Mistral Deployment: Cloud and Self-Hosting

Azure AI: Model as a Service

Lesson 4 of 14 Updated November 2, 2026 Advanced
On this page
  1. Mistral on Azure AI
  2. Two deployment approaches
  3. Models available on Azure
  4. Deploying a model on Azure
  5. First API call
  6. Differences from the direct Mistral API
  7. When to choose Azure
  8. Key takeaways

Mistral on Azure AI

Microsoft Azure is Mistral AI’s primary cloud partner. The Azure AI integration offers models as Model as a Service (MaaS), meaning you consume them via an API without managing a single GPU. For many enterprises, the deciding factor isn’t technical but organizational: the cloud budget already exists, access is governed by Azure AD, and adding Mistral to the catalog means enabling one more service rather than negotiating a new contract. This lesson covers the two available deployment approaches and the accessible models.

Two deployment approaches

The pay-as-you-go approach is the most common. You deploy a serverless endpoint and are billed only for usage, per token consumed, with no need for a GPU quota. Startup is immediate since there is nothing to provision, there are no fixed costs, scaling follows demand automatically, and the whole setup integrates natively with the Azure ecosystem. This is the default option as long as your traffic is irregular.

The real-time endpoints approach addresses the opposite case. Here, you choose the GPU infrastructure on which the model runs and are billed for infrastructure hours, regardless of request volume. Performance becomes predictable and latency guaranteed, which justifies the fixed cost once throughput is continuous and sustained. A platform processing several hundred thousand documents every night benefits from this; an internal assistant consulted thirty times a day does not.

Models available on Azure

Azure offers a wide range of Mistral models, both general-purpose and specialized.

ModelProfile
Mistral Large 3Flagship model, advanced reasoning
Mistral Large 24.07 / 24.11Previous versions, still available
Mistral Medium 25.05Good performance/cost balance
Mistral Small 25.03Lightweight and fast
Mistral Document AIDocument processing
Mistral OCROptical character recognition
Ministral 3BUltra-lightweight for edge cases
Mistral NemoVersatile open-weight model
CodestralSpecialized for code and technical generation

Deploying a model on Azure

Three prerequisites condition the rest: an active Azure subscription, access to Azure AI Studio via portal.azure.com, and a resource group configured to host the resource. Once these elements are in place, deployment happens entirely from the portal:

  1. Go to Azure AI Studio in the Azure portal
  2. Navigate to Model catalog > Mistral AI
  3. Select the desired model
  4. Choose Pay-as-you-go or Real-time endpoint
  5. Configure the endpoint name and region
  6. Deploy and retrieve the URL + API key

At the end of this last step, you walk away with two pieces of information that drive everything else: the endpoint URL and the associated secret key.

# Your Azure endpoint URL
export AZUREAI_ENDPOINT="https://your-endpoint.inference.ai.azure.com/v1/chat/completions"

# Secret API key
export AZUREAI_API_KEY="your-secret-key"

These export commands work for local testing. In production, these two values belong in a secrets manager—Azure Key Vault in this case—and we will see in Lesson 6 how to retrieve them from there without ever writing them elsewhere.

First API call

Here is how to verify that your endpoint is actually responding.

import os
from mistralai.azure.client import MistralAzure

client = MistralAzure(
    server_url=os.environ["AZUREAI_ENDPOINT"],
    api_key=os.environ["AZUREAI_API_KEY"]
)

response = client.chat.complete(
    model="azureai",
    messages=[
        {"role": "user", "content": "Explain Bayes' theorem in 3 sentences."}
    ]
)
print(response.choices[0].message.content)

One detail deserves your attention because it trips up almost every developer coming from the direct API: the model parameter is always "azureai". The actual model being queried is determined by the endpoint you deployed, not by this string. If you want to change models, you deploy another endpoint—writing model="mistral-large-latest" here would produce nothing useful.

Differences from the direct Mistral API

AspectDirect Mistral APIAzure MaaS
Python clientMistral()MistralAzure()
Model parameterModel name"azureai"
AuthenticationMistral API keyAzure API key
BillingMistralAzure
NetworkInternetCan be private (VNet)

When to choose Azure

Azure becomes the natural choice when your company already lives in the Microsoft ecosystem and leverages Azure AD, Key Vault, or Monitor: integration then costs almost nothing. The need for private network connectivity, via VNet or Private Link, pushes in the same direction, as do compliance policies requiring data to stay with a certified cloud provider. Add to this a prosaic but often decisive argument in investment committees: consolidating cloud billing onto a single line item.

Key takeaways

  • Azure offers Mistral as MaaS (pay-as-you-go) or real-time endpoints (dedicated GPU)
  • The MistralAzure Python client replaces the standard Mistral client
  • The model parameter is always "azureai"—the model depends on the endpoint
  • Native integration with the Azure ecosystem (Key Vault, VNet, Monitor) is a major advantage