Prerequisites
- An active Azure subscription.
- A Microsoft Foundry resource and project.
- The Cognitive Services Contributor role or equivalent permissions on the Foundry resource. See Microsoft’s deployment prerequisites.
Deploy a model
- Open your project in Microsoft Foundry.
- Go to Build > Catalog > Model Catalog and open the Baseten entry for a model such as GLM-5.3. Check the available deployment types and regions on its model card.
- Select Deploy > Custom settings and enter a deployment name.
- Choose Global Standard for global processing or Data Zone Standard to keep processing in the United States data zone, where the model supports it. Both types bill per token.
- Select Deploy, then go to Build > Models and confirm the deployment status shows Succeeded.
Call a deployment
Usehttps://<FOUNDRY_RESOURCE_NAME>.services.ai.azure.com/openai/v1/ as your base URL. Replace <FOUNDRY_RESOURCE_NAME> with your Foundry resource name and set <DEPLOYMENT_NAME> to the name you chose when you deployed the model.
Send a Chat Completions request with a Foundry resource key for a quick test, or use Microsoft Entra ID to control access through Azure role assignments.
Resource key
In the Azure portal, open the Foundry resource in your base URL and select Keys and Endpoint. Replace<FOUNDRY_API_KEY> with a key from that resource.
- Python
- JavaScript
- cURL
Install the OpenAI SDK with
pip install openai. Save this example as chat.py and run python chat.py.chat.py
Microsoft Entra ID
Configure Microsoft Entra ID on your Foundry resource and assign each caller the Cognitive Services User role on the resource. Sign in to the Azure CLI withaz login to run the examples locally. Request tokens with the https://ai.azure.com/.default scope.
- Python
- JavaScript
- cURL
Install the dependencies with
pip install openai azure-identity. Save this example as entra.py and run python entra.py.entra.py
200. The SDK examples print the model’s answer. In the cURL response, the answer is in choices[0].message.content.
Control model access
Use Azure Policy for model deployment to control which models your organization can deploy.Billing
Azure bills Foundry usage under your Microsoft agreement. Open the model card in Foundry for pricing. If you have a Microsoft Azure Consumption Commitment (MACC), track eligible usage in Azure Cost Management.Delete a deployment
Deleting a deployment removes its inference endpoint.- In your Foundry project, go to Build > Models.
- Select the deployment, choose Delete, and confirm.
- Check that the deployment no longer appears under Models.
Troubleshoot the integration
If the issue persists, open an Azure support request. Include the model, deployment type, Azure region, error message, and request time. Exclude API keys and sensitive prompts.