How to use detect language API please give example

Ghosh, Anjali 26 Reputation points
2023-01-21T12:29:34.8+00:00
{"error":{"code":"404","message": "Resource not found"}} getting this error.
used service like this- 
with region and headers
Azure Translator
Azure Translator
An Azure service to easily conduct machine translation with a simple REST API call.
346 questions
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
2,415 questions
0 comments No comments
{count} votes

Accepted answer
  1. Roderick Bant 2,046 Reputation points
    2023-01-21T12:54:49.2533333+00:00

    Hi thank you for your question at Q&A. I understand that you are running in to 404 HTTP errors when attempting to use Language Detection in cognitive services.

    As a first step to using language detection you will need a Language resource which you can create in the Azure Portal. You can use this quick link to create a language resource. There is a free pricing tier you can use.

    You need the key and endpoint from this language resource.

    Then you can make requests to the new service at https://<your-language-resource-endpoint>/language/:analyze-text?api-version=2022-05-01

    In the request you should set a header Ocp-Apim-Subscription-Key:<your-language-resource-key> with your key for the service.

    There is also a good Quickstart guide for REST API and various programming languages on other tabs of the same page. I hope that helps to get you started.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful