{"id":526,"date":"2025-07-08T10:04:11","date_gmt":"2025-07-08T10:04:11","guid":{"rendered":"https:\/\/blog.ngocha.biz\/?p=526"},"modified":"2025-07-08T10:04:11","modified_gmt":"2025-07-08T10:04:11","slug":"setup-azure-openai","status":"publish","type":"post","link":"https:\/\/blog.ngocha.biz\/?p=526","title":{"rendered":"How to Set Up Azure OpenAI: A Step-by-Step Guide"},"content":{"rendered":"<p>In this blog, learn how to set up the Azure OpenAI service, deploy custom OpenAI models and test it using API endpoint and token.<\/p>\n<p>By the end of this guide, you will have learned how to:<\/p>\n<ul>\n<li>Create and configure a new Azure OpenAI resource <\/li>\n<li>Navigate the Azure AI Foundry to deploy a specific large language model, such as <code>o4-mini<\/code>.<\/li>\n<li>Test your model&#8217;s chat completions using both a <code>curl<\/code> command and a Python script.<\/li>\n<li>Monitor the token usage of your model deployments.<\/li>\n<li>Understand the key advantages of using Azure OpenAI over the standard OpenAI API and more..<\/li>\n<\/ul>\n<p>Lets get started.<\/p>\n<h2 id=\"what-is-azure-openai\">What is Azure OpenAI?<\/h2>\n<p>Before we get into the hands-on guide, let\u2019s first understand what Azure OpenAI is.<\/p>\n<p>Azure provides a cloud-based service to<strong> access OpenAI&#8217;s Large Language Models<\/strong>  (LLMs), including <code>GPT-3<\/code>, <code>GPT-4<\/code>, and embedding models. <\/p>\n<p>Since it runs on Microsoft Azure\u2019s cloud infrastructure, you can integrate it with other Azure services, security features, and infrastructure.<\/p>\n<p>With Azure OpenAI, you can fine-tune OpenAI models like GPT-3.5 using your own data to meet your model requirements. However, this feature is only <strong>available in select Azure regions<\/strong>, so availability may vary depending on your location.<\/p>\n<div class=\"kg-card kg-callout-card kg-callout-card-blue\">\n<div class=\"kg-callout-emoji\">\ud83d\udca1<\/div>\n<div class=\"kg-callout-text\">Fine-tuning means teaching the model with <b><strong style=\"white-space: pre-wrap;\">your own examples<\/strong><\/b> so that it gives better or more specific answers for your use case.<\/div>\n<\/div>\n<p>Also, Microsoft Azure is currently the <strong>only cloud provider<\/strong> that offers OpenAI\u2019s models as a fully managed, hosted service through Azure OpenAI.<\/p>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/07\/image-153.png\" class=\"kg-image\" alt=\"Azure OpenAI architecture diagram with use cases\" loading=\"lazy\" width=\"1610\" height=\"1206\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/07\/image-153.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/07\/image-153.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1600\/2025\/07\/image-153.png 1600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/07\/image-153.png 1610w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure>\n<p>If you want to understand enterprise use cases for Azure OpenAI, please read this <a href=\"https:\/\/azure.microsoft.com\/en-us\/blog\/ai-powered-dialogues-global-telecommunications-with-azure-openai-service\/?ref=devopscube.com\" rel=\"noreferrer\">official Azure blog<\/a>.<\/p>\n<h2 id=\"setup-prerequisites\">Setup Prerequisites <\/h2>\n<p>Here is what we are going to do in high level.<\/p>\n<ol>\n<li>Azure OpenAI resource creation <\/li>\n<li>Deploy model using Azure Foundry<\/li>\n<\/ol>\n<p>For this, <\/p>\n<p>Ensure you are a privileged user (e.g., with <code>Contributor<\/code> role) or owner on the Azure cloud to create and manage the Azure OpenAI service.<\/p>\n<p>Also, you must have access to the Azure portal (UI)<\/p>\n<h2 id=\"create-azure-openai-resource\">Create Azure OpenAI Resource<\/h2>\n<p>The first step is to create a Azure OpenAI resource.<\/p>\n<p>The resource serves as your gateway to OpenAI models through Azure&#8217;s infrastructure. It provides the <strong>endpoint URL and authentication keys<\/strong> needed to make API calls.<\/p>\n<p>Follow the steps below to create the OpenAI service.<\/p>\n<p>In the search bar,  type <code>Azure OpenAI<\/code> and select the OpenAI service.<\/p>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/06\/image-45.png\" class=\"kg-image\" alt=\"typing the find azure openai from the search bar\" loading=\"lazy\" width=\"1370\" height=\"682\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/06\/image-45.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/06\/image-45.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/06\/image-45.png 1370w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure>\n<p>Click the <code>+ Create<\/code> button to create a new OpenAI resource.<\/p>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/06\/image-46.png\" class=\"kg-image\" alt=\"creating a new openai resource by clicking the + button\" loading=\"lazy\" width=\"677\" height=\"396\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/06\/image-46.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/06\/image-46.png 677w\"><\/figure>\n<p>On the <code>Basics<\/code> page, select the Subscription, Resource Group name (create one if you dont have one), Region, Name, and the Pricing tier. I am going with Standard (On-Demand) pricing tier.<\/p>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/06\/image-62.png\" class=\"kg-image\" alt=\"Azure openai basics configuration\" loading=\"lazy\" width=\"922\" height=\"710\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/06\/image-62.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/06\/image-62.png 922w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure>\n<p>On the <strong>Network<\/strong> page, you can control who can access your Azure OpenAI resource. For this demo, I&#8217;m choosing <strong>&#8220;All networks&#8221;<\/strong> to keep it simple and accessible from anywhere.<\/p>\n<div class=\"kg-card kg-callout-card kg-callout-card-blue\">\n<div class=\"kg-callout-emoji\">\ud83d\udca1<\/div>\n<div class=\"kg-callout-text\">For a <b><strong style=\"white-space: pre-wrap;\">production setup<\/strong><\/b>, it&#8217;s better to choose a <b><strong style=\"white-space: pre-wrap;\">more secure option<\/strong><\/b>, like:<\/p>\n<p><b><strong style=\"white-space: pre-wrap;\">1. Selected networks<\/strong><\/b> \u2013 to allow access only from specific IPs or virtual networks.<\/p>\n<p>2. <b><strong style=\"white-space: pre-wrap;\">Private endpoints<\/strong><\/b> \u2013 for the highest security, where access is only allowed through your private Azure network.<\/p>\n<p>Choose the option that fits your use case and security needs.<\/p><\/div>\n<\/div>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/06\/image-48.png\" class=\"kg-image\" alt=\"the network page of the azure openai resoruce creation\" loading=\"lazy\" width=\"804\" height=\"387\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/06\/image-48.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/06\/image-48.png 804w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure>\n<p>On the <code>Tags<\/code> page, you can add the necessary tags, and on the <code>Review + submit<\/code> page, you can see the preview of the configuration.<\/p>\n<p>Once verification is completed, click the <code>Create<\/code> button to create the OpenAI resource. It will take a minute or two for the deployment to be ready.<\/p>\n<p>Once the deployment is successfully completed, you can go to the overview page of the resource.<\/p>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/06\/image-57.png\" class=\"kg-image\" alt=\"the confirmation of the Azure openai resource creation\" loading=\"lazy\" width=\"710\" height=\"455\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/06\/image-57.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/06\/image-57.png 710w\"><\/figure>\n<p>In the next page you will find options to get the generic API endpoint and keys under the develop option.<\/p>\n<p>For example, the endpoint typically looks like:<\/p>\n<pre><code class=\"language-bash\">https:\/\/&lt;resource-name&gt;.openai.azure.com\/<\/code><\/pre>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/07\/image-60.png\" class=\"kg-image\" alt=\"\" loading=\"lazy\" width=\"2000\" height=\"1426\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/07\/image-60.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/07\/image-60.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1600\/2025\/07\/image-60.png 1600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w2400\/2025\/07\/image-60.png 2400w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure>\n<p>Now that the resource is created, you need to deploy the specific models you want to use with the endpoint.<\/p>\n<div class=\"kg-card kg-callout-card kg-callout-card-blue\">\n<div class=\"kg-callout-emoji\">\ud83d\udca1<\/div>\n<div class=\"kg-callout-text\">So when you are creating a resource, you are essentially creating a dedicated instance of the Azure OpenAI service within your Azure subscription. It acts as a logical boundary that defines the scope, permissions, and billing for your AI services.<\/div>\n<\/div>\n<h2 id=\"deploying-a-model\">Deploying a Model<\/h2>\n<p>The next step is to deploy a model that we need to use with the created API endpoint.<\/p>\n<p>To do this, head over to <a href=\"https:\/\/ai.azure.com\/?ref=devopscube.com\" rel=\"noreferrer\">Azure AI Foundry portal<\/a>, which is a dedicated page to manage the Azure AI services.<\/p>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/07\/image-154.png\" class=\"kg-image\" alt=\"\" loading=\"lazy\" width=\"890\" height=\"665\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/07\/image-154.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/07\/image-154.png 890w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure>\n<p>Next, you may be asked to log in and then provide the same email address you used to sign in to the Azure cloud.<\/p>\n<p>Then choose the Deployments option from the left pane.<\/p>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/07\/image-61.png\" class=\"kg-image\" alt=\"\" loading=\"lazy\" width=\"1930\" height=\"1774\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/07\/image-61.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/07\/image-61.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1600\/2025\/07\/image-61.png 1600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/07\/image-61.png 1930w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure>\n<p>Click <strong>Deploy Model<\/strong> option and select the <strong>Deploy base model.<\/strong><\/p>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/07\/image-62.png\" class=\"kg-image\" alt=\"\" loading=\"lazy\" width=\"1860\" height=\"1286\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/07\/image-62.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/07\/image-62.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1600\/2025\/07\/image-62.png 1600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/07\/image-62.png 1860w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure>\n<p>You will be prompted to select the model. You can search for an OpenAI model in the search box as shown below. Here I have selected <code>o4-mini<\/code> (Great for fast, low-cost tasks. Good balance of speed and intelligence)<\/p>\n<p>After selecting a model, click <strong>confirm<\/strong>.<\/p>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/07\/image-63.png\" class=\"kg-image\" alt=\"\" loading=\"lazy\" width=\"2000\" height=\"1500\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/07\/image-63.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/07\/image-63.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1600\/2025\/07\/image-63.png 1600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/07\/image-63.png 2032w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure>\n<p>In a few seconds, you&#8217;ll be prompted to deploy the model. In the popup, you\u2019ll find key deployment settings like deployment type, model version, upgrade policy, token rate limits, and content filters.<\/p>\n<p>The default <strong>Deployment type is Global Standard<\/strong>, meaning the model runs on Azure&#8217;s global infrastructure.<\/p>\n<p>The model version upgrade policy lets you <strong>decide when to switch to newer versions<\/strong>, either on release or expiry of the current one. You can also choose a specific model version if needed.<\/p>\n<p>The token-per-minute rate limit <strong>controls how many tokens can be processed per minute<\/strong> for both input and output. Content filters help block harmful or inappropriate content in queries and responses.<\/p>\n<p>Now go ahead and deploy it.<\/p>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/07\/image-67.png\" class=\"kg-image\" alt=\"\" loading=\"lazy\" width=\"1270\" height=\"1700\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/07\/image-67.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/07\/image-67.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/07\/image-67.png 1270w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure>\n<p>Once the deployment is complete, you&#8217;ll see options to test the model using the playground, <strong>API endpoint, and keys<\/strong>. You&#8217;ll also get code snippets for Python, JavaScript, and other languages, as shown below.<\/p>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/07\/image-65.png\" class=\"kg-image\" alt=\"\" loading=\"lazy\" width=\"2000\" height=\"1602\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/07\/image-65.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/07\/image-65.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1600\/2025\/07\/image-65.png 1600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/07\/image-65.png 2100w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure>\n<\/p>\n<p>If you open the playground, you can interact with the model directly and adjust parameters like token limits and reasoning depth. It also includes a token counter that tracks API usage, helping you monitor both consumption and costs.<\/p>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/07\/image-66.png\" class=\"kg-image\" alt=\"\" loading=\"lazy\" width=\"2000\" height=\"1882\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/07\/image-66.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/07\/image-66.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1600\/2025\/07\/image-66.png 1600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/07\/image-66.png 2008w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure>\n<p>In the same way, you can deploy additional models based on your requirements and access them using their respective API endpoints and tokens.<\/p>\n<p>You can check out all the available models from the <a href=\"https:\/\/ai.azure.com\/resource\/models?ref=devopscube.com\" rel=\"noreferrer\">model catalogue<\/a>.<\/p>\n<p>Now that we&#8217;ve validated the model, let&#8217;s go over how to use the model&#8217;s API endpoint along with the API token to test it.<\/p>\n<h2 id=\"how-to-use-the-azure-openai-apis\">How to use the Azure OpenAI APIs?<\/h2>\n<p>In a real-world scenario, we typically use the model&#8217;s API endpoints within our applications, like chatbots or Retrieval-Augmented Generation (RAG) systems. As mentioned earlier, under the deployment section, you can find the model&#8217;s API endpoint and your API key.<\/p>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/07\/image-69.png\" class=\"kg-image\" alt=\"\" loading=\"lazy\" width=\"1376\" height=\"920\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/07\/image-69.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/07\/image-69.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/07\/image-69.png 1376w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure>\n<h3 id=\"api-call-using-curl\">API Call Using curl<\/h3>\n<p>First lets test the API call using curl command.<\/p>\n<p>To start, store your API key as an environment variable on your local machine:<\/p>\n<pre><code class=\"language-bahs\">export AZURE_OPENAI_API_KEY=&lt;YOUR API KEY&gt;<\/code><\/pre>\n<p>To make an API call, you\u2019ll need the following details:<\/p>\n<ul>\n<li>OpenAI Resource Name (e.g., dcube-models)<\/li>\n<li>Deployment Name (e.g., o4-mini)<\/li>\n<li>API Version (e.g., 2024-12-01-preview)<\/li>\n<\/ul>\n<p>The following CURL command sends a request to Azure OpenAI model deployment to generate a response in a chat format.<\/p>\n<pre><code class=\"language-bash\">curl https:\/\/&lt;OPENAI RESOURCE NAME&gt;.openai.azure.com\/openai\/deployments\/&lt;DEPLOYMENT NAME&gt;\/chat\/completions\\?api-version\\=&lt;VERSION NAME&gt; \\\n  -H \"Content-Type: application\/json\" \\\n  -H \"api-key: ${AZURE_OPENAI_API_KEY}\" \\\n  -d '{\n        \"messages\": [\n          {\"role\": \"system\", \"content\": \"You are a DevOps Engineer.\"},\n          {\"role\": \"user\", \"content\": \"Just need the exact command to perform telnet using curl.\"}\n        ],\n        \"max_completion_tokens\": 1000\n      }' | jq\n<\/code><\/pre>\n<p><code>\"max_completion_tokens\": 1000<\/code> sets the upper limit on the number of tokens (words\/parts of words) the model can use in its response.<\/p>\n<p>You\u2019ll get an output similar to the one below. Look for the <code>content<\/code> section where the model\u2019s actual response to your prompt will appear. Here\u2019s a trimmed version showing just that part:<\/p>\n<pre><code class=\"language-bash\">.\n.\n.\n      \"finish_reason\": \"stop\",\n      \"index\": 0,\n      \"logprobs\": null,\n      \"message\": {\n        \"annotations\": [],\n        \"content\": \"You can use curl\u2019s built-in TELNET support. For example, to \u201ctelnet\u201d to host 192.168.1.10 on port 23:\\n\\ncurl -v telnet:\/\/192.168.1.10:23\\n\\nExplanation:  \\n- -v             : verbose (shows the negotiation and connection info)  \\n- telnet:\/\/\u2026    : tells curl to use the TELNET protocol  \",\n        \"refusal\": null,\n        \"role\": \"assistant\"\n.\n.\n.\n<\/code><\/pre>\n<h3 id=\"api-call-using-python\">API Call Using Python<\/h3>\n<p>If you want to test Azure OpenAI API calls programmatically, you can try the Python example below.<\/p>\n<p>I am using the same sample code provided by Azure on the deployment details page.<\/p>\n<p>Create a Requirements file for the Packages<\/p>\n<pre><code>vim requirements.txt\n<\/code><\/pre>\n<p>Add the following contents inside the file<\/p>\n<pre><code>openai~=1.60.2\n<\/code><\/pre>\n<p>Before installing the packages, create a venv.<\/p>\n<pre><code>python3 -m venv venv\nsource venv\/bin\/activate<\/code><\/pre>\n<p>Install the Packages<\/p>\n<pre><code>pip install -r requirements.txt<\/code><\/pre>\n<p>Create a Python script to query the OpenAI deployment via API<\/p>\n<pre><code>vim main.py<\/code><\/pre>\n<p>Add the following contents. Replace <code>&lt;your-endpoint&gt;<\/code> with your model endpoint.<\/p>\n<pre><code class=\"language-python\">import os\nfrom openai import AzureOpenAI\n\nendpoint = \"&lt;your-endpoint&gt;\"\nmodel_name = \"o4-mini\"\ndeployment = \"o4-mini\"\n\nsubscription_key = os.getenv(\"AZURE_OPENAI_API_KEY\")\napi_version = \"2024-12-01-preview\"\n\nclient = AzureOpenAI(\n    api_version=api_version,\n    azure_endpoint=endpoint,\n    api_key=subscription_key,\n)\n\nresponse = client.chat.completions.create(\n    messages=[\n        {\n            \"role\": \"system\",\n            \"content\": \"You are a senior DevOps engineer helping beginners.\",\n        },\n        {\n            \"role\": \"user\",\n            \"content\": \"How do I set up CI\/CD using GitHub Actions for a Node.js app?\",\n        }\n    ],\n    max_completion_tokens=100000,\n    model=deployment\n)\n\nprint(response.choices[0].message.content)<\/code><\/pre>\n<p>In the above code we are loading the <code>subscription_key<\/code> from an environment variable instead of hardcoding it. So you need to export the key using the following. Replace &lt;YOUR-KEY&gt; with your subscription key.<\/p>\n<pre><code class=\"language-bash\">export AZURE_OPENAI_API_KEY=&lt;YOUR-KEY&gt;<\/code><\/pre>\n<p>To run the code, use the following command.<\/p>\n<pre><code class=\"language-python\">python3 main.py<\/code><\/pre>\n<p>On a successful execution you will get an output like the following.<\/p>\n<pre><code class=\"language-bash\">$ python3 main.py    \n\nHere\u2019s a complete walk-through for adding CI\/CD to your Node.js app with GitHub Actions. We\u2019ll cover:\n\n 1. Prerequisites  \n 2. Writing basic tests  \n 3. Creating your workflow file (`.github\/workflows\/ci-cd.yml`)  \n 4. Caching `node_modules`  \n 5. Running lint &amp; tests (CI)  \n 6. Deploying (CD) \u2013 example to Heroku  \n\n.\n.\n.<\/code><\/pre>\n<div class=\"kg-card kg-callout-card kg-callout-card-blue\">\n<div class=\"kg-callout-emoji\">\ud83d\udccc<\/div>\n<div class=\"kg-callout-text\">Checkout the <a href=\"https:\/\/devopscube.com\/python-for-devops\/\" rel=\"noreferrer\">python for devops<\/a> blog for more AI\/ML based use cases for DevOps<\/div>\n<\/div>\n<h2 id=\"monitoring-token-usage\">Monitoring Token Usage<\/h2>\n<p>One of the best ways to optimize the Azure OpenAI usage is to monitor the resource.<\/p>\n<p>There is a dedicated monitoring page to <strong>track the token usage<\/strong> and the performance of the model deployment.<\/p>\n<p>To get started, navigate to the <code>Monitoring<\/code> section and select the deployment to see the graph based on the metrics.<\/p>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/07\/image-70.png\" class=\"kg-image\" alt=\"\" loading=\"lazy\" width=\"2000\" height=\"1334\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/07\/image-70.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/07\/image-70.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1600\/2025\/07\/image-70.png 1600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/07\/image-70.png 2380w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure>\n<p>Now, if you select the model deployment, it\u2019ll show the total number of requests and how many tokens have been used.<\/p>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/07\/image-71.png\" class=\"kg-image\" alt=\"\" loading=\"lazy\" width=\"2000\" height=\"1387\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/07\/image-71.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/07\/image-71.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1600\/2025\/07\/image-71.png 1600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/07\/image-71.png 2120w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure>\n<p>In the screenshot above, you\u2019ll see the following token details.<\/p>\n<ul>\n<li><strong>Prompt token count<\/strong>: This is the number of tokens in the text you send to the model.<\/li>\n<li><strong>Completion token count<\/strong>: These are the tokens in the model\u2019s response.<\/li>\n<li><strong>Total token count<\/strong>: This is just the sum of prompt and completion tokens.<\/li>\n<\/ul>\n<p>Tokens are the basic units that language models use to process text. They represent <strong>pieces of words<\/strong>, whole words, or even parts of words. The following image <strong>illustrates how text gets broken<\/strong> down into tokens by language models.<\/p>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/07\/image-74.png\" class=\"kg-image\" alt=\"illustration of tokens\" loading=\"lazy\" width=\"936\" height=\"390\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/07\/image-74.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/07\/image-74.png 936w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure>\n<p>Checkout <a href=\"https:\/\/platform.openai.com\/tokenizer?ref=devopscube.com\" rel=\"noreferrer\">OpenAI Tokenizer<\/a> to know more.<\/p>\n<h2 id=\"configuring-security-and-compliance\">Configuring Security and Compliance <\/h2>\n<p>Protecting data in enterprise environments is very important, and the service must follow all required rules and regulations.<\/p>\n<p>By default, Azure OpenAI comes with a built-in content filter, but you can customize it using <strong>Guardrails + Controls<\/strong> to better fit your specific needs.<\/p>\n<p>To get started, navigate to the <code>Guardrails + Controls<\/code> for the security configurations.<\/p>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/06\/image-76.png\" class=\"kg-image\" alt=\"The security configuration page of the azure openai\" loading=\"lazy\" width=\"945\" height=\"482\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/06\/image-76.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/06\/image-76.png 945w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure>\n<p>Go to the <code>Try it out<\/code> section to see the available content filtering for text and image, though we can customize the filtering as well.<\/p>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/06\/image-77.png\" class=\"kg-image\" alt=\"availabe content filtering configuration of the azure openai\" loading=\"lazy\" width=\"948\" height=\"886\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/06\/image-77.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/06\/image-77.png 948w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure>\n<p>We can even set the level of the content filtering to low to high based on our use case.<\/p>\n<h2 id=\"azure-openai-pricing\">Azure OpenAI Pricing<\/h2>\n<p>You can navigate to the <code>Model catalog<\/code> , and select the model to see the complete details of that model.<\/p>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/07\/image-85.png\" class=\"kg-image\" alt=\"The azure openai model catalog page to select the model\" loading=\"lazy\" width=\"2000\" height=\"1068\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/07\/image-85.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/07\/image-85.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1600\/2025\/07\/image-85.png 1600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/07\/image-85.png 2344w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure>\n<p>Then from details, click the <code>See direct from Azure pricing<\/code><\/p>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/07\/image-86.png\" class=\"kg-image\" alt=\"The azure openai model catalog page for directing to pricing page\" loading=\"lazy\" width=\"2000\" height=\"1031\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/07\/image-86.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/07\/image-86.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1600\/2025\/07\/image-86.png 1600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w2400\/2025\/07\/image-86.png 2400w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure>\n<p>On the next page, you will get the link to open the Azure OpenAI Service pricing page.<\/p>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/07\/image-87.png\" class=\"kg-image\" alt=\"page were you get the link for azure openai servies pricing\" loading=\"lazy\" width=\"1682\" height=\"818\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/07\/image-87.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/07\/image-87.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1600\/2025\/07\/image-87.png 1600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/07\/image-87.png 1682w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure>\n<p>Clicking it will take you to another page where you can see the pricing of the model.<\/p>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/06\/image-81.png\" class=\"kg-image\" alt=\"the pricing page of the auzre openai models\" loading=\"lazy\" width=\"1006\" height=\"349\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/06\/image-81.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/06\/image-81.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/06\/image-81.png 1006w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure>\n<p>Not only this, we can see the region wise price and the fine tuning price as well on this page.<\/p>\n<p>So how do we calculate OpenAI cost for text generation?<\/p>\n<h2 id=\"features-of-azure-openai-service\">Features of Azure OpenAI Service<\/h2>\n<p>Azure offers a couple of features to manage and secure the OpenAI<\/p>\n<ol>\n<li><strong>Fine Tune Models:<\/strong> We can select and use the trained models, though we can even train those models with our datasets for our use case.<\/li>\n<li><strong>Content Safety and Filtering:<\/strong> We can restrict the input and output of the model to avoid the harmful queries and outputs, or even the content that violates the organization&#8217;s compliance.<\/li>\n<li><strong>Scalability and Availability:<\/strong> Azure OpenAI will automatically scale based on the workload requirements.<\/li>\n<li><strong>Batch Job:<\/strong> Azure OpenAI can process batch jobs. For example, if we want to analyze thousands of user reviews, we can create this as a batch job, so that OpenAI will process all the requests and give the complete output.<\/li>\n<\/ol>\n<div class=\"kg-card kg-callout-card kg-callout-card-blue\">\n<div class=\"kg-callout-emoji\">\ud83d\udca1<\/div>\n<div class=\"kg-callout-text\">Batch jobs should be in JSON format and should be less than 200MB<\/div>\n<\/div>\n<ol start=\"5\">\n<li>We can even set the Provisioned Throughput Units (PTUs), meaning the processing capacity, if we already know the workload volume.<\/li>\n<li>Azure OpenAI is a region based service, so we can setup in the nearest region for the highest availability.<\/li>\n<\/ol>\n<h2 id=\"azure-openai-best-practices\">Azure OpenAI Best Practices <\/h2>\n<p>The following are some of the best practices.<\/p>\n<ol>\n<li>Choose the right model based on your use case, because it has cost-effective models (like o4-mini)<\/li>\n<li><strong>Optimize the token usag<\/strong>e using the prompt engineering, so that we can reduce the cost.<\/li>\n<li>Store the API key in a secure <strong>vault like Azure Key Vault<\/strong> and rotate the keys periodically to avoid accidental exposure.<\/li>\n<li>Set the token limit so that we can avoid unnecessary overusage.<\/li>\n<li>Monitor and set alerts for the usage so that we can track the cost and performance.<\/li>\n<\/ol>\n<h2 id=\"azure-openai-vs-openai-api\">Azure OpenAI vs OpenAI API <\/h2>\n<p>So, how is Azure OpenAI different from OpenAI&#8217;s direct API?<\/p>\n<p>Azure <strong>OpenAI runs on Microsoft Azure\u2019s secure cloud infrastructure<\/strong>, with private endpoints, VNets,  enterprise-grade compliance and enterprise-level uptime commitments.<\/p>\n<p>While the <a href=\"https:\/\/openai.com\/?ref=devopscube.com\" rel=\"noreferrer\">OpenAI<\/a> API operates on OpenAI\u2019s own servers based in the US.<\/p>\n<p>Azure OpenAI has native integration with Azure services (Cognitive Services, Logic Apps, Power Platform etc)<\/p>\n<p>This makes Azure OpenAI a better fit for enterprise environments, especially when data location and compliance are key concerns. Organizations can keep data within their selected Azure region, which helps meet <strong>regulatory requirements<\/strong> like <a href=\"https:\/\/gdpr-info.eu\/?ref=devopscube.com\" rel=\"noreferrer\">GDPR<\/a> or <a href=\"https:\/\/www.hhs.gov\/hipaa\/index.html?ref=devopscube.com\" rel=\"noreferrer\">HIPAA<\/a>.<\/p>\n<p>In contrast, the OpenAI API might not align with stricter enterprise policies around data handling and compliance.<\/p>\n<h2 id=\"cleaning-up-your-resources\">Cleaning Up Your Resources<\/h2>\n<p>It&#8217;s really important to clean up any resources you&#8217;re not using.<\/p>\n<p>Once you&#8217;re done learning and no longer need the model deployment, go to the deployment page and delete it.<\/p>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/07\/image-77.png\" class=\"kg-image\" alt=\"\" loading=\"lazy\" width=\"1512\" height=\"968\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/07\/image-77.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/07\/image-77.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/07\/image-77.png 1512w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure>\n<p>After you delete the deployments, you can also delete the resource you created in Azure OpenAI.<\/p>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/07\/image-78.png\" class=\"kg-image\" alt=\"\" loading=\"lazy\" width=\"1420\" height=\"1032\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/07\/image-78.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/07\/image-78.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/07\/image-78.png 1420w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure>\n<h2 id=\"conclusion\">Conclusion<\/h2>\n<p>Now that you\u2019ve set up Azure OpenAI, deployed a model, tested it with curl and Python, and checked out how token usage works, you\u2019ve covered the essentials.<\/p>\n<p>Also, you also got a glimpse of how Azure takes care of <strong>security and compliance<\/strong> right out of the box.<\/p>\n<p>Here is what you should do next.<\/p>\n<p><strong>Start building<\/strong> chatbots, internal tools, or DevOps assistants using the AI features.<\/p>\n<p>And this is just the beginning. Keep exploring, test out different models, and watch for upcoming guides on<strong> fine-tuning<\/strong> and getting things ready for production.<\/p>\n<hr>\n<p><strong>Ngu\u1ed3n:<\/strong> <a href=\"https:\/\/devopscube.com\/setup-azure-openai\/\" target=\"_blank\" rel=\"noopener noreferrer\">How to Set Up Azure OpenAI: A Step-by-Step Guide \u2014 DevOpsCube<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Source: https:\/\/devopscube.com\/setup-azure-openai\/<\/p>\n","protected":false},"author":1,"featured_media":527,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-526","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops"],"_links":{"self":[{"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=\/wp\/v2\/posts\/526","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=526"}],"version-history":[{"count":0,"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=\/wp\/v2\/posts\/526\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=\/wp\/v2\/media\/527"}],"wp:attachment":[{"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=526"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=526"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=526"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}