Azure Cognitive Service Custom Question Answering Keeps Returning a 404 on "Get Answers" and "Get Answers From Text"

Kyle Hoffman 1 Reputation point

The cognitive services API is always returning error: {code: "404", message: "Resource not found"} when I try to hit the endpoints for "Get Answers" and "Get Answers from Text" in Postman.
Another endpoint called "Get Qnas" uses all the same environment variables and returns all the question and answer pairs so I'm completely stumped on why the other two endpoints are failing. Any help would be greatly appreciated.

This is the CURL request for "Get Answers":

curl -X POST "" -H "Ocp-Apim-Subscription-Key: XYZ" -H "Content-Type: application/json" -d "{\"top\":3,\"question\":\"Test Question\",\"includeUnstructuredSources\":true,\"confidenceScoreThreshold\":\"0\",\"answerSpanRequest\":{\"enable\":true,\"topAnswersWithSpan\":1,\"confidenceScoreThreshold\":\"0\"},\"filters\":{\"metadataFilter\":{\"logicalOperation\":\"AND\",\"metadata\":[{\"key\":\"category\",\"value\":\"api\"}]}}}"

This is the postman collection:

These are the environment variables: 222239-image.png

Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
2,194 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. YutongTie-MSFT 43,076 Reputation points

    Hello @Kyle Hoffman

    I think you are using old QnA maker resource or Cognitive Service resource to call question answering API, is that correct? For question answering API, you need to create a language service and use the key of it.

    If you have one langague service key, please use it, if you are currently still working on QnA maker/ Cognitive Service, please see below notice and follow the migration guidance.

    The QnA Maker service is being retired on the 31st of March, 2025. A newer version of the question and answering capability is now available as part of Azure Cognitive Service for Language. For question answering capabilities within the Language Service, see question answering. Starting 1st October, 2022 you won’t be able to create new QnA Maker resources.

    For information on migrating existing QnA Maker knowledge bases to question answering, consult the migration guide -

    I hope this helps, please let me know if you are not the case or you need more help, we are glad to check.


    -Please kindly accept the answer if you feel helpful to support the community, thanks a lot.

    0 comments No comments