How to fix endpoint URL returning {"error":{"code":"404","message": "Resource not found"}}

Inioluwa Olaposi 20 Reputation points
2025-03-16T14:58:33.4033333+00:00

Hello Community,

I created an Azure OpenAI service recently, however, my endpoint URL https://lghai.openai.azure.com/ is returning a "{"error":{"code":"404","message": "Resource not found"}}"

{"error":{"code":"404","message": "Resource not found"}}

I am not sure if it an issue with my storage account or subscription. I would appreciate if I can receive more help on this. Similarly, using my API is returning 'Preview url https://lghai.openai.azure.com/openai/deployments/gpt-4o-mini/extensions/chat/completions?api-version=2024-02-15-preview not found' error on my website , so I believe it is an issue from the Azure OpenAI service itself.

Can you help please?

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
4,081 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Tiago Costa 0 Reputation points MVP
    2025-03-16T17:27:42.4+00:00
    1. Make sure your Deployment Name (gpt-4o-mini) is the same as your configured deployment in Azure.
    2. Check if You Are Using the Correct API Key. Go to Azure OpenAI Service > Keys and Endpoint and copy the correct API Key and update your requests.

    Try accessing the endpoint via Postman or CURL:

    curl -X POST "https://lghai.openai.azure.com/openai/deployments/gpt-4o-mini/chat/completions?api-version=2024-02-15-preview" \

    -H "Content-Type: application/json" \

    -H "api-key: YOUR_API_KEY" \

    -d '{ "messages": [{"role": "system", "content": "Hello"}] }'

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.