Azure Open AI - vector_store / search api not working

Elliot Fraser 5 Reputation points
2025-04-04T14:45:38.3+00:00

Hi,

I am trying to use the vector store search API:

POST https://{endpoint}/openai/vector_stores/{vector_store_id}/search?api-version=2025-03-01-preview

See docs: https://learn.microsoft.com/en-us/azure/ai-services/openai/reference-preview#search-vector-store

But every response I get it:

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

I have been successfully using the vector store api for uploading files etc so am confident the Azure OpenAI endpoint and vector store id is correct.

Is anyone else having the same issue or can replicate?

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} vote

1 answer

Sort by: Most helpful
  1. Sina Salam 22,031 Reputation points Volunteer Moderator
    2025-04-04T16:17:33.6+00:00

    Hello Elliot Fraser,

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    I understand that your Azure Open AI - vector_store, or search API not working.

    Many users do have similar issues, and the critical part is that 404 error when using the Azure OpenAI vector store search API can occur due to several reasons, even if your endpoint and vector store ID are correct. You might need multiple steps to troubleshoot this issue.

    While check the root cause via your logs, try the followings:

    1. A malformed payload can trigger a 404, check the search API expects a JSON body with your request includes queries:
            {
              "queries": [
                {
                  "text": "your search query",
                  "top_k": 5,
                  "embedding_model": "text-embedding-ada-002"  // or your chosen model
                }
              ]
            }
      
    2. If you recently uploaded files to the vector store, wait for indexing to complete. Use the get vector store status API - https://learn.microsoft.com/en-us/azure/ai-services/openai/reference-preview#get-vector-store to verify:
         GET https://{endpoint}/openai/vector_stores/{vector_store_id}?api-version=2024-03-01-preview
      
       Check if `"status": "ready"`.
      
    3. Verify that your account has the necessary permissions: Go to Azure portal > your OpenAI resource > Access Control (IAM) > confirm your account has Cognitive Services OpenAI User or Contributor roles.
    4. Also, check the regional availability, because Azure OpenAI resource should be in a region that supports the Vector Store API - https://learn.microsoft.com/en-us/answers/questions/2148544/new-vector-stores-for-azure-openai-assistants-fail
    5. Use curl or Postman to test the API call directly:
         curl -X POST "https://YOUR_RESOURCE.openai.azure.com/openai/vector_stores/vs-YOUR_ID/search?api-version=2025-03-01-preview" \
           -H "api-key: YOUR_API_KEY" \
           -H "Content-Type: application/json" \
           -d '{
             "queries": [
               {
                 "text": "test query",
                 "top_k": 3
               }
             ]
           }'
      
      This helps isolate SDK/application-specific issues - https://community.openai.com/t/azure-open-ai-api-endpoint-404-resource-not-found/650881

    I hope this is helpful! Do not hesitate to let me know if you have any other questions or clarifications.


    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.


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.