#test with HttpClient var httpClient = new HttpClient(); var stringContent = new StringContent(@"{" + "\n" + @" ""kind"": ""PiiEntityRecognition""," + "\n" + @" ""parameters"": {" + "\n" + @" ""modelVersion"": ""latest""" + "\n" + @" }," + "\n" + @" ""tasks"":[" + "\n" + @" {" + "\n" + @" ""kind"": ""PiiEntityRecognition""," + "\n" + @" ""taskName"": ""EntitiesLROTask""" + "\n" + @" }" + "\n" + @" ]," + "\n" + @" ""analysisInput"":{" + "\n" + @" ""documents"": [" + "\n" + @" {" + "\n" + @" ""id"": ""1""," + "\n" + @" ""language"": ""auto""," + "\n" + @" ""text"": """ + extractEntityRequestInput.Documents[0] + @" """ + @" }" + "\n" + @" ]" + "\n" + @" }" + "\n" + @"}" + "\n" + @"" ,Encoding.UTF8,"application/json"); httpClient.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", ""); var response = await httpClient.PostAsync("",stringContent); #test with SDK var client = new TextAnalyticsClient(endPoint, key); var documents2 = new[] { "1/12/23, 1:54 PM YouTube Community\nView all posts\nWatch and subscribe (Desktop, Mobile and other devices)\nViews problem\nमेर चैनल म ूज और सद नह बढ़ रह ह \nYouTube Go is going away in August of this year Announcement\nView all\nUpload videos and manage my channel\nYouTube Handle unavailable\ncommunity tab for people with less than 500 subscriberz\nOrganization channel, managed by a tech person who has le , now how to manage the\nchannel\nView all\nConnect with Comments, Posts, Stories and more\n🎬 Ask the YouTube team (India) - Connecting with your audience Announcement\nRecent Repo s of Missing Comments\nUpdates to Captions and Audio Features on YouTube\nhttps://support.google.com/youtube/community?hl=en 2/4", "nमेर चैनल म ूज और सद नह बढ़ रह ह" }; var result = new List(); TextAnalyticsActions actions = new TextAnalyticsActions() { RecognizePiiEntitiesActions = new List() { new() { DisableServiceLogs = true } }, }; var response = await client.RecognizePiiEntitiesBatchAsync(documents2); var operation = await client.StartAnalyzeActionsAsync(documents2, actions, DefaultLang); await operation.WaitForCompletionAsync();