An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
Hi **JakkaSnigdhaReddy-8536,**This error usually means your app cannot reach the Azure OpenAI endpoint over the network. It is a connection level problem, not something specific to GPT 5 itself.
Step 1: Check the endpoint you are calling Make sure you are calling the Azure OpenAI endpoint in the correct format and that you are using the right path for the API you are using. The official Azure OpenAI REST reference shows the expected endpoint pattern and that requests use an api version in the query string. If you are using Foundry, there are different endpoints for different SDKs and scenarios. The Foundry SDK and OpenAI SDK overview explains which endpoint to use for each scenario, including the OpenAI compatible endpoint that ends with openai v1. [learn.microsoft.com] [learn.microsoft.com]
Step 2: Confirm you are using the deployment name, not the model catalog name In Azure, requests target a deployment name. The Foundry endpoints guidance explains that deployments give a model a name and you access the model using that deployment name. If the deployment name is wrong, you may see different errors later, but it is still important to confirm this first. [learn.microsoft.com],
Step 3: Rule out proxy, firewall, and outbound network blocks Many APIConnectionError cases happen because a corporate proxy or firewall is blocking or cutting off outbound HTTPS calls. In another Microsoft Q and A thread, the root cause was a proxy that was still active and it was cutting off requests when they took longer than a short timeout. Once the proxy issue was fixed, the calls worked. So please verify your environment can reach the Azure OpenAI endpoint on port 443. If you are running this from a server, container, or enterprise network, try a quick test from a different network to see if the issue is specific to the current network path. [learn.microsoft.com] ,
Step 4: Try a minimal request to isolate the problem Send the smallest possible prompt and request a short response. If even a tiny request fails with the same connection error, the problem is almost always endpoint, DNS, proxy, firewall, or routing. If small requests work but larger ones fail, it can be a timeout somewhere in the network path. The proxy timeout pattern above is one example of this.
Step 5: Add basic resiliency in the client Connection errors can be transient. The Q and A answer on your thread notes that the SDK retries connection errors and that you can tune retries if needed. Even without changing code right away, it helps to check whether repeated calls succeed intermittently or always fail, because that points to network stability versus configuration.
Official references that help for this scenario
Azure OpenAI REST API reference, endpoint format, authentication, and api versioning [learn.microsoft.com]
Foundry SDKs and endpoints overview, which explains the correct endpoint to use for Foundry versus OpenAI compatible calls [learn.microsoft.com]
Foundry endpoints and deployment naming guidance [learn.microsoft.com]
I Hope this helps. Do let me know if you have any further queries.
Thankyou!