[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-microsoft-azure-ai-contentsafety-java":3,"mdc--koam2w-key":42,"related-repo-microsoft-azure-ai-contentsafety-java":1872,"related-org-microsoft-azure-ai-contentsafety-java":1973},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":25,"repoUrl":26,"updatedAt":27,"license":28,"forks":29,"topics":30,"repo":37,"sourceUrl":40,"mdContent":41},"azure-ai-contentsafety-java","build content moderation applications with Azure AI","Build content moderation applications with Azure AI Content Safety SDK for Java. Use when implementing text\u002Fimage analysis, blocklist management, or harm detection for hate, violence, sexual content, and self-harm.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"microsoft","Microsoft","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fmicrosoft.png",[12,16,19,22],{"name":13,"slug":14,"type":15},"Security","security","tag",{"name":17,"slug":18,"type":15},"Azure","azure",{"name":20,"slug":21,"type":15},"Java","java",{"name":23,"slug":24,"type":15},"AI Infrastructure","ai-infrastructure",2804,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills","2026-07-07T06:53:31.293235","MIT",315,[31,32,18,33,34,35,36],"agent-skills","agents","foundry","mcp","sdk","skills",{"repoUrl":26,"stars":25,"forks":29,"topics":38,"description":39},[31,32,18,33,34,35,36],"Skills, MCP servers, Custom Agents, Agents.md for SDKs to ground Coding Agents","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Ftree\u002FHEAD\u002F.github\u002Fplugins\u002Fazure-sdk-java\u002Fskills\u002Fazure-ai-contentsafety-java","---\nname: azure-ai-contentsafety-java\ndescription: Build content moderation applications with Azure AI Content Safety SDK for Java. Use when implementing text\u002Fimage analysis, blocklist management, or harm detection for hate, violence, sexual content, and self-harm.\nlicense: MIT\nmetadata:\n  author: Microsoft\n  version: \"1.0.0\"\n  package: com.azure:azure-ai-contentsafety\n---\n\n# Azure AI Content Safety SDK for Java\n\nBuild content moderation applications using the Azure AI Content Safety SDK for Java.\n\n## Installation\n\n```xml\n\u003Cdependency>\n    \u003CgroupId>com.azure\u003C\u002FgroupId>\n    \u003CartifactId>azure-ai-contentsafety\u003C\u002FartifactId>\n    \u003Cversion>1.1.0-beta.1\u003C\u002Fversion>\n\u003C\u002Fdependency>\n```\n\n## Client Creation\n\n### With API Key\n\n```java\nimport com.azure.ai.contentsafety.ContentSafetyClient;\nimport com.azure.ai.contentsafety.ContentSafetyClientBuilder;\nimport com.azure.ai.contentsafety.BlocklistClient;\nimport com.azure.ai.contentsafety.BlocklistClientBuilder;\nimport com.azure.core.credential.KeyCredential;\n\nString endpoint = System.getenv(\"CONTENT_SAFETY_ENDPOINT\");\nString key = System.getenv(\"CONTENT_SAFETY_KEY\");\n\nContentSafetyClient contentSafetyClient = new ContentSafetyClientBuilder()\n    .credential(new KeyCredential(key))\n    .endpoint(endpoint)\n    .buildClient();\n\nBlocklistClient blocklistClient = new BlocklistClientBuilder()\n    .credential(new KeyCredential(key))\n    .endpoint(endpoint)\n    .buildClient();\n```\n\n### With DefaultAzureCredential\n\n```java\nimport com.azure.core.credential.TokenCredential;\nimport com.azure.identity.AzureIdentityEnvVars;\nimport com.azure.identity.DefaultAzureCredentialBuilder;\nimport com.azure.identity.ManagedIdentityCredentialBuilder;\n\nTokenCredential credential = new DefaultAzureCredentialBuilder()\n    .requireEnvVars(AzureIdentityEnvVars.AZURE_TOKEN_CREDENTIALS)\n    .build();\n\u002F\u002F Or use a specific credential directly in production:\n\u002F\u002F See https:\u002F\u002Flearn.microsoft.com\u002Fjava\u002Fapi\u002Foverview\u002Fazure\u002Fidentity-readme?view=azure-java-stable#credential-classes\n\u002F\u002F TokenCredential credential = new ManagedIdentityCredentialBuilder().build();\n\nContentSafetyClient client = new ContentSafetyClientBuilder()\n    .credential(credential)\n    .endpoint(endpoint)\n    .buildClient();\n```\n\n## Key Concepts\n\n### Harm Categories\n| Category | Description |\n|----------|-------------|\n| Hate | Discriminatory language based on identity groups |\n| Sexual | Sexual content, relationships, acts |\n| Violence | Physical harm, weapons, injury |\n| Self-harm | Self-injury, suicide-related content |\n\n### Severity Levels\n- Text: 0-7 scale (default outputs 0, 2, 4, 6)\n- Image: 0, 2, 4, 6 (trimmed scale)\n\n## Core Patterns\n\n### Analyze Text\n\n```java\nimport com.azure.ai.contentsafety.models.*;\n\nAnalyzeTextResult result = contentSafetyClient.analyzeText(\n    new AnalyzeTextOptions(\"This is text to analyze\"));\n\nfor (TextCategoriesAnalysis category : result.getCategoriesAnalysis()) {\n    System.out.printf(\"Category: %s, Severity: %d%n\",\n        category.getCategory(),\n        category.getSeverity());\n}\n```\n\n### Analyze Text with Options\n\n```java\nAnalyzeTextOptions options = new AnalyzeTextOptions(\"Text to analyze\")\n    .setCategories(Arrays.asList(\n        TextCategory.HATE,\n        TextCategory.VIOLENCE))\n    .setOutputType(AnalyzeTextOutputType.EIGHT_SEVERITY_LEVELS);\n\nAnalyzeTextResult result = contentSafetyClient.analyzeText(options);\n```\n\n### Analyze Text with Blocklist\n\n```java\nAnalyzeTextOptions options = new AnalyzeTextOptions(\"I h*te you and want to k*ll you\")\n    .setBlocklistNames(Arrays.asList(\"my-blocklist\"))\n    .setHaltOnBlocklistHit(true);\n\nAnalyzeTextResult result = contentSafetyClient.analyzeText(options);\n\nif (result.getBlocklistsMatch() != null) {\n    for (TextBlocklistMatch match : result.getBlocklistsMatch()) {\n        System.out.printf(\"Blocklist: %s, Item: %s, Text: %s%n\",\n            match.getBlocklistName(),\n            match.getBlocklistItemId(),\n            match.getBlocklistItemText());\n    }\n}\n```\n\n### Analyze Image\n\n```java\nimport com.azure.ai.contentsafety.models.*;\nimport com.azure.core.util.BinaryData;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\n\u002F\u002F From file\nbyte[] imageBytes = Files.readAllBytes(Paths.get(\"image.png\"));\nContentSafetyImageData imageData = new ContentSafetyImageData()\n    .setContent(BinaryData.fromBytes(imageBytes));\n\nAnalyzeImageResult result = contentSafetyClient.analyzeImage(\n    new AnalyzeImageOptions(imageData));\n\nfor (ImageCategoriesAnalysis category : result.getCategoriesAnalysis()) {\n    System.out.printf(\"Category: %s, Severity: %d%n\",\n        category.getCategory(),\n        category.getSeverity());\n}\n```\n\n### Analyze Image from URL\n\n```java\nContentSafetyImageData imageData = new ContentSafetyImageData()\n    .setBlobUrl(\"https:\u002F\u002Fexample.com\u002Fimage.jpg\");\n\nAnalyzeImageResult result = contentSafetyClient.analyzeImage(\n    new AnalyzeImageOptions(imageData));\n```\n\n## Blocklist Management\n\n### Create or Update Blocklist\n\n```java\nimport com.azure.core.http.rest.RequestOptions;\nimport com.azure.core.http.rest.Response;\nimport com.azure.core.util.BinaryData;\nimport java.util.Map;\n\nMap\u003CString, String> description = Map.of(\"description\", \"Custom blocklist\");\nBinaryData resource = BinaryData.fromObject(description);\n\nResponse\u003CBinaryData> response = blocklistClient.createOrUpdateTextBlocklistWithResponse(\n    \"my-blocklist\", resource, new RequestOptions());\n\nif (response.getStatusCode() == 201) {\n    System.out.println(\"Blocklist created\");\n} else if (response.getStatusCode() == 200) {\n    System.out.println(\"Blocklist updated\");\n}\n```\n\n### Add Block Items\n\n```java\nimport com.azure.ai.contentsafety.models.*;\nimport java.util.Arrays;\n\nList\u003CTextBlocklistItem> items = Arrays.asList(\n    new TextBlocklistItem(\"badword1\").setDescription(\"Offensive term\"),\n    new TextBlocklistItem(\"badword2\").setDescription(\"Another term\")\n);\n\nAddOrUpdateTextBlocklistItemsResult result = blocklistClient.addOrUpdateBlocklistItems(\n    \"my-blocklist\",\n    new AddOrUpdateTextBlocklistItemsOptions(items));\n\nfor (TextBlocklistItem item : result.getBlocklistItems()) {\n    System.out.printf(\"Added: %s (ID: %s)%n\",\n        item.getText(),\n        item.getBlocklistItemId());\n}\n```\n\n### List Blocklists\n\n```java\nPagedIterable\u003CTextBlocklist> blocklists = blocklistClient.listTextBlocklists();\n\nfor (TextBlocklist blocklist : blocklists) {\n    System.out.printf(\"Blocklist: %s, Description: %s%n\",\n        blocklist.getName(),\n        blocklist.getDescription());\n}\n```\n\n### Get Blocklist\n\n```java\nTextBlocklist blocklist = blocklistClient.getTextBlocklist(\"my-blocklist\");\nSystem.out.println(\"Name: \" + blocklist.getName());\n```\n\n### List Block Items\n\n```java\nPagedIterable\u003CTextBlocklistItem> items = \n    blocklistClient.listTextBlocklistItems(\"my-blocklist\");\n\nfor (TextBlocklistItem item : items) {\n    System.out.printf(\"ID: %s, Text: %s%n\",\n        item.getBlocklistItemId(),\n        item.getText());\n}\n```\n\n### Remove Block Items\n\n```java\nList\u003CString> itemIds = Arrays.asList(\"item-id-1\", \"item-id-2\");\n\nblocklistClient.removeBlocklistItems(\n    \"my-blocklist\",\n    new RemoveTextBlocklistItemsOptions(itemIds));\n```\n\n### Delete Blocklist\n\n```java\nblocklistClient.deleteTextBlocklist(\"my-blocklist\");\n```\n\n## Error Handling\n\n```java\nimport com.azure.core.exception.HttpResponseException;\n\ntry {\n    contentSafetyClient.analyzeText(new AnalyzeTextOptions(\"test\"));\n} catch (HttpResponseException e) {\n    System.out.println(\"Status: \" + e.getResponse().getStatusCode());\n    System.out.println(\"Error: \" + e.getMessage());\n    \u002F\u002F Common codes: InvalidRequestBody, ResourceNotFound, TooManyRequests\n}\n```\n\n## Environment Variables\n\n```bash\nCONTENT_SAFETY_ENDPOINT=https:\u002F\u002F\u003Cresource>.cognitiveservices.azure.com\u002F # Required for all auth methods\nCONTENT_SAFETY_KEY=\u003Cyour-api-key> # Only required for AzureKeyCredential auth\nAZURE_TOKEN_CREDENTIALS=prod  # Required only if DefaultAzureCredential is used in production\n```\n\n## Best Practices\n\n1. **Blocklist Delay**: Changes take ~5 minutes to take effect\n2. **Category Selection**: Only request needed categories to reduce latency\n3. **Severity Thresholds**: Typically block severity >= 4 for strict moderation\n4. **Batch Processing**: Process multiple items in parallel for throughput\n5. **Caching**: Cache blocklist results where appropriate\n\n## Trigger Phrases\n\n- \"content safety Java\"\n- \"content moderation Azure\"\n- \"analyze text safety\"\n- \"image moderation Java\"\n- \"blocklist management\"\n- \"hate speech detection\"\n- \"harmful content filter\"\n",{"data":43,"body":47},{"name":4,"description":6,"license":28,"metadata":44},{"author":9,"version":45,"package":46},"1.0.0","com.azure:azure-ai-contentsafety",{"type":48,"children":49},"root",[50,59,65,72,131,137,144,305,311,442,448,454,534,540,555,561,567,652,658,720,726,841,847,990,996,1039,1045,1051,1181,1187,1325,1331,1392,1398,1421,1427,1496,1502,1547,1553,1567,1573,1650,1656,1761,1767,1822,1828,1866],{"type":51,"tag":52,"props":53,"children":55},"element","h1",{"id":54},"azure-ai-content-safety-sdk-for-java",[56],{"type":57,"value":58},"text","Azure AI Content Safety SDK for Java",{"type":51,"tag":60,"props":61,"children":62},"p",{},[63],{"type":57,"value":64},"Build content moderation applications using the Azure AI Content Safety SDK for Java.",{"type":51,"tag":66,"props":67,"children":69},"h2",{"id":68},"installation",[70],{"type":57,"value":71},"Installation",{"type":51,"tag":73,"props":74,"children":79},"pre",{"className":75,"code":76,"language":77,"meta":78,"style":78},"language-xml shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u003Cdependency>\n    \u003CgroupId>com.azure\u003C\u002FgroupId>\n    \u003CartifactId>azure-ai-contentsafety\u003C\u002FartifactId>\n    \u003Cversion>1.1.0-beta.1\u003C\u002Fversion>\n\u003C\u002Fdependency>\n","xml","",[80],{"type":51,"tag":81,"props":82,"children":83},"code",{"__ignoreMap":78},[84,95,104,113,122],{"type":51,"tag":85,"props":86,"children":89},"span",{"class":87,"line":88},"line",1,[90],{"type":51,"tag":85,"props":91,"children":92},{},[93],{"type":57,"value":94},"\u003Cdependency>\n",{"type":51,"tag":85,"props":96,"children":98},{"class":87,"line":97},2,[99],{"type":51,"tag":85,"props":100,"children":101},{},[102],{"type":57,"value":103},"    \u003CgroupId>com.azure\u003C\u002FgroupId>\n",{"type":51,"tag":85,"props":105,"children":107},{"class":87,"line":106},3,[108],{"type":51,"tag":85,"props":109,"children":110},{},[111],{"type":57,"value":112},"    \u003CartifactId>azure-ai-contentsafety\u003C\u002FartifactId>\n",{"type":51,"tag":85,"props":114,"children":116},{"class":87,"line":115},4,[117],{"type":51,"tag":85,"props":118,"children":119},{},[120],{"type":57,"value":121},"    \u003Cversion>1.1.0-beta.1\u003C\u002Fversion>\n",{"type":51,"tag":85,"props":123,"children":125},{"class":87,"line":124},5,[126],{"type":51,"tag":85,"props":127,"children":128},{},[129],{"type":57,"value":130},"\u003C\u002Fdependency>\n",{"type":51,"tag":66,"props":132,"children":134},{"id":133},"client-creation",[135],{"type":57,"value":136},"Client Creation",{"type":51,"tag":138,"props":139,"children":141},"h3",{"id":140},"with-api-key",[142],{"type":57,"value":143},"With API Key",{"type":51,"tag":73,"props":145,"children":148},{"className":146,"code":147,"language":21,"meta":78,"style":78},"language-java shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import com.azure.ai.contentsafety.ContentSafetyClient;\nimport com.azure.ai.contentsafety.ContentSafetyClientBuilder;\nimport com.azure.ai.contentsafety.BlocklistClient;\nimport com.azure.ai.contentsafety.BlocklistClientBuilder;\nimport com.azure.core.credential.KeyCredential;\n\nString endpoint = System.getenv(\"CONTENT_SAFETY_ENDPOINT\");\nString key = System.getenv(\"CONTENT_SAFETY_KEY\");\n\nContentSafetyClient contentSafetyClient = new ContentSafetyClientBuilder()\n    .credential(new KeyCredential(key))\n    .endpoint(endpoint)\n    .buildClient();\n\nBlocklistClient blocklistClient = new BlocklistClientBuilder()\n    .credential(new KeyCredential(key))\n    .endpoint(endpoint)\n    .buildClient();\n",[149],{"type":51,"tag":81,"props":150,"children":151},{"__ignoreMap":78},[152,160,168,176,184,192,202,211,220,228,237,246,255,264,272,281,289,297],{"type":51,"tag":85,"props":153,"children":154},{"class":87,"line":88},[155],{"type":51,"tag":85,"props":156,"children":157},{},[158],{"type":57,"value":159},"import com.azure.ai.contentsafety.ContentSafetyClient;\n",{"type":51,"tag":85,"props":161,"children":162},{"class":87,"line":97},[163],{"type":51,"tag":85,"props":164,"children":165},{},[166],{"type":57,"value":167},"import com.azure.ai.contentsafety.ContentSafetyClientBuilder;\n",{"type":51,"tag":85,"props":169,"children":170},{"class":87,"line":106},[171],{"type":51,"tag":85,"props":172,"children":173},{},[174],{"type":57,"value":175},"import com.azure.ai.contentsafety.BlocklistClient;\n",{"type":51,"tag":85,"props":177,"children":178},{"class":87,"line":115},[179],{"type":51,"tag":85,"props":180,"children":181},{},[182],{"type":57,"value":183},"import com.azure.ai.contentsafety.BlocklistClientBuilder;\n",{"type":51,"tag":85,"props":185,"children":186},{"class":87,"line":124},[187],{"type":51,"tag":85,"props":188,"children":189},{},[190],{"type":57,"value":191},"import com.azure.core.credential.KeyCredential;\n",{"type":51,"tag":85,"props":193,"children":195},{"class":87,"line":194},6,[196],{"type":51,"tag":85,"props":197,"children":199},{"emptyLinePlaceholder":198},true,[200],{"type":57,"value":201},"\n",{"type":51,"tag":85,"props":203,"children":205},{"class":87,"line":204},7,[206],{"type":51,"tag":85,"props":207,"children":208},{},[209],{"type":57,"value":210},"String endpoint = System.getenv(\"CONTENT_SAFETY_ENDPOINT\");\n",{"type":51,"tag":85,"props":212,"children":214},{"class":87,"line":213},8,[215],{"type":51,"tag":85,"props":216,"children":217},{},[218],{"type":57,"value":219},"String key = System.getenv(\"CONTENT_SAFETY_KEY\");\n",{"type":51,"tag":85,"props":221,"children":223},{"class":87,"line":222},9,[224],{"type":51,"tag":85,"props":225,"children":226},{"emptyLinePlaceholder":198},[227],{"type":57,"value":201},{"type":51,"tag":85,"props":229,"children":231},{"class":87,"line":230},10,[232],{"type":51,"tag":85,"props":233,"children":234},{},[235],{"type":57,"value":236},"ContentSafetyClient contentSafetyClient = new ContentSafetyClientBuilder()\n",{"type":51,"tag":85,"props":238,"children":240},{"class":87,"line":239},11,[241],{"type":51,"tag":85,"props":242,"children":243},{},[244],{"type":57,"value":245},"    .credential(new KeyCredential(key))\n",{"type":51,"tag":85,"props":247,"children":249},{"class":87,"line":248},12,[250],{"type":51,"tag":85,"props":251,"children":252},{},[253],{"type":57,"value":254},"    .endpoint(endpoint)\n",{"type":51,"tag":85,"props":256,"children":258},{"class":87,"line":257},13,[259],{"type":51,"tag":85,"props":260,"children":261},{},[262],{"type":57,"value":263},"    .buildClient();\n",{"type":51,"tag":85,"props":265,"children":267},{"class":87,"line":266},14,[268],{"type":51,"tag":85,"props":269,"children":270},{"emptyLinePlaceholder":198},[271],{"type":57,"value":201},{"type":51,"tag":85,"props":273,"children":275},{"class":87,"line":274},15,[276],{"type":51,"tag":85,"props":277,"children":278},{},[279],{"type":57,"value":280},"BlocklistClient blocklistClient = new BlocklistClientBuilder()\n",{"type":51,"tag":85,"props":282,"children":284},{"class":87,"line":283},16,[285],{"type":51,"tag":85,"props":286,"children":287},{},[288],{"type":57,"value":245},{"type":51,"tag":85,"props":290,"children":292},{"class":87,"line":291},17,[293],{"type":51,"tag":85,"props":294,"children":295},{},[296],{"type":57,"value":254},{"type":51,"tag":85,"props":298,"children":300},{"class":87,"line":299},18,[301],{"type":51,"tag":85,"props":302,"children":303},{},[304],{"type":57,"value":263},{"type":51,"tag":138,"props":306,"children":308},{"id":307},"with-defaultazurecredential",[309],{"type":57,"value":310},"With DefaultAzureCredential",{"type":51,"tag":73,"props":312,"children":314},{"className":146,"code":313,"language":21,"meta":78,"style":78},"import com.azure.core.credential.TokenCredential;\nimport com.azure.identity.AzureIdentityEnvVars;\nimport com.azure.identity.DefaultAzureCredentialBuilder;\nimport com.azure.identity.ManagedIdentityCredentialBuilder;\n\nTokenCredential credential = new DefaultAzureCredentialBuilder()\n    .requireEnvVars(AzureIdentityEnvVars.AZURE_TOKEN_CREDENTIALS)\n    .build();\n\u002F\u002F Or use a specific credential directly in production:\n\u002F\u002F See https:\u002F\u002Flearn.microsoft.com\u002Fjava\u002Fapi\u002Foverview\u002Fazure\u002Fidentity-readme?view=azure-java-stable#credential-classes\n\u002F\u002F TokenCredential credential = new ManagedIdentityCredentialBuilder().build();\n\nContentSafetyClient client = new ContentSafetyClientBuilder()\n    .credential(credential)\n    .endpoint(endpoint)\n    .buildClient();\n",[315],{"type":51,"tag":81,"props":316,"children":317},{"__ignoreMap":78},[318,326,334,342,350,357,365,373,381,389,397,405,412,420,428,435],{"type":51,"tag":85,"props":319,"children":320},{"class":87,"line":88},[321],{"type":51,"tag":85,"props":322,"children":323},{},[324],{"type":57,"value":325},"import com.azure.core.credential.TokenCredential;\n",{"type":51,"tag":85,"props":327,"children":328},{"class":87,"line":97},[329],{"type":51,"tag":85,"props":330,"children":331},{},[332],{"type":57,"value":333},"import com.azure.identity.AzureIdentityEnvVars;\n",{"type":51,"tag":85,"props":335,"children":336},{"class":87,"line":106},[337],{"type":51,"tag":85,"props":338,"children":339},{},[340],{"type":57,"value":341},"import com.azure.identity.DefaultAzureCredentialBuilder;\n",{"type":51,"tag":85,"props":343,"children":344},{"class":87,"line":115},[345],{"type":51,"tag":85,"props":346,"children":347},{},[348],{"type":57,"value":349},"import com.azure.identity.ManagedIdentityCredentialBuilder;\n",{"type":51,"tag":85,"props":351,"children":352},{"class":87,"line":124},[353],{"type":51,"tag":85,"props":354,"children":355},{"emptyLinePlaceholder":198},[356],{"type":57,"value":201},{"type":51,"tag":85,"props":358,"children":359},{"class":87,"line":194},[360],{"type":51,"tag":85,"props":361,"children":362},{},[363],{"type":57,"value":364},"TokenCredential credential = new DefaultAzureCredentialBuilder()\n",{"type":51,"tag":85,"props":366,"children":367},{"class":87,"line":204},[368],{"type":51,"tag":85,"props":369,"children":370},{},[371],{"type":57,"value":372},"    .requireEnvVars(AzureIdentityEnvVars.AZURE_TOKEN_CREDENTIALS)\n",{"type":51,"tag":85,"props":374,"children":375},{"class":87,"line":213},[376],{"type":51,"tag":85,"props":377,"children":378},{},[379],{"type":57,"value":380},"    .build();\n",{"type":51,"tag":85,"props":382,"children":383},{"class":87,"line":222},[384],{"type":51,"tag":85,"props":385,"children":386},{},[387],{"type":57,"value":388},"\u002F\u002F Or use a specific credential directly in production:\n",{"type":51,"tag":85,"props":390,"children":391},{"class":87,"line":230},[392],{"type":51,"tag":85,"props":393,"children":394},{},[395],{"type":57,"value":396},"\u002F\u002F See https:\u002F\u002Flearn.microsoft.com\u002Fjava\u002Fapi\u002Foverview\u002Fazure\u002Fidentity-readme?view=azure-java-stable#credential-classes\n",{"type":51,"tag":85,"props":398,"children":399},{"class":87,"line":239},[400],{"type":51,"tag":85,"props":401,"children":402},{},[403],{"type":57,"value":404},"\u002F\u002F TokenCredential credential = new ManagedIdentityCredentialBuilder().build();\n",{"type":51,"tag":85,"props":406,"children":407},{"class":87,"line":248},[408],{"type":51,"tag":85,"props":409,"children":410},{"emptyLinePlaceholder":198},[411],{"type":57,"value":201},{"type":51,"tag":85,"props":413,"children":414},{"class":87,"line":257},[415],{"type":51,"tag":85,"props":416,"children":417},{},[418],{"type":57,"value":419},"ContentSafetyClient client = new ContentSafetyClientBuilder()\n",{"type":51,"tag":85,"props":421,"children":422},{"class":87,"line":266},[423],{"type":51,"tag":85,"props":424,"children":425},{},[426],{"type":57,"value":427},"    .credential(credential)\n",{"type":51,"tag":85,"props":429,"children":430},{"class":87,"line":274},[431],{"type":51,"tag":85,"props":432,"children":433},{},[434],{"type":57,"value":254},{"type":51,"tag":85,"props":436,"children":437},{"class":87,"line":283},[438],{"type":51,"tag":85,"props":439,"children":440},{},[441],{"type":57,"value":263},{"type":51,"tag":66,"props":443,"children":445},{"id":444},"key-concepts",[446],{"type":57,"value":447},"Key Concepts",{"type":51,"tag":138,"props":449,"children":451},{"id":450},"harm-categories",[452],{"type":57,"value":453},"Harm Categories",{"type":51,"tag":455,"props":456,"children":457},"table",{},[458,477],{"type":51,"tag":459,"props":460,"children":461},"thead",{},[462],{"type":51,"tag":463,"props":464,"children":465},"tr",{},[466,472],{"type":51,"tag":467,"props":468,"children":469},"th",{},[470],{"type":57,"value":471},"Category",{"type":51,"tag":467,"props":473,"children":474},{},[475],{"type":57,"value":476},"Description",{"type":51,"tag":478,"props":479,"children":480},"tbody",{},[481,495,508,521],{"type":51,"tag":463,"props":482,"children":483},{},[484,490],{"type":51,"tag":485,"props":486,"children":487},"td",{},[488],{"type":57,"value":489},"Hate",{"type":51,"tag":485,"props":491,"children":492},{},[493],{"type":57,"value":494},"Discriminatory language based on identity groups",{"type":51,"tag":463,"props":496,"children":497},{},[498,503],{"type":51,"tag":485,"props":499,"children":500},{},[501],{"type":57,"value":502},"Sexual",{"type":51,"tag":485,"props":504,"children":505},{},[506],{"type":57,"value":507},"Sexual content, relationships, acts",{"type":51,"tag":463,"props":509,"children":510},{},[511,516],{"type":51,"tag":485,"props":512,"children":513},{},[514],{"type":57,"value":515},"Violence",{"type":51,"tag":485,"props":517,"children":518},{},[519],{"type":57,"value":520},"Physical harm, weapons, injury",{"type":51,"tag":463,"props":522,"children":523},{},[524,529],{"type":51,"tag":485,"props":525,"children":526},{},[527],{"type":57,"value":528},"Self-harm",{"type":51,"tag":485,"props":530,"children":531},{},[532],{"type":57,"value":533},"Self-injury, suicide-related content",{"type":51,"tag":138,"props":535,"children":537},{"id":536},"severity-levels",[538],{"type":57,"value":539},"Severity Levels",{"type":51,"tag":541,"props":542,"children":543},"ul",{},[544,550],{"type":51,"tag":545,"props":546,"children":547},"li",{},[548],{"type":57,"value":549},"Text: 0-7 scale (default outputs 0, 2, 4, 6)",{"type":51,"tag":545,"props":551,"children":552},{},[553],{"type":57,"value":554},"Image: 0, 2, 4, 6 (trimmed scale)",{"type":51,"tag":66,"props":556,"children":558},{"id":557},"core-patterns",[559],{"type":57,"value":560},"Core Patterns",{"type":51,"tag":138,"props":562,"children":564},{"id":563},"analyze-text",[565],{"type":57,"value":566},"Analyze Text",{"type":51,"tag":73,"props":568,"children":570},{"className":146,"code":569,"language":21,"meta":78,"style":78},"import com.azure.ai.contentsafety.models.*;\n\nAnalyzeTextResult result = contentSafetyClient.analyzeText(\n    new AnalyzeTextOptions(\"This is text to analyze\"));\n\nfor (TextCategoriesAnalysis category : result.getCategoriesAnalysis()) {\n    System.out.printf(\"Category: %s, Severity: %d%n\",\n        category.getCategory(),\n        category.getSeverity());\n}\n",[571],{"type":51,"tag":81,"props":572,"children":573},{"__ignoreMap":78},[574,582,589,597,605,612,620,628,636,644],{"type":51,"tag":85,"props":575,"children":576},{"class":87,"line":88},[577],{"type":51,"tag":85,"props":578,"children":579},{},[580],{"type":57,"value":581},"import com.azure.ai.contentsafety.models.*;\n",{"type":51,"tag":85,"props":583,"children":584},{"class":87,"line":97},[585],{"type":51,"tag":85,"props":586,"children":587},{"emptyLinePlaceholder":198},[588],{"type":57,"value":201},{"type":51,"tag":85,"props":590,"children":591},{"class":87,"line":106},[592],{"type":51,"tag":85,"props":593,"children":594},{},[595],{"type":57,"value":596},"AnalyzeTextResult result = contentSafetyClient.analyzeText(\n",{"type":51,"tag":85,"props":598,"children":599},{"class":87,"line":115},[600],{"type":51,"tag":85,"props":601,"children":602},{},[603],{"type":57,"value":604},"    new AnalyzeTextOptions(\"This is text to analyze\"));\n",{"type":51,"tag":85,"props":606,"children":607},{"class":87,"line":124},[608],{"type":51,"tag":85,"props":609,"children":610},{"emptyLinePlaceholder":198},[611],{"type":57,"value":201},{"type":51,"tag":85,"props":613,"children":614},{"class":87,"line":194},[615],{"type":51,"tag":85,"props":616,"children":617},{},[618],{"type":57,"value":619},"for (TextCategoriesAnalysis category : result.getCategoriesAnalysis()) {\n",{"type":51,"tag":85,"props":621,"children":622},{"class":87,"line":204},[623],{"type":51,"tag":85,"props":624,"children":625},{},[626],{"type":57,"value":627},"    System.out.printf(\"Category: %s, Severity: %d%n\",\n",{"type":51,"tag":85,"props":629,"children":630},{"class":87,"line":213},[631],{"type":51,"tag":85,"props":632,"children":633},{},[634],{"type":57,"value":635},"        category.getCategory(),\n",{"type":51,"tag":85,"props":637,"children":638},{"class":87,"line":222},[639],{"type":51,"tag":85,"props":640,"children":641},{},[642],{"type":57,"value":643},"        category.getSeverity());\n",{"type":51,"tag":85,"props":645,"children":646},{"class":87,"line":230},[647],{"type":51,"tag":85,"props":648,"children":649},{},[650],{"type":57,"value":651},"}\n",{"type":51,"tag":138,"props":653,"children":655},{"id":654},"analyze-text-with-options",[656],{"type":57,"value":657},"Analyze Text with Options",{"type":51,"tag":73,"props":659,"children":661},{"className":146,"code":660,"language":21,"meta":78,"style":78},"AnalyzeTextOptions options = new AnalyzeTextOptions(\"Text to analyze\")\n    .setCategories(Arrays.asList(\n        TextCategory.HATE,\n        TextCategory.VIOLENCE))\n    .setOutputType(AnalyzeTextOutputType.EIGHT_SEVERITY_LEVELS);\n\nAnalyzeTextResult result = contentSafetyClient.analyzeText(options);\n",[662],{"type":51,"tag":81,"props":663,"children":664},{"__ignoreMap":78},[665,673,681,689,697,705,712],{"type":51,"tag":85,"props":666,"children":667},{"class":87,"line":88},[668],{"type":51,"tag":85,"props":669,"children":670},{},[671],{"type":57,"value":672},"AnalyzeTextOptions options = new AnalyzeTextOptions(\"Text to analyze\")\n",{"type":51,"tag":85,"props":674,"children":675},{"class":87,"line":97},[676],{"type":51,"tag":85,"props":677,"children":678},{},[679],{"type":57,"value":680},"    .setCategories(Arrays.asList(\n",{"type":51,"tag":85,"props":682,"children":683},{"class":87,"line":106},[684],{"type":51,"tag":85,"props":685,"children":686},{},[687],{"type":57,"value":688},"        TextCategory.HATE,\n",{"type":51,"tag":85,"props":690,"children":691},{"class":87,"line":115},[692],{"type":51,"tag":85,"props":693,"children":694},{},[695],{"type":57,"value":696},"        TextCategory.VIOLENCE))\n",{"type":51,"tag":85,"props":698,"children":699},{"class":87,"line":124},[700],{"type":51,"tag":85,"props":701,"children":702},{},[703],{"type":57,"value":704},"    .setOutputType(AnalyzeTextOutputType.EIGHT_SEVERITY_LEVELS);\n",{"type":51,"tag":85,"props":706,"children":707},{"class":87,"line":194},[708],{"type":51,"tag":85,"props":709,"children":710},{"emptyLinePlaceholder":198},[711],{"type":57,"value":201},{"type":51,"tag":85,"props":713,"children":714},{"class":87,"line":204},[715],{"type":51,"tag":85,"props":716,"children":717},{},[718],{"type":57,"value":719},"AnalyzeTextResult result = contentSafetyClient.analyzeText(options);\n",{"type":51,"tag":138,"props":721,"children":723},{"id":722},"analyze-text-with-blocklist",[724],{"type":57,"value":725},"Analyze Text with Blocklist",{"type":51,"tag":73,"props":727,"children":729},{"className":146,"code":728,"language":21,"meta":78,"style":78},"AnalyzeTextOptions options = new AnalyzeTextOptions(\"I h*te you and want to k*ll you\")\n    .setBlocklistNames(Arrays.asList(\"my-blocklist\"))\n    .setHaltOnBlocklistHit(true);\n\nAnalyzeTextResult result = contentSafetyClient.analyzeText(options);\n\nif (result.getBlocklistsMatch() != null) {\n    for (TextBlocklistMatch match : result.getBlocklistsMatch()) {\n        System.out.printf(\"Blocklist: %s, Item: %s, Text: %s%n\",\n            match.getBlocklistName(),\n            match.getBlocklistItemId(),\n            match.getBlocklistItemText());\n    }\n}\n",[730],{"type":51,"tag":81,"props":731,"children":732},{"__ignoreMap":78},[733,741,749,757,764,771,778,786,794,802,810,818,826,834],{"type":51,"tag":85,"props":734,"children":735},{"class":87,"line":88},[736],{"type":51,"tag":85,"props":737,"children":738},{},[739],{"type":57,"value":740},"AnalyzeTextOptions options = new AnalyzeTextOptions(\"I h*te you and want to k*ll you\")\n",{"type":51,"tag":85,"props":742,"children":743},{"class":87,"line":97},[744],{"type":51,"tag":85,"props":745,"children":746},{},[747],{"type":57,"value":748},"    .setBlocklistNames(Arrays.asList(\"my-blocklist\"))\n",{"type":51,"tag":85,"props":750,"children":751},{"class":87,"line":106},[752],{"type":51,"tag":85,"props":753,"children":754},{},[755],{"type":57,"value":756},"    .setHaltOnBlocklistHit(true);\n",{"type":51,"tag":85,"props":758,"children":759},{"class":87,"line":115},[760],{"type":51,"tag":85,"props":761,"children":762},{"emptyLinePlaceholder":198},[763],{"type":57,"value":201},{"type":51,"tag":85,"props":765,"children":766},{"class":87,"line":124},[767],{"type":51,"tag":85,"props":768,"children":769},{},[770],{"type":57,"value":719},{"type":51,"tag":85,"props":772,"children":773},{"class":87,"line":194},[774],{"type":51,"tag":85,"props":775,"children":776},{"emptyLinePlaceholder":198},[777],{"type":57,"value":201},{"type":51,"tag":85,"props":779,"children":780},{"class":87,"line":204},[781],{"type":51,"tag":85,"props":782,"children":783},{},[784],{"type":57,"value":785},"if (result.getBlocklistsMatch() != null) {\n",{"type":51,"tag":85,"props":787,"children":788},{"class":87,"line":213},[789],{"type":51,"tag":85,"props":790,"children":791},{},[792],{"type":57,"value":793},"    for (TextBlocklistMatch match : result.getBlocklistsMatch()) {\n",{"type":51,"tag":85,"props":795,"children":796},{"class":87,"line":222},[797],{"type":51,"tag":85,"props":798,"children":799},{},[800],{"type":57,"value":801},"        System.out.printf(\"Blocklist: %s, Item: %s, Text: %s%n\",\n",{"type":51,"tag":85,"props":803,"children":804},{"class":87,"line":230},[805],{"type":51,"tag":85,"props":806,"children":807},{},[808],{"type":57,"value":809},"            match.getBlocklistName(),\n",{"type":51,"tag":85,"props":811,"children":812},{"class":87,"line":239},[813],{"type":51,"tag":85,"props":814,"children":815},{},[816],{"type":57,"value":817},"            match.getBlocklistItemId(),\n",{"type":51,"tag":85,"props":819,"children":820},{"class":87,"line":248},[821],{"type":51,"tag":85,"props":822,"children":823},{},[824],{"type":57,"value":825},"            match.getBlocklistItemText());\n",{"type":51,"tag":85,"props":827,"children":828},{"class":87,"line":257},[829],{"type":51,"tag":85,"props":830,"children":831},{},[832],{"type":57,"value":833},"    }\n",{"type":51,"tag":85,"props":835,"children":836},{"class":87,"line":266},[837],{"type":51,"tag":85,"props":838,"children":839},{},[840],{"type":57,"value":651},{"type":51,"tag":138,"props":842,"children":844},{"id":843},"analyze-image",[845],{"type":57,"value":846},"Analyze Image",{"type":51,"tag":73,"props":848,"children":850},{"className":146,"code":849,"language":21,"meta":78,"style":78},"import com.azure.ai.contentsafety.models.*;\nimport com.azure.core.util.BinaryData;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\n\u002F\u002F From file\nbyte[] imageBytes = Files.readAllBytes(Paths.get(\"image.png\"));\nContentSafetyImageData imageData = new ContentSafetyImageData()\n    .setContent(BinaryData.fromBytes(imageBytes));\n\nAnalyzeImageResult result = contentSafetyClient.analyzeImage(\n    new AnalyzeImageOptions(imageData));\n\nfor (ImageCategoriesAnalysis category : result.getCategoriesAnalysis()) {\n    System.out.printf(\"Category: %s, Severity: %d%n\",\n        category.getCategory(),\n        category.getSeverity());\n}\n",[851],{"type":51,"tag":81,"props":852,"children":853},{"__ignoreMap":78},[854,861,869,877,885,892,900,908,916,924,931,939,947,954,962,969,976,983],{"type":51,"tag":85,"props":855,"children":856},{"class":87,"line":88},[857],{"type":51,"tag":85,"props":858,"children":859},{},[860],{"type":57,"value":581},{"type":51,"tag":85,"props":862,"children":863},{"class":87,"line":97},[864],{"type":51,"tag":85,"props":865,"children":866},{},[867],{"type":57,"value":868},"import com.azure.core.util.BinaryData;\n",{"type":51,"tag":85,"props":870,"children":871},{"class":87,"line":106},[872],{"type":51,"tag":85,"props":873,"children":874},{},[875],{"type":57,"value":876},"import java.nio.file.Files;\n",{"type":51,"tag":85,"props":878,"children":879},{"class":87,"line":115},[880],{"type":51,"tag":85,"props":881,"children":882},{},[883],{"type":57,"value":884},"import java.nio.file.Paths;\n",{"type":51,"tag":85,"props":886,"children":887},{"class":87,"line":124},[888],{"type":51,"tag":85,"props":889,"children":890},{"emptyLinePlaceholder":198},[891],{"type":57,"value":201},{"type":51,"tag":85,"props":893,"children":894},{"class":87,"line":194},[895],{"type":51,"tag":85,"props":896,"children":897},{},[898],{"type":57,"value":899},"\u002F\u002F From file\n",{"type":51,"tag":85,"props":901,"children":902},{"class":87,"line":204},[903],{"type":51,"tag":85,"props":904,"children":905},{},[906],{"type":57,"value":907},"byte[] imageBytes = Files.readAllBytes(Paths.get(\"image.png\"));\n",{"type":51,"tag":85,"props":909,"children":910},{"class":87,"line":213},[911],{"type":51,"tag":85,"props":912,"children":913},{},[914],{"type":57,"value":915},"ContentSafetyImageData imageData = new ContentSafetyImageData()\n",{"type":51,"tag":85,"props":917,"children":918},{"class":87,"line":222},[919],{"type":51,"tag":85,"props":920,"children":921},{},[922],{"type":57,"value":923},"    .setContent(BinaryData.fromBytes(imageBytes));\n",{"type":51,"tag":85,"props":925,"children":926},{"class":87,"line":230},[927],{"type":51,"tag":85,"props":928,"children":929},{"emptyLinePlaceholder":198},[930],{"type":57,"value":201},{"type":51,"tag":85,"props":932,"children":933},{"class":87,"line":239},[934],{"type":51,"tag":85,"props":935,"children":936},{},[937],{"type":57,"value":938},"AnalyzeImageResult result = contentSafetyClient.analyzeImage(\n",{"type":51,"tag":85,"props":940,"children":941},{"class":87,"line":248},[942],{"type":51,"tag":85,"props":943,"children":944},{},[945],{"type":57,"value":946},"    new AnalyzeImageOptions(imageData));\n",{"type":51,"tag":85,"props":948,"children":949},{"class":87,"line":257},[950],{"type":51,"tag":85,"props":951,"children":952},{"emptyLinePlaceholder":198},[953],{"type":57,"value":201},{"type":51,"tag":85,"props":955,"children":956},{"class":87,"line":266},[957],{"type":51,"tag":85,"props":958,"children":959},{},[960],{"type":57,"value":961},"for (ImageCategoriesAnalysis category : result.getCategoriesAnalysis()) {\n",{"type":51,"tag":85,"props":963,"children":964},{"class":87,"line":274},[965],{"type":51,"tag":85,"props":966,"children":967},{},[968],{"type":57,"value":627},{"type":51,"tag":85,"props":970,"children":971},{"class":87,"line":283},[972],{"type":51,"tag":85,"props":973,"children":974},{},[975],{"type":57,"value":635},{"type":51,"tag":85,"props":977,"children":978},{"class":87,"line":291},[979],{"type":51,"tag":85,"props":980,"children":981},{},[982],{"type":57,"value":643},{"type":51,"tag":85,"props":984,"children":985},{"class":87,"line":299},[986],{"type":51,"tag":85,"props":987,"children":988},{},[989],{"type":57,"value":651},{"type":51,"tag":138,"props":991,"children":993},{"id":992},"analyze-image-from-url",[994],{"type":57,"value":995},"Analyze Image from URL",{"type":51,"tag":73,"props":997,"children":999},{"className":146,"code":998,"language":21,"meta":78,"style":78},"ContentSafetyImageData imageData = new ContentSafetyImageData()\n    .setBlobUrl(\"https:\u002F\u002Fexample.com\u002Fimage.jpg\");\n\nAnalyzeImageResult result = contentSafetyClient.analyzeImage(\n    new AnalyzeImageOptions(imageData));\n",[1000],{"type":51,"tag":81,"props":1001,"children":1002},{"__ignoreMap":78},[1003,1010,1018,1025,1032],{"type":51,"tag":85,"props":1004,"children":1005},{"class":87,"line":88},[1006],{"type":51,"tag":85,"props":1007,"children":1008},{},[1009],{"type":57,"value":915},{"type":51,"tag":85,"props":1011,"children":1012},{"class":87,"line":97},[1013],{"type":51,"tag":85,"props":1014,"children":1015},{},[1016],{"type":57,"value":1017},"    .setBlobUrl(\"https:\u002F\u002Fexample.com\u002Fimage.jpg\");\n",{"type":51,"tag":85,"props":1019,"children":1020},{"class":87,"line":106},[1021],{"type":51,"tag":85,"props":1022,"children":1023},{"emptyLinePlaceholder":198},[1024],{"type":57,"value":201},{"type":51,"tag":85,"props":1026,"children":1027},{"class":87,"line":115},[1028],{"type":51,"tag":85,"props":1029,"children":1030},{},[1031],{"type":57,"value":938},{"type":51,"tag":85,"props":1033,"children":1034},{"class":87,"line":124},[1035],{"type":51,"tag":85,"props":1036,"children":1037},{},[1038],{"type":57,"value":946},{"type":51,"tag":66,"props":1040,"children":1042},{"id":1041},"blocklist-management",[1043],{"type":57,"value":1044},"Blocklist Management",{"type":51,"tag":138,"props":1046,"children":1048},{"id":1047},"create-or-update-blocklist",[1049],{"type":57,"value":1050},"Create or Update Blocklist",{"type":51,"tag":73,"props":1052,"children":1054},{"className":146,"code":1053,"language":21,"meta":78,"style":78},"import com.azure.core.http.rest.RequestOptions;\nimport com.azure.core.http.rest.Response;\nimport com.azure.core.util.BinaryData;\nimport java.util.Map;\n\nMap\u003CString, String> description = Map.of(\"description\", \"Custom blocklist\");\nBinaryData resource = BinaryData.fromObject(description);\n\nResponse\u003CBinaryData> response = blocklistClient.createOrUpdateTextBlocklistWithResponse(\n    \"my-blocklist\", resource, new RequestOptions());\n\nif (response.getStatusCode() == 201) {\n    System.out.println(\"Blocklist created\");\n} else if (response.getStatusCode() == 200) {\n    System.out.println(\"Blocklist updated\");\n}\n",[1055],{"type":51,"tag":81,"props":1056,"children":1057},{"__ignoreMap":78},[1058,1066,1074,1081,1089,1096,1104,1112,1119,1127,1135,1142,1150,1158,1166,1174],{"type":51,"tag":85,"props":1059,"children":1060},{"class":87,"line":88},[1061],{"type":51,"tag":85,"props":1062,"children":1063},{},[1064],{"type":57,"value":1065},"import com.azure.core.http.rest.RequestOptions;\n",{"type":51,"tag":85,"props":1067,"children":1068},{"class":87,"line":97},[1069],{"type":51,"tag":85,"props":1070,"children":1071},{},[1072],{"type":57,"value":1073},"import com.azure.core.http.rest.Response;\n",{"type":51,"tag":85,"props":1075,"children":1076},{"class":87,"line":106},[1077],{"type":51,"tag":85,"props":1078,"children":1079},{},[1080],{"type":57,"value":868},{"type":51,"tag":85,"props":1082,"children":1083},{"class":87,"line":115},[1084],{"type":51,"tag":85,"props":1085,"children":1086},{},[1087],{"type":57,"value":1088},"import java.util.Map;\n",{"type":51,"tag":85,"props":1090,"children":1091},{"class":87,"line":124},[1092],{"type":51,"tag":85,"props":1093,"children":1094},{"emptyLinePlaceholder":198},[1095],{"type":57,"value":201},{"type":51,"tag":85,"props":1097,"children":1098},{"class":87,"line":194},[1099],{"type":51,"tag":85,"props":1100,"children":1101},{},[1102],{"type":57,"value":1103},"Map\u003CString, String> description = Map.of(\"description\", \"Custom blocklist\");\n",{"type":51,"tag":85,"props":1105,"children":1106},{"class":87,"line":204},[1107],{"type":51,"tag":85,"props":1108,"children":1109},{},[1110],{"type":57,"value":1111},"BinaryData resource = BinaryData.fromObject(description);\n",{"type":51,"tag":85,"props":1113,"children":1114},{"class":87,"line":213},[1115],{"type":51,"tag":85,"props":1116,"children":1117},{"emptyLinePlaceholder":198},[1118],{"type":57,"value":201},{"type":51,"tag":85,"props":1120,"children":1121},{"class":87,"line":222},[1122],{"type":51,"tag":85,"props":1123,"children":1124},{},[1125],{"type":57,"value":1126},"Response\u003CBinaryData> response = blocklistClient.createOrUpdateTextBlocklistWithResponse(\n",{"type":51,"tag":85,"props":1128,"children":1129},{"class":87,"line":230},[1130],{"type":51,"tag":85,"props":1131,"children":1132},{},[1133],{"type":57,"value":1134},"    \"my-blocklist\", resource, new RequestOptions());\n",{"type":51,"tag":85,"props":1136,"children":1137},{"class":87,"line":239},[1138],{"type":51,"tag":85,"props":1139,"children":1140},{"emptyLinePlaceholder":198},[1141],{"type":57,"value":201},{"type":51,"tag":85,"props":1143,"children":1144},{"class":87,"line":248},[1145],{"type":51,"tag":85,"props":1146,"children":1147},{},[1148],{"type":57,"value":1149},"if (response.getStatusCode() == 201) {\n",{"type":51,"tag":85,"props":1151,"children":1152},{"class":87,"line":257},[1153],{"type":51,"tag":85,"props":1154,"children":1155},{},[1156],{"type":57,"value":1157},"    System.out.println(\"Blocklist created\");\n",{"type":51,"tag":85,"props":1159,"children":1160},{"class":87,"line":266},[1161],{"type":51,"tag":85,"props":1162,"children":1163},{},[1164],{"type":57,"value":1165},"} else if (response.getStatusCode() == 200) {\n",{"type":51,"tag":85,"props":1167,"children":1168},{"class":87,"line":274},[1169],{"type":51,"tag":85,"props":1170,"children":1171},{},[1172],{"type":57,"value":1173},"    System.out.println(\"Blocklist updated\");\n",{"type":51,"tag":85,"props":1175,"children":1176},{"class":87,"line":283},[1177],{"type":51,"tag":85,"props":1178,"children":1179},{},[1180],{"type":57,"value":651},{"type":51,"tag":138,"props":1182,"children":1184},{"id":1183},"add-block-items",[1185],{"type":57,"value":1186},"Add Block Items",{"type":51,"tag":73,"props":1188,"children":1190},{"className":146,"code":1189,"language":21,"meta":78,"style":78},"import com.azure.ai.contentsafety.models.*;\nimport java.util.Arrays;\n\nList\u003CTextBlocklistItem> items = Arrays.asList(\n    new TextBlocklistItem(\"badword1\").setDescription(\"Offensive term\"),\n    new TextBlocklistItem(\"badword2\").setDescription(\"Another term\")\n);\n\nAddOrUpdateTextBlocklistItemsResult result = blocklistClient.addOrUpdateBlocklistItems(\n    \"my-blocklist\",\n    new AddOrUpdateTextBlocklistItemsOptions(items));\n\nfor (TextBlocklistItem item : result.getBlocklistItems()) {\n    System.out.printf(\"Added: %s (ID: %s)%n\",\n        item.getText(),\n        item.getBlocklistItemId());\n}\n",[1191],{"type":51,"tag":81,"props":1192,"children":1193},{"__ignoreMap":78},[1194,1201,1209,1216,1224,1232,1240,1248,1255,1263,1271,1279,1286,1294,1302,1310,1318],{"type":51,"tag":85,"props":1195,"children":1196},{"class":87,"line":88},[1197],{"type":51,"tag":85,"props":1198,"children":1199},{},[1200],{"type":57,"value":581},{"type":51,"tag":85,"props":1202,"children":1203},{"class":87,"line":97},[1204],{"type":51,"tag":85,"props":1205,"children":1206},{},[1207],{"type":57,"value":1208},"import java.util.Arrays;\n",{"type":51,"tag":85,"props":1210,"children":1211},{"class":87,"line":106},[1212],{"type":51,"tag":85,"props":1213,"children":1214},{"emptyLinePlaceholder":198},[1215],{"type":57,"value":201},{"type":51,"tag":85,"props":1217,"children":1218},{"class":87,"line":115},[1219],{"type":51,"tag":85,"props":1220,"children":1221},{},[1222],{"type":57,"value":1223},"List\u003CTextBlocklistItem> items = Arrays.asList(\n",{"type":51,"tag":85,"props":1225,"children":1226},{"class":87,"line":124},[1227],{"type":51,"tag":85,"props":1228,"children":1229},{},[1230],{"type":57,"value":1231},"    new TextBlocklistItem(\"badword1\").setDescription(\"Offensive term\"),\n",{"type":51,"tag":85,"props":1233,"children":1234},{"class":87,"line":194},[1235],{"type":51,"tag":85,"props":1236,"children":1237},{},[1238],{"type":57,"value":1239},"    new TextBlocklistItem(\"badword2\").setDescription(\"Another term\")\n",{"type":51,"tag":85,"props":1241,"children":1242},{"class":87,"line":204},[1243],{"type":51,"tag":85,"props":1244,"children":1245},{},[1246],{"type":57,"value":1247},");\n",{"type":51,"tag":85,"props":1249,"children":1250},{"class":87,"line":213},[1251],{"type":51,"tag":85,"props":1252,"children":1253},{"emptyLinePlaceholder":198},[1254],{"type":57,"value":201},{"type":51,"tag":85,"props":1256,"children":1257},{"class":87,"line":222},[1258],{"type":51,"tag":85,"props":1259,"children":1260},{},[1261],{"type":57,"value":1262},"AddOrUpdateTextBlocklistItemsResult result = blocklistClient.addOrUpdateBlocklistItems(\n",{"type":51,"tag":85,"props":1264,"children":1265},{"class":87,"line":230},[1266],{"type":51,"tag":85,"props":1267,"children":1268},{},[1269],{"type":57,"value":1270},"    \"my-blocklist\",\n",{"type":51,"tag":85,"props":1272,"children":1273},{"class":87,"line":239},[1274],{"type":51,"tag":85,"props":1275,"children":1276},{},[1277],{"type":57,"value":1278},"    new AddOrUpdateTextBlocklistItemsOptions(items));\n",{"type":51,"tag":85,"props":1280,"children":1281},{"class":87,"line":248},[1282],{"type":51,"tag":85,"props":1283,"children":1284},{"emptyLinePlaceholder":198},[1285],{"type":57,"value":201},{"type":51,"tag":85,"props":1287,"children":1288},{"class":87,"line":257},[1289],{"type":51,"tag":85,"props":1290,"children":1291},{},[1292],{"type":57,"value":1293},"for (TextBlocklistItem item : result.getBlocklistItems()) {\n",{"type":51,"tag":85,"props":1295,"children":1296},{"class":87,"line":266},[1297],{"type":51,"tag":85,"props":1298,"children":1299},{},[1300],{"type":57,"value":1301},"    System.out.printf(\"Added: %s (ID: %s)%n\",\n",{"type":51,"tag":85,"props":1303,"children":1304},{"class":87,"line":274},[1305],{"type":51,"tag":85,"props":1306,"children":1307},{},[1308],{"type":57,"value":1309},"        item.getText(),\n",{"type":51,"tag":85,"props":1311,"children":1312},{"class":87,"line":283},[1313],{"type":51,"tag":85,"props":1314,"children":1315},{},[1316],{"type":57,"value":1317},"        item.getBlocklistItemId());\n",{"type":51,"tag":85,"props":1319,"children":1320},{"class":87,"line":291},[1321],{"type":51,"tag":85,"props":1322,"children":1323},{},[1324],{"type":57,"value":651},{"type":51,"tag":138,"props":1326,"children":1328},{"id":1327},"list-blocklists",[1329],{"type":57,"value":1330},"List Blocklists",{"type":51,"tag":73,"props":1332,"children":1334},{"className":146,"code":1333,"language":21,"meta":78,"style":78},"PagedIterable\u003CTextBlocklist> blocklists = blocklistClient.listTextBlocklists();\n\nfor (TextBlocklist blocklist : blocklists) {\n    System.out.printf(\"Blocklist: %s, Description: %s%n\",\n        blocklist.getName(),\n        blocklist.getDescription());\n}\n",[1335],{"type":51,"tag":81,"props":1336,"children":1337},{"__ignoreMap":78},[1338,1346,1353,1361,1369,1377,1385],{"type":51,"tag":85,"props":1339,"children":1340},{"class":87,"line":88},[1341],{"type":51,"tag":85,"props":1342,"children":1343},{},[1344],{"type":57,"value":1345},"PagedIterable\u003CTextBlocklist> blocklists = blocklistClient.listTextBlocklists();\n",{"type":51,"tag":85,"props":1347,"children":1348},{"class":87,"line":97},[1349],{"type":51,"tag":85,"props":1350,"children":1351},{"emptyLinePlaceholder":198},[1352],{"type":57,"value":201},{"type":51,"tag":85,"props":1354,"children":1355},{"class":87,"line":106},[1356],{"type":51,"tag":85,"props":1357,"children":1358},{},[1359],{"type":57,"value":1360},"for (TextBlocklist blocklist : blocklists) {\n",{"type":51,"tag":85,"props":1362,"children":1363},{"class":87,"line":115},[1364],{"type":51,"tag":85,"props":1365,"children":1366},{},[1367],{"type":57,"value":1368},"    System.out.printf(\"Blocklist: %s, Description: %s%n\",\n",{"type":51,"tag":85,"props":1370,"children":1371},{"class":87,"line":124},[1372],{"type":51,"tag":85,"props":1373,"children":1374},{},[1375],{"type":57,"value":1376},"        blocklist.getName(),\n",{"type":51,"tag":85,"props":1378,"children":1379},{"class":87,"line":194},[1380],{"type":51,"tag":85,"props":1381,"children":1382},{},[1383],{"type":57,"value":1384},"        blocklist.getDescription());\n",{"type":51,"tag":85,"props":1386,"children":1387},{"class":87,"line":204},[1388],{"type":51,"tag":85,"props":1389,"children":1390},{},[1391],{"type":57,"value":651},{"type":51,"tag":138,"props":1393,"children":1395},{"id":1394},"get-blocklist",[1396],{"type":57,"value":1397},"Get Blocklist",{"type":51,"tag":73,"props":1399,"children":1401},{"className":146,"code":1400,"language":21,"meta":78,"style":78},"TextBlocklist blocklist = blocklistClient.getTextBlocklist(\"my-blocklist\");\nSystem.out.println(\"Name: \" + blocklist.getName());\n",[1402],{"type":51,"tag":81,"props":1403,"children":1404},{"__ignoreMap":78},[1405,1413],{"type":51,"tag":85,"props":1406,"children":1407},{"class":87,"line":88},[1408],{"type":51,"tag":85,"props":1409,"children":1410},{},[1411],{"type":57,"value":1412},"TextBlocklist blocklist = blocklistClient.getTextBlocklist(\"my-blocklist\");\n",{"type":51,"tag":85,"props":1414,"children":1415},{"class":87,"line":97},[1416],{"type":51,"tag":85,"props":1417,"children":1418},{},[1419],{"type":57,"value":1420},"System.out.println(\"Name: \" + blocklist.getName());\n",{"type":51,"tag":138,"props":1422,"children":1424},{"id":1423},"list-block-items",[1425],{"type":57,"value":1426},"List Block Items",{"type":51,"tag":73,"props":1428,"children":1430},{"className":146,"code":1429,"language":21,"meta":78,"style":78},"PagedIterable\u003CTextBlocklistItem> items = \n    blocklistClient.listTextBlocklistItems(\"my-blocklist\");\n\nfor (TextBlocklistItem item : items) {\n    System.out.printf(\"ID: %s, Text: %s%n\",\n        item.getBlocklistItemId(),\n        item.getText());\n}\n",[1431],{"type":51,"tag":81,"props":1432,"children":1433},{"__ignoreMap":78},[1434,1442,1450,1457,1465,1473,1481,1489],{"type":51,"tag":85,"props":1435,"children":1436},{"class":87,"line":88},[1437],{"type":51,"tag":85,"props":1438,"children":1439},{},[1440],{"type":57,"value":1441},"PagedIterable\u003CTextBlocklistItem> items = \n",{"type":51,"tag":85,"props":1443,"children":1444},{"class":87,"line":97},[1445],{"type":51,"tag":85,"props":1446,"children":1447},{},[1448],{"type":57,"value":1449},"    blocklistClient.listTextBlocklistItems(\"my-blocklist\");\n",{"type":51,"tag":85,"props":1451,"children":1452},{"class":87,"line":106},[1453],{"type":51,"tag":85,"props":1454,"children":1455},{"emptyLinePlaceholder":198},[1456],{"type":57,"value":201},{"type":51,"tag":85,"props":1458,"children":1459},{"class":87,"line":115},[1460],{"type":51,"tag":85,"props":1461,"children":1462},{},[1463],{"type":57,"value":1464},"for (TextBlocklistItem item : items) {\n",{"type":51,"tag":85,"props":1466,"children":1467},{"class":87,"line":124},[1468],{"type":51,"tag":85,"props":1469,"children":1470},{},[1471],{"type":57,"value":1472},"    System.out.printf(\"ID: %s, Text: %s%n\",\n",{"type":51,"tag":85,"props":1474,"children":1475},{"class":87,"line":194},[1476],{"type":51,"tag":85,"props":1477,"children":1478},{},[1479],{"type":57,"value":1480},"        item.getBlocklistItemId(),\n",{"type":51,"tag":85,"props":1482,"children":1483},{"class":87,"line":204},[1484],{"type":51,"tag":85,"props":1485,"children":1486},{},[1487],{"type":57,"value":1488},"        item.getText());\n",{"type":51,"tag":85,"props":1490,"children":1491},{"class":87,"line":213},[1492],{"type":51,"tag":85,"props":1493,"children":1494},{},[1495],{"type":57,"value":651},{"type":51,"tag":138,"props":1497,"children":1499},{"id":1498},"remove-block-items",[1500],{"type":57,"value":1501},"Remove Block Items",{"type":51,"tag":73,"props":1503,"children":1505},{"className":146,"code":1504,"language":21,"meta":78,"style":78},"List\u003CString> itemIds = Arrays.asList(\"item-id-1\", \"item-id-2\");\n\nblocklistClient.removeBlocklistItems(\n    \"my-blocklist\",\n    new RemoveTextBlocklistItemsOptions(itemIds));\n",[1506],{"type":51,"tag":81,"props":1507,"children":1508},{"__ignoreMap":78},[1509,1517,1524,1532,1539],{"type":51,"tag":85,"props":1510,"children":1511},{"class":87,"line":88},[1512],{"type":51,"tag":85,"props":1513,"children":1514},{},[1515],{"type":57,"value":1516},"List\u003CString> itemIds = Arrays.asList(\"item-id-1\", \"item-id-2\");\n",{"type":51,"tag":85,"props":1518,"children":1519},{"class":87,"line":97},[1520],{"type":51,"tag":85,"props":1521,"children":1522},{"emptyLinePlaceholder":198},[1523],{"type":57,"value":201},{"type":51,"tag":85,"props":1525,"children":1526},{"class":87,"line":106},[1527],{"type":51,"tag":85,"props":1528,"children":1529},{},[1530],{"type":57,"value":1531},"blocklistClient.removeBlocklistItems(\n",{"type":51,"tag":85,"props":1533,"children":1534},{"class":87,"line":115},[1535],{"type":51,"tag":85,"props":1536,"children":1537},{},[1538],{"type":57,"value":1270},{"type":51,"tag":85,"props":1540,"children":1541},{"class":87,"line":124},[1542],{"type":51,"tag":85,"props":1543,"children":1544},{},[1545],{"type":57,"value":1546},"    new RemoveTextBlocklistItemsOptions(itemIds));\n",{"type":51,"tag":138,"props":1548,"children":1550},{"id":1549},"delete-blocklist",[1551],{"type":57,"value":1552},"Delete Blocklist",{"type":51,"tag":73,"props":1554,"children":1556},{"className":146,"code":1555,"language":21,"meta":78,"style":78},"blocklistClient.deleteTextBlocklist(\"my-blocklist\");\n",[1557],{"type":51,"tag":81,"props":1558,"children":1559},{"__ignoreMap":78},[1560],{"type":51,"tag":85,"props":1561,"children":1562},{"class":87,"line":88},[1563],{"type":51,"tag":85,"props":1564,"children":1565},{},[1566],{"type":57,"value":1555},{"type":51,"tag":66,"props":1568,"children":1570},{"id":1569},"error-handling",[1571],{"type":57,"value":1572},"Error Handling",{"type":51,"tag":73,"props":1574,"children":1576},{"className":146,"code":1575,"language":21,"meta":78,"style":78},"import com.azure.core.exception.HttpResponseException;\n\ntry {\n    contentSafetyClient.analyzeText(new AnalyzeTextOptions(\"test\"));\n} catch (HttpResponseException e) {\n    System.out.println(\"Status: \" + e.getResponse().getStatusCode());\n    System.out.println(\"Error: \" + e.getMessage());\n    \u002F\u002F Common codes: InvalidRequestBody, ResourceNotFound, TooManyRequests\n}\n",[1577],{"type":51,"tag":81,"props":1578,"children":1579},{"__ignoreMap":78},[1580,1588,1595,1603,1611,1619,1627,1635,1643],{"type":51,"tag":85,"props":1581,"children":1582},{"class":87,"line":88},[1583],{"type":51,"tag":85,"props":1584,"children":1585},{},[1586],{"type":57,"value":1587},"import com.azure.core.exception.HttpResponseException;\n",{"type":51,"tag":85,"props":1589,"children":1590},{"class":87,"line":97},[1591],{"type":51,"tag":85,"props":1592,"children":1593},{"emptyLinePlaceholder":198},[1594],{"type":57,"value":201},{"type":51,"tag":85,"props":1596,"children":1597},{"class":87,"line":106},[1598],{"type":51,"tag":85,"props":1599,"children":1600},{},[1601],{"type":57,"value":1602},"try {\n",{"type":51,"tag":85,"props":1604,"children":1605},{"class":87,"line":115},[1606],{"type":51,"tag":85,"props":1607,"children":1608},{},[1609],{"type":57,"value":1610},"    contentSafetyClient.analyzeText(new AnalyzeTextOptions(\"test\"));\n",{"type":51,"tag":85,"props":1612,"children":1613},{"class":87,"line":124},[1614],{"type":51,"tag":85,"props":1615,"children":1616},{},[1617],{"type":57,"value":1618},"} catch (HttpResponseException e) {\n",{"type":51,"tag":85,"props":1620,"children":1621},{"class":87,"line":194},[1622],{"type":51,"tag":85,"props":1623,"children":1624},{},[1625],{"type":57,"value":1626},"    System.out.println(\"Status: \" + e.getResponse().getStatusCode());\n",{"type":51,"tag":85,"props":1628,"children":1629},{"class":87,"line":204},[1630],{"type":51,"tag":85,"props":1631,"children":1632},{},[1633],{"type":57,"value":1634},"    System.out.println(\"Error: \" + e.getMessage());\n",{"type":51,"tag":85,"props":1636,"children":1637},{"class":87,"line":213},[1638],{"type":51,"tag":85,"props":1639,"children":1640},{},[1641],{"type":57,"value":1642},"    \u002F\u002F Common codes: InvalidRequestBody, ResourceNotFound, TooManyRequests\n",{"type":51,"tag":85,"props":1644,"children":1645},{"class":87,"line":222},[1646],{"type":51,"tag":85,"props":1647,"children":1648},{},[1649],{"type":57,"value":651},{"type":51,"tag":66,"props":1651,"children":1653},{"id":1652},"environment-variables",[1654],{"type":57,"value":1655},"Environment Variables",{"type":51,"tag":73,"props":1657,"children":1661},{"className":1658,"code":1659,"language":1660,"meta":78,"style":78},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","CONTENT_SAFETY_ENDPOINT=https:\u002F\u002F\u003Cresource>.cognitiveservices.azure.com\u002F # Required for all auth methods\nCONTENT_SAFETY_KEY=\u003Cyour-api-key> # Only required for AzureKeyCredential auth\nAZURE_TOKEN_CREDENTIALS=prod  # Required only if DefaultAzureCredential is used in production\n","bash",[1662],{"type":51,"tag":81,"props":1663,"children":1664},{"__ignoreMap":78},[1665,1712,1739],{"type":51,"tag":85,"props":1666,"children":1667},{"class":87,"line":88},[1668,1674,1680,1686,1691,1696,1701,1706],{"type":51,"tag":85,"props":1669,"children":1671},{"style":1670},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[1672],{"type":57,"value":1673},"CONTENT_SAFETY_ENDPOINT",{"type":51,"tag":85,"props":1675,"children":1677},{"style":1676},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[1678],{"type":57,"value":1679},"=",{"type":51,"tag":85,"props":1681,"children":1683},{"style":1682},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[1684],{"type":57,"value":1685},"https:\u002F\u002F",{"type":51,"tag":85,"props":1687,"children":1688},{"style":1676},[1689],{"type":57,"value":1690},"\u003C",{"type":51,"tag":85,"props":1692,"children":1693},{"style":1682},[1694],{"type":57,"value":1695},"resource",{"type":51,"tag":85,"props":1697,"children":1698},{"style":1676},[1699],{"type":57,"value":1700},">",{"type":51,"tag":85,"props":1702,"children":1703},{"style":1682},[1704],{"type":57,"value":1705},".cognitiveservices.azure.com\u002F",{"type":51,"tag":85,"props":1707,"children":1709},{"style":1708},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[1710],{"type":57,"value":1711}," # Required for all auth methods\n",{"type":51,"tag":85,"props":1713,"children":1714},{"class":87,"line":97},[1715,1720,1725,1730,1734],{"type":51,"tag":85,"props":1716,"children":1717},{"style":1670},[1718],{"type":57,"value":1719},"CONTENT_SAFETY_KEY",{"type":51,"tag":85,"props":1721,"children":1722},{"style":1676},[1723],{"type":57,"value":1724},"=\u003C",{"type":51,"tag":85,"props":1726,"children":1727},{"style":1682},[1728],{"type":57,"value":1729},"your-api-key",{"type":51,"tag":85,"props":1731,"children":1732},{"style":1676},[1733],{"type":57,"value":1700},{"type":51,"tag":85,"props":1735,"children":1736},{"style":1708},[1737],{"type":57,"value":1738}," # Only required for AzureKeyCredential auth\n",{"type":51,"tag":85,"props":1740,"children":1741},{"class":87,"line":106},[1742,1747,1751,1756],{"type":51,"tag":85,"props":1743,"children":1744},{"style":1670},[1745],{"type":57,"value":1746},"AZURE_TOKEN_CREDENTIALS",{"type":51,"tag":85,"props":1748,"children":1749},{"style":1676},[1750],{"type":57,"value":1679},{"type":51,"tag":85,"props":1752,"children":1753},{"style":1682},[1754],{"type":57,"value":1755},"prod",{"type":51,"tag":85,"props":1757,"children":1758},{"style":1708},[1759],{"type":57,"value":1760},"  # Required only if DefaultAzureCredential is used in production\n",{"type":51,"tag":66,"props":1762,"children":1764},{"id":1763},"best-practices",[1765],{"type":57,"value":1766},"Best Practices",{"type":51,"tag":1768,"props":1769,"children":1770},"ol",{},[1771,1782,1792,1802,1812],{"type":51,"tag":545,"props":1772,"children":1773},{},[1774,1780],{"type":51,"tag":1775,"props":1776,"children":1777},"strong",{},[1778],{"type":57,"value":1779},"Blocklist Delay",{"type":57,"value":1781},": Changes take ~5 minutes to take effect",{"type":51,"tag":545,"props":1783,"children":1784},{},[1785,1790],{"type":51,"tag":1775,"props":1786,"children":1787},{},[1788],{"type":57,"value":1789},"Category Selection",{"type":57,"value":1791},": Only request needed categories to reduce latency",{"type":51,"tag":545,"props":1793,"children":1794},{},[1795,1800],{"type":51,"tag":1775,"props":1796,"children":1797},{},[1798],{"type":57,"value":1799},"Severity Thresholds",{"type":57,"value":1801},": Typically block severity >= 4 for strict moderation",{"type":51,"tag":545,"props":1803,"children":1804},{},[1805,1810],{"type":51,"tag":1775,"props":1806,"children":1807},{},[1808],{"type":57,"value":1809},"Batch Processing",{"type":57,"value":1811},": Process multiple items in parallel for throughput",{"type":51,"tag":545,"props":1813,"children":1814},{},[1815,1820],{"type":51,"tag":1775,"props":1816,"children":1817},{},[1818],{"type":57,"value":1819},"Caching",{"type":57,"value":1821},": Cache blocklist results where appropriate",{"type":51,"tag":66,"props":1823,"children":1825},{"id":1824},"trigger-phrases",[1826],{"type":57,"value":1827},"Trigger Phrases",{"type":51,"tag":541,"props":1829,"children":1830},{},[1831,1836,1841,1846,1851,1856,1861],{"type":51,"tag":545,"props":1832,"children":1833},{},[1834],{"type":57,"value":1835},"\"content safety Java\"",{"type":51,"tag":545,"props":1837,"children":1838},{},[1839],{"type":57,"value":1840},"\"content moderation Azure\"",{"type":51,"tag":545,"props":1842,"children":1843},{},[1844],{"type":57,"value":1845},"\"analyze text safety\"",{"type":51,"tag":545,"props":1847,"children":1848},{},[1849],{"type":57,"value":1850},"\"image moderation Java\"",{"type":51,"tag":545,"props":1852,"children":1853},{},[1854],{"type":57,"value":1855},"\"blocklist management\"",{"type":51,"tag":545,"props":1857,"children":1858},{},[1859],{"type":57,"value":1860},"\"hate speech detection\"",{"type":51,"tag":545,"props":1862,"children":1863},{},[1864],{"type":57,"value":1865},"\"harmful content filter\"",{"type":51,"tag":1867,"props":1868,"children":1869},"style",{},[1870],{"type":57,"value":1871},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":1873,"total":1972},[1874,1890,1909,1916,1933,1944,1957],{"slug":1875,"name":1875,"fn":1876,"description":1877,"org":1878,"tags":1879,"stars":25,"repoUrl":26,"updatedAt":1889},"azure-ai-agents-persistent-dotnet","build AI agents with Azure .NET SDK","Azure AI Agents Persistent SDK for .NET. Low-level SDK for creating and managing AI agents with threads, messages, runs, and tools. Use for agent CRUD, conversation threads, streaming responses, function calling, file search, and code interpreter. Triggers: \"PersistentAgentsClient\", \"persistent agents\", \"agent threads\", \"agent runs\", \"streaming agents\", \"function calling agents .NET\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1880,1883,1885,1886],{"name":1881,"slug":1882,"type":15},".NET","net",{"name":1884,"slug":32,"type":15},"Agents",{"name":17,"slug":18,"type":15},{"name":1887,"slug":1888,"type":15},"LLM","llm","2026-07-03T16:32:10.297433",{"slug":1891,"name":1891,"fn":1892,"description":1893,"org":1894,"tags":1895,"stars":25,"repoUrl":26,"updatedAt":1908},"azure-ai-anomalydetector-java","build anomaly detection applications with Java","Build anomaly detection applications with Azure AI Anomaly Detector SDK for Java. Use when implementing univariate\u002Fmultivariate anomaly detection, time-series analysis, or AI-powered monitoring.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1896,1899,1900,1903,1904,1905],{"name":1897,"slug":1898,"type":15},"Analytics","analytics",{"name":17,"slug":18,"type":15},{"name":1901,"slug":1902,"type":15},"Data Analysis","data-analysis",{"name":20,"slug":21,"type":15},{"name":9,"slug":8,"type":15},{"name":1906,"slug":1907,"type":15},"Monitoring","monitoring","2026-05-13T06:14:16.261754",{"slug":4,"name":4,"fn":5,"description":6,"org":1910,"tags":1911,"stars":25,"repoUrl":26,"updatedAt":27},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1912,1913,1914,1915],{"name":23,"slug":24,"type":15},{"name":17,"slug":18,"type":15},{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},{"slug":1917,"name":1917,"fn":1918,"description":1919,"org":1920,"tags":1921,"stars":25,"repoUrl":26,"updatedAt":1932},"azure-ai-contentsafety-py","detect harmful content with Azure AI Content Safety","Azure AI Content Safety SDK for Python. Use for detecting harmful content in text and images with multi-severity classification.\nTriggers: \"azure-ai-contentsafety\", \"ContentSafetyClient\", \"content moderation\", \"harmful content\", \"text analysis\", \"image analysis\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1922,1923,1926,1927,1928,1931],{"name":17,"slug":18,"type":15},{"name":1924,"slug":1925,"type":15},"Compliance","compliance",{"name":1887,"slug":1888,"type":15},{"name":9,"slug":8,"type":15},{"name":1929,"slug":1930,"type":15},"Python","python",{"name":13,"slug":14,"type":15},"2026-07-18T05:14:23.017504",{"slug":1934,"name":1934,"fn":1935,"description":1936,"org":1937,"tags":1938,"stars":25,"repoUrl":26,"updatedAt":1943},"azure-ai-language-conversations-py","implement conversational language understanding with Python","Implement Conversational Language Understanding (CLU) using the azure-ai-language-conversations Python SDK. Use when working with ConversationAnalysisClient to analyze conversation intent and entities, building NLP features, or integrating language understanding into applications.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1939,1940,1941,1942],{"name":1897,"slug":1898,"type":15},{"name":17,"slug":18,"type":15},{"name":1887,"slug":1888,"type":15},{"name":1929,"slug":1930,"type":15},"2026-07-31T05:54:29.068751",{"slug":1945,"name":1945,"fn":1946,"description":1947,"org":1948,"tags":1949,"stars":25,"repoUrl":26,"updatedAt":1956},"azure-ai-translation-text-py","translate text using Azure AI services","Azure AI Text Translation SDK for real-time text translation, transliteration, language detection, and dictionary lookup. Use for translating text content in applications.\nTriggers: \"text translation\", \"translator\", \"translate text\", \"transliterate\", \"TextTranslationClient\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1950,1953,1954,1955],{"name":1951,"slug":1952,"type":15},"API Development","api-development",{"name":17,"slug":18,"type":15},{"name":9,"slug":8,"type":15},{"name":1929,"slug":1930,"type":15},"2026-07-18T05:14:16.988376",{"slug":1958,"name":1958,"fn":1959,"description":1960,"org":1961,"tags":1962,"stars":25,"repoUrl":26,"updatedAt":1971},"azure-ai-vision-imageanalysis-py","analyze images with Azure AI Vision","Azure AI Vision Image Analysis SDK for captions, tags, objects, OCR, people detection, and smart cropping. Use for computer vision and image understanding tasks.\nTriggers: \"image analysis\", \"computer vision\", \"OCR\", \"object detection\", \"ImageAnalysisClient\", \"image caption\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1963,1964,1967,1970],{"name":17,"slug":18,"type":15},{"name":1965,"slug":1966,"type":15},"Computer Vision","computer-vision",{"name":1968,"slug":1969,"type":15},"Images","images",{"name":1929,"slug":1930,"type":15},"2026-07-18T05:14:18.007737",38,{"items":1974,"total":2109},[1975,1997,2004,2013,2020,2029,2036,2043,2050,2065,2084,2097],{"slug":1976,"name":1976,"fn":1977,"description":1978,"org":1979,"tags":1980,"stars":1994,"repoUrl":1995,"updatedAt":1996},"rushstack-best-practices","manage Rush monorepos with best practices","Provides best practices and guidance for working with Rush monorepos. Use when the user is working in a Rush-based repository, asks about Rush commands (install, update, build, rebuild), needs help with project selection, dependency management, build caching, subspace configuration, or troubleshooting Rush-specific issues.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1981,1984,1987,1988,1991],{"name":1982,"slug":1983,"type":15},"Engineering","engineering",{"name":1985,"slug":1986,"type":15},"Local Development","local-development",{"name":9,"slug":8,"type":15},{"name":1989,"slug":1990,"type":15},"Project Management","project-management",{"name":1992,"slug":1993,"type":15},"Rush","rush",6484,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Frushstack","2026-04-06T18:34:44.965032",{"slug":1875,"name":1875,"fn":1876,"description":1877,"org":1998,"tags":1999,"stars":25,"repoUrl":26,"updatedAt":1889},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2000,2001,2002,2003],{"name":1881,"slug":1882,"type":15},{"name":1884,"slug":32,"type":15},{"name":17,"slug":18,"type":15},{"name":1887,"slug":1888,"type":15},{"slug":1891,"name":1891,"fn":1892,"description":1893,"org":2005,"tags":2006,"stars":25,"repoUrl":26,"updatedAt":1908},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2007,2008,2009,2010,2011,2012],{"name":1897,"slug":1898,"type":15},{"name":17,"slug":18,"type":15},{"name":1901,"slug":1902,"type":15},{"name":20,"slug":21,"type":15},{"name":9,"slug":8,"type":15},{"name":1906,"slug":1907,"type":15},{"slug":4,"name":4,"fn":5,"description":6,"org":2014,"tags":2015,"stars":25,"repoUrl":26,"updatedAt":27},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2016,2017,2018,2019],{"name":23,"slug":24,"type":15},{"name":17,"slug":18,"type":15},{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},{"slug":1917,"name":1917,"fn":1918,"description":1919,"org":2021,"tags":2022,"stars":25,"repoUrl":26,"updatedAt":1932},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2023,2024,2025,2026,2027,2028],{"name":17,"slug":18,"type":15},{"name":1924,"slug":1925,"type":15},{"name":1887,"slug":1888,"type":15},{"name":9,"slug":8,"type":15},{"name":1929,"slug":1930,"type":15},{"name":13,"slug":14,"type":15},{"slug":1934,"name":1934,"fn":1935,"description":1936,"org":2030,"tags":2031,"stars":25,"repoUrl":26,"updatedAt":1943},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2032,2033,2034,2035],{"name":1897,"slug":1898,"type":15},{"name":17,"slug":18,"type":15},{"name":1887,"slug":1888,"type":15},{"name":1929,"slug":1930,"type":15},{"slug":1945,"name":1945,"fn":1946,"description":1947,"org":2037,"tags":2038,"stars":25,"repoUrl":26,"updatedAt":1956},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2039,2040,2041,2042],{"name":1951,"slug":1952,"type":15},{"name":17,"slug":18,"type":15},{"name":9,"slug":8,"type":15},{"name":1929,"slug":1930,"type":15},{"slug":1958,"name":1958,"fn":1959,"description":1960,"org":2044,"tags":2045,"stars":25,"repoUrl":26,"updatedAt":1971},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2046,2047,2048,2049],{"name":17,"slug":18,"type":15},{"name":1965,"slug":1966,"type":15},{"name":1968,"slug":1969,"type":15},{"name":1929,"slug":1930,"type":15},{"slug":2051,"name":2051,"fn":2052,"description":2053,"org":2054,"tags":2055,"stars":25,"repoUrl":26,"updatedAt":2064},"azure-appconfiguration-java","manage configuration with Azure App Configuration","Azure App Configuration SDK for Java. Centralized application configuration management with key-value settings, feature flags, and snapshots.\nTriggers: \"ConfigurationClient java\", \"app configuration java\", \"feature flag java\", \"configuration setting java\", \"azure config java\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2056,2057,2060,2063],{"name":17,"slug":18,"type":15},{"name":2058,"slug":2059,"type":15},"Configuration","configuration",{"name":2061,"slug":2062,"type":15},"Feature Flags","feature-flags",{"name":20,"slug":21,"type":15},"2026-07-03T16:32:01.278468",{"slug":2066,"name":2066,"fn":2067,"description":2068,"org":2069,"tags":2070,"stars":25,"repoUrl":26,"updatedAt":2083},"azure-cosmos-rust","build applications with Azure Cosmos DB","Azure Cosmos DB library for Rust (NoSQL API). Document CRUD, containers, and globally distributed data.\nTriggers: \"cosmos db rust\", \"CosmosClient rust\", \"document crud rust\", \"NoSQL rust\", \"partition key rust\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2071,2074,2077,2080],{"name":2072,"slug":2073,"type":15},"Cosmos DB","cosmos-db",{"name":2075,"slug":2076,"type":15},"Database","database",{"name":2078,"slug":2079,"type":15},"NoSQL","nosql",{"name":2081,"slug":2082,"type":15},"Rust","rust","2026-07-31T05:54:27.021432",{"slug":2085,"name":2085,"fn":2067,"description":2086,"org":2087,"tags":2088,"stars":25,"repoUrl":26,"updatedAt":2096},"azure-cosmos-ts","Azure Cosmos DB JavaScript\u002FTypeScript SDK (@azure\u002Fcosmos) for data plane operations. Use for CRUD operations on documents, queries, bulk operations, and container management. Triggers: \"Cosmos DB\", \"@azure\u002Fcosmos\", \"CosmosClient\", \"document CRUD\", \"NoSQL queries\", \"bulk operations\", \"partition key\", \"container.items\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2089,2090,2091,2092,2093],{"name":2072,"slug":2073,"type":15},{"name":2075,"slug":2076,"type":15},{"name":9,"slug":8,"type":15},{"name":2078,"slug":2079,"type":15},{"name":2094,"slug":2095,"type":15},"TypeScript","typescript","2026-07-03T16:31:19.368382",{"slug":2098,"name":2098,"fn":2099,"description":2100,"org":2101,"tags":2102,"stars":25,"repoUrl":26,"updatedAt":2108},"azure-data-tables-java","build table storage applications with Java","Build table storage applications with Azure Tables SDK for Java. Use when working with Azure Table Storage or Cosmos DB Table API for NoSQL key-value data, schemaless storage, or structured data at scale.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2103,2104,2105,2106,2107],{"name":17,"slug":18,"type":15},{"name":2072,"slug":2073,"type":15},{"name":2075,"slug":2076,"type":15},{"name":20,"slug":21,"type":15},{"name":2078,"slug":2079,"type":15},"2026-05-13T06:14:17.582229",267]