private static void ImageContent(String token, String endpoint) { // The obs url of file String dataUrl = ""; // The image content confidence interval,"politics" default 0.48f,"terrorism":0 float threshold = 0.6f; JArray categories = new JArray(); categories.Add("politics"); categories.Add("terrorism"); categories.Add("p**n"); // post data by native file String data = utils.ConvertFileToBase64("../../data/moderation-terrorism.jpg"); String reslut = ModerationService.ImageContentToken(token, data, dataUrl, threshold, categories, endpoint); Console.WriteLine(reslut); // The OBS link must match the region, and the OBS resources of different regions are not shared dataUrl = "https://sdk-obs-source-save.obs.cn-north-4.myhuaweicloud.com/terrorism.jpg"; // post data by obs url reslut = ModerationService.ImageContentToken(token, "", dataUrl, threshold, categories, endpoint); Console.WriteLine(reslut); Console.ReadKey(); }