[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-microsoft-azure-ai-contentsafety-py":3,"mdc-103hwm-key":46,"related-repo-microsoft-azure-ai-contentsafety-py":1909,"related-org-microsoft-azure-ai-contentsafety-py":2008},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":29,"repoUrl":30,"updatedAt":31,"license":32,"forks":33,"topics":34,"repo":41,"sourceUrl":44,"mdContent":45},"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},"microsoft","Microsoft","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fmicrosoft.png",[12,16,19,22,25,26],{"name":13,"slug":14,"type":15},"Security","security","tag",{"name":17,"slug":18,"type":15},"Azure","azure",{"name":20,"slug":21,"type":15},"Compliance","compliance",{"name":23,"slug":24,"type":15},"LLM","llm",{"name":9,"slug":8,"type":15},{"name":27,"slug":28,"type":15},"Python","python",2804,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills","2026-07-18T05:14:23.017504","MIT",315,[35,36,18,37,38,39,40],"agent-skills","agents","foundry","mcp","sdk","skills",{"repoUrl":30,"stars":29,"forks":33,"topics":42,"description":43},[35,36,18,37,38,39,40],"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-python\u002Fskills\u002Fazure-ai-contentsafety-py","---\nname: azure-ai-contentsafety-py\ndescription: |\n  Azure AI Content Safety SDK for Python. Use for detecting harmful content in text and images with multi-severity classification.\n  Triggers: \"azure-ai-contentsafety\", \"ContentSafetyClient\", \"content moderation\", \"harmful content\", \"text analysis\", \"image analysis\".\nlicense: MIT\nmetadata:\n  author: Microsoft\n  version: \"1.0.0\"\n  package: azure-ai-contentsafety\n---\n\n# Azure AI Content Safety SDK for Python\n\nDetect harmful user-generated and AI-generated content in applications.\n\n## Installation\n\n```bash\npip install azure-ai-contentsafety\n```\n\n## Environment Variables\n\n```bash\nCONTENT_SAFETY_ENDPOINT=https:\u002F\u002F\u003Cresource>.cognitiveservices.azure.com  # Required for all auth methods\nAZURE_TOKEN_CREDENTIALS=prod # Required only if DefaultAzureCredential is used in production\nCONTENT_SAFETY_KEY=\u003Cyour-api-key>  # Only required for the legacy API-key auth path below\n```\n\n## Authentication & Lifecycle\n\n> **🔑 Two rules apply to every code sample below:**\n>\n> 1. **Prefer `DefaultAzureCredential`.** It works locally (Azure CLI \u002F VS Code \u002F Developer CLI) and in Azure (managed identity, workload identity) with no code change. Avoid connection strings, account\u002FAPI keys — they bypass Entra audit and rotation.\n>    - Local dev: `DefaultAzureCredential` works as-is.\n>    - Production: set `AZURE_TOKEN_CREDENTIALS=prod` (or `AZURE_TOKEN_CREDENTIALS=\u003Cspecific_credential>`) to constrain the credential chain to production-safe credentials.\n> 2. **Wrap every client in a context manager** so HTTP transports, sockets, and token caches are released deterministically:\n>    - Sync: `with \u003CClient>(...) as client:`\n>    - Async: `async with \u003CClient>(...) as client:` **and** `async with DefaultAzureCredential() as credential:` (from `azure.identity.aio`)\n>\n> Snippets may abbreviate this setup, but production code should always follow both rules.\n\n```python\nimport os\nfrom azure.identity import DefaultAzureCredential, ManagedIdentityCredential\nfrom azure.ai.contentsafety import ContentSafetyClient\nfrom azure.ai.contentsafety.models import AnalyzeTextOptions\n\n# Local dev: DefaultAzureCredential. Production: set AZURE_TOKEN_CREDENTIALS=prod or AZURE_TOKEN_CREDENTIALS=\u003Cspecific_credential>\ncredential = DefaultAzureCredential(require_envvar=True)\n# Or use a specific credential directly in production:\n# See https:\u002F\u002Flearn.microsoft.com\u002Fpython\u002Fapi\u002Foverview\u002Fazure\u002Fidentity-readme?view=azure-python#credential-classes\n# credential = ManagedIdentityCredential()\n\nwith ContentSafetyClient(\n    endpoint=os.environ[\"CONTENT_SAFETY_ENDPOINT\"],\n    credential=credential,\n) as client:\n    response = client.analyze_text(AnalyzeTextOptions(text=\"Hello, world!\"))\n```\n\n### Legacy: API Key (existing keyed deployments)\n\nNew code should use `DefaultAzureCredential` above. Use `AzureKeyCredential` only if you have an existing keyed deployment that hasn't been migrated to Entra ID yet — for example, regulated environments still completing their Entra rollout.\n\n```python\nimport os\nfrom azure.core.credentials import AzureKeyCredential\nfrom azure.ai.contentsafety import ContentSafetyClient\nfrom azure.ai.contentsafety.models import AnalyzeTextOptions\n\nwith ContentSafetyClient(\n    endpoint=os.environ[\"CONTENT_SAFETY_ENDPOINT\"],\n    credential=AzureKeyCredential(os.environ[\"CONTENT_SAFETY_KEY\"]),\n) as client:\n    response = client.analyze_text(AnalyzeTextOptions(text=\"Hello, world!\"))\n```\n\nThe `BlocklistClient` accepts the same `AzureKeyCredential` if you also need to manage blocklists with a key.\n\n## Analyze Text\n\n```python\nfrom azure.ai.contentsafety import ContentSafetyClient\nfrom azure.ai.contentsafety.models import AnalyzeTextOptions, TextCategory\nfrom azure.identity import DefaultAzureCredential\n\nwith ContentSafetyClient(endpoint, DefaultAzureCredential()) as client:\n    request = AnalyzeTextOptions(text=\"Your text content to analyze\")\n    response = client.analyze_text(request)\n\n    # Check each category\n    for category in [TextCategory.HATE, TextCategory.SELF_HARM, \n                     TextCategory.SEXUAL, TextCategory.VIOLENCE]:\n        result = next((r for r in response.categories_analysis \n                       if r.category == category), None)\n        if result:\n            print(f\"{category}: severity {result.severity}\")\n```\n\n## Analyze Image\n\n```python\nfrom azure.ai.contentsafety import ContentSafetyClient\nfrom azure.ai.contentsafety.models import AnalyzeImageOptions, ImageData\nfrom azure.identity import DefaultAzureCredential\nimport base64\n\nwith ContentSafetyClient(endpoint, DefaultAzureCredential()) as client:\n    # From file\n    with open(\"image.jpg\", \"rb\") as f:\n        image_data = base64.b64encode(f.read()).decode(\"utf-8\")\n\n    request = AnalyzeImageOptions(\n        image=ImageData(content=image_data)\n    )\n\n    response = client.analyze_image(request)\n\n    for result in response.categories_analysis:\n        print(f\"{result.category}: severity {result.severity}\")\n```\n\n### Image from URL\n\n```python\nfrom azure.ai.contentsafety.models import AnalyzeImageOptions, ImageData\n\nrequest = AnalyzeImageOptions(\n    image=ImageData(blob_url=\"https:\u002F\u002Fexample.com\u002Fimage.jpg\")\n)\n\nresponse = client.analyze_image(request)\n```\n\n## Text Blocklist Management\n\n### Create Blocklist\n\n```python\nfrom azure.ai.contentsafety import BlocklistClient\nfrom azure.ai.contentsafety.models import TextBlocklist\nfrom azure.identity import DefaultAzureCredential\n\nwith BlocklistClient(endpoint, DefaultAzureCredential()) as blocklist_client:\n    blocklist = TextBlocklist(\n        blocklist_name=\"my-blocklist\",\n        description=\"Custom terms to block\"\n    )\n\n    result = blocklist_client.create_or_update_text_blocklist(\n        blocklist_name=\"my-blocklist\",\n        options=blocklist\n    )\n```\n\n### Add Block Items\n\n```python\nfrom azure.ai.contentsafety.models import AddOrUpdateTextBlocklistItemsOptions, TextBlocklistItem\n\nitems = AddOrUpdateTextBlocklistItemsOptions(\n    blocklist_items=[\n        TextBlocklistItem(text=\"blocked-term-1\"),\n        TextBlocklistItem(text=\"blocked-term-2\")\n    ]\n)\n\nresult = blocklist_client.add_or_update_blocklist_items(\n    blocklist_name=\"my-blocklist\",\n    options=items\n)\n```\n\n### Analyze with Blocklist\n\n```python\nfrom azure.ai.contentsafety.models import AnalyzeTextOptions\n\nrequest = AnalyzeTextOptions(\n    text=\"Text containing blocked-term-1\",\n    blocklist_names=[\"my-blocklist\"],\n    halt_on_blocklist_hit=True\n)\n\nresponse = client.analyze_text(request)\n\nif response.blocklists_match:\n    for match in response.blocklists_match:\n        print(f\"Blocked: {match.blocklist_item_text}\")\n```\n\n## Severity Levels\n\nText analysis returns 4 severity levels (0, 2, 4, 6) by default. For 8 levels (0-7):\n\n```python\nfrom azure.ai.contentsafety.models import AnalyzeTextOptions, AnalyzeTextOutputType\n\nrequest = AnalyzeTextOptions(\n    text=\"Your text\",\n    output_type=AnalyzeTextOutputType.EIGHT_SEVERITY_LEVELS\n)\n```\n\n## Harm Categories\n\n| Category | Description |\n|----------|-------------|\n| `Hate` | Attacks based on identity (race, religion, gender, etc.) |\n| `Sexual` | Sexual content, relationships, anatomy |\n| `Violence` | Physical harm, weapons, injury |\n| `SelfHarm` | Self-injury, suicide, eating disorders |\n\n## Severity Scale\n\n| Level | Text Range | Image Range | Meaning |\n|-------|------------|-------------|---------|\n| 0 | Safe | Safe | No harmful content |\n| 2 | Low | Low | Mild references |\n| 4 | Medium | Medium | Moderate content |\n| 6 | High | High | Severe content |\n\n## Client Types\n\n| Client | Purpose |\n|--------|---------|\n| `ContentSafetyClient` | Analyze text and images |\n| `BlocklistClient` | Manage custom blocklists |\n\n## Best Practices\n\n1. **Pick sync OR async and stay consistent.** Do not mix `azure.ai.contentsafety` sync clients with `azure.ai.contentsafety.aio` async clients in the same call path. Choose one mode per module.\n2. **Always use context managers for clients and async credentials.** Wrap every client in `with ContentSafetyClient(...) as client:` (sync) or `async with ContentSafetyClient(...) as client:` (async). For async `DefaultAzureCredential` from `azure.identity.aio`, also use `async with credential:` so tokens and transports are cleaned up.\n3. **Use blocklists** for domain-specific terms\n4. **Set severity thresholds** appropriate for your use case\n5. **Handle multiple categories** — content can be harmful in multiple ways\n6. **Use halt_on_blocklist_hit** for immediate rejection\n7. **Log analysis results** for audit and improvement\n8. **Consider 8-severity mode** for finer-grained control\n9. **Pre-moderate AI outputs** before showing to users\n\n## Reference Files\n\n| File | Contents |\n|------|----------|\n| [references\u002Fcapabilities.md](references\u002Fcapabilities.md) | Additional non-hero capabilities, operation-group coverage, and production checklists. |\n| [references\u002Fnon-hero-scenarios.md](references\u002Fnon-hero-scenarios.md) | Dedicated non-hero examples for secondary\u002Fadvanced scenarios. |\n",{"data":47,"body":51},{"name":4,"description":6,"license":32,"metadata":48},{"author":9,"version":49,"package":50},"1.0.0","azure-ai-contentsafety",{"type":52,"children":53},"root",[54,63,69,76,111,117,221,227,364,513,520,540,619,639,645,769,775,921,927,987,993,999,1112,1118,1225,1231,1337,1343,1348,1400,1406,1502,1508,1628,1634,1689,1695,1842,1848,1903],{"type":55,"tag":56,"props":57,"children":59},"element","h1",{"id":58},"azure-ai-content-safety-sdk-for-python",[60],{"type":61,"value":62},"text","Azure AI Content Safety SDK for Python",{"type":55,"tag":64,"props":65,"children":66},"p",{},[67],{"type":61,"value":68},"Detect harmful user-generated and AI-generated content in applications.",{"type":55,"tag":70,"props":71,"children":73},"h2",{"id":72},"installation",[74],{"type":61,"value":75},"Installation",{"type":55,"tag":77,"props":78,"children":83},"pre",{"className":79,"code":80,"language":81,"meta":82,"style":82},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","pip install azure-ai-contentsafety\n","bash","",[84],{"type":55,"tag":85,"props":86,"children":87},"code",{"__ignoreMap":82},[88],{"type":55,"tag":89,"props":90,"children":93},"span",{"class":91,"line":92},"line",1,[94,100,106],{"type":55,"tag":89,"props":95,"children":97},{"style":96},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[98],{"type":61,"value":99},"pip",{"type":55,"tag":89,"props":101,"children":103},{"style":102},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[104],{"type":61,"value":105}," install",{"type":55,"tag":89,"props":107,"children":108},{"style":102},[109],{"type":61,"value":110}," azure-ai-contentsafety\n",{"type":55,"tag":70,"props":112,"children":114},{"id":113},"environment-variables",[115],{"type":61,"value":116},"Environment Variables",{"type":55,"tag":77,"props":118,"children":120},{"className":79,"code":119,"language":81,"meta":82,"style":82},"CONTENT_SAFETY_ENDPOINT=https:\u002F\u002F\u003Cresource>.cognitiveservices.azure.com  # Required for all auth methods\nAZURE_TOKEN_CREDENTIALS=prod # Required only if DefaultAzureCredential is used in production\nCONTENT_SAFETY_KEY=\u003Cyour-api-key>  # Only required for the legacy API-key auth path below\n",[121],{"type":55,"tag":85,"props":122,"children":123},{"__ignoreMap":82},[124,170,193],{"type":55,"tag":89,"props":125,"children":126},{"class":91,"line":92},[127,133,139,144,149,154,159,164],{"type":55,"tag":89,"props":128,"children":130},{"style":129},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[131],{"type":61,"value":132},"CONTENT_SAFETY_ENDPOINT",{"type":55,"tag":89,"props":134,"children":136},{"style":135},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[137],{"type":61,"value":138},"=",{"type":55,"tag":89,"props":140,"children":141},{"style":102},[142],{"type":61,"value":143},"https:\u002F\u002F",{"type":55,"tag":89,"props":145,"children":146},{"style":135},[147],{"type":61,"value":148},"\u003C",{"type":55,"tag":89,"props":150,"children":151},{"style":102},[152],{"type":61,"value":153},"resource",{"type":55,"tag":89,"props":155,"children":156},{"style":135},[157],{"type":61,"value":158},">",{"type":55,"tag":89,"props":160,"children":161},{"style":102},[162],{"type":61,"value":163},".cognitiveservices.azure.com",{"type":55,"tag":89,"props":165,"children":167},{"style":166},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[168],{"type":61,"value":169},"  # Required for all auth methods\n",{"type":55,"tag":89,"props":171,"children":173},{"class":91,"line":172},2,[174,179,183,188],{"type":55,"tag":89,"props":175,"children":176},{"style":129},[177],{"type":61,"value":178},"AZURE_TOKEN_CREDENTIALS",{"type":55,"tag":89,"props":180,"children":181},{"style":135},[182],{"type":61,"value":138},{"type":55,"tag":89,"props":184,"children":185},{"style":102},[186],{"type":61,"value":187},"prod",{"type":55,"tag":89,"props":189,"children":190},{"style":166},[191],{"type":61,"value":192}," # Required only if DefaultAzureCredential is used in production\n",{"type":55,"tag":89,"props":194,"children":196},{"class":91,"line":195},3,[197,202,207,212,216],{"type":55,"tag":89,"props":198,"children":199},{"style":129},[200],{"type":61,"value":201},"CONTENT_SAFETY_KEY",{"type":55,"tag":89,"props":203,"children":204},{"style":135},[205],{"type":61,"value":206},"=\u003C",{"type":55,"tag":89,"props":208,"children":209},{"style":102},[210],{"type":61,"value":211},"your-api-key",{"type":55,"tag":89,"props":213,"children":214},{"style":135},[215],{"type":61,"value":158},{"type":55,"tag":89,"props":217,"children":218},{"style":166},[219],{"type":61,"value":220},"  # Only required for the legacy API-key auth path below\n",{"type":55,"tag":70,"props":222,"children":224},{"id":223},"authentication-lifecycle",[225],{"type":61,"value":226},"Authentication & Lifecycle",{"type":55,"tag":228,"props":229,"children":230},"blockquote",{},[231,240,359],{"type":55,"tag":64,"props":232,"children":233},{},[234],{"type":55,"tag":235,"props":236,"children":237},"strong",{},[238],{"type":61,"value":239},"🔑 Two rules apply to every code sample below:",{"type":55,"tag":241,"props":242,"children":243},"ol",{},[244,300],{"type":55,"tag":245,"props":246,"children":247},"li",{},[248,261,263],{"type":55,"tag":235,"props":249,"children":250},{},[251,253,259],{"type":61,"value":252},"Prefer ",{"type":55,"tag":85,"props":254,"children":256},{"className":255},[],[257],{"type":61,"value":258},"DefaultAzureCredential",{"type":61,"value":260},".",{"type":61,"value":262}," It works locally (Azure CLI \u002F VS Code \u002F Developer CLI) and in Azure (managed identity, workload identity) with no code change. Avoid connection strings, account\u002FAPI keys — they bypass Entra audit and rotation.\n",{"type":55,"tag":264,"props":265,"children":266},"ul",{},[267,279],{"type":55,"tag":245,"props":268,"children":269},{},[270,272,277],{"type":61,"value":271},"Local dev: ",{"type":55,"tag":85,"props":273,"children":275},{"className":274},[],[276],{"type":61,"value":258},{"type":61,"value":278}," works as-is.",{"type":55,"tag":245,"props":280,"children":281},{},[282,284,290,292,298],{"type":61,"value":283},"Production: set ",{"type":55,"tag":85,"props":285,"children":287},{"className":286},[],[288],{"type":61,"value":289},"AZURE_TOKEN_CREDENTIALS=prod",{"type":61,"value":291}," (or ",{"type":55,"tag":85,"props":293,"children":295},{"className":294},[],[296],{"type":61,"value":297},"AZURE_TOKEN_CREDENTIALS=\u003Cspecific_credential>",{"type":61,"value":299},") to constrain the credential chain to production-safe credentials.",{"type":55,"tag":245,"props":301,"children":302},{},[303,308,310],{"type":55,"tag":235,"props":304,"children":305},{},[306],{"type":61,"value":307},"Wrap every client in a context manager",{"type":61,"value":309}," so HTTP transports, sockets, and token caches are released deterministically:\n",{"type":55,"tag":264,"props":311,"children":312},{},[313,324],{"type":55,"tag":245,"props":314,"children":315},{},[316,318],{"type":61,"value":317},"Sync: ",{"type":55,"tag":85,"props":319,"children":321},{"className":320},[],[322],{"type":61,"value":323},"with \u003CClient>(...) as client:",{"type":55,"tag":245,"props":325,"children":326},{},[327,329,335,337,342,343,349,351,357],{"type":61,"value":328},"Async: ",{"type":55,"tag":85,"props":330,"children":332},{"className":331},[],[333],{"type":61,"value":334},"async with \u003CClient>(...) as client:",{"type":61,"value":336}," ",{"type":55,"tag":235,"props":338,"children":339},{},[340],{"type":61,"value":341},"and",{"type":61,"value":336},{"type":55,"tag":85,"props":344,"children":346},{"className":345},[],[347],{"type":61,"value":348},"async with DefaultAzureCredential() as credential:",{"type":61,"value":350}," (from ",{"type":55,"tag":85,"props":352,"children":354},{"className":353},[],[355],{"type":61,"value":356},"azure.identity.aio",{"type":61,"value":358},")",{"type":55,"tag":64,"props":360,"children":361},{},[362],{"type":61,"value":363},"Snippets may abbreviate this setup, but production code should always follow both rules.",{"type":55,"tag":77,"props":365,"children":368},{"className":366,"code":367,"language":28,"meta":82,"style":82},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import os\nfrom azure.identity import DefaultAzureCredential, ManagedIdentityCredential\nfrom azure.ai.contentsafety import ContentSafetyClient\nfrom azure.ai.contentsafety.models import AnalyzeTextOptions\n\n# Local dev: DefaultAzureCredential. Production: set AZURE_TOKEN_CREDENTIALS=prod or AZURE_TOKEN_CREDENTIALS=\u003Cspecific_credential>\ncredential = DefaultAzureCredential(require_envvar=True)\n# Or use a specific credential directly in production:\n# See https:\u002F\u002Flearn.microsoft.com\u002Fpython\u002Fapi\u002Foverview\u002Fazure\u002Fidentity-readme?view=azure-python#credential-classes\n# credential = ManagedIdentityCredential()\n\nwith ContentSafetyClient(\n    endpoint=os.environ[\"CONTENT_SAFETY_ENDPOINT\"],\n    credential=credential,\n) as client:\n    response = client.analyze_text(AnalyzeTextOptions(text=\"Hello, world!\"))\n",[369],{"type":55,"tag":85,"props":370,"children":371},{"__ignoreMap":82},[372,380,388,396,405,415,424,433,442,451,460,468,477,486,495,504],{"type":55,"tag":89,"props":373,"children":374},{"class":91,"line":92},[375],{"type":55,"tag":89,"props":376,"children":377},{},[378],{"type":61,"value":379},"import os\n",{"type":55,"tag":89,"props":381,"children":382},{"class":91,"line":172},[383],{"type":55,"tag":89,"props":384,"children":385},{},[386],{"type":61,"value":387},"from azure.identity import DefaultAzureCredential, ManagedIdentityCredential\n",{"type":55,"tag":89,"props":389,"children":390},{"class":91,"line":195},[391],{"type":55,"tag":89,"props":392,"children":393},{},[394],{"type":61,"value":395},"from azure.ai.contentsafety import ContentSafetyClient\n",{"type":55,"tag":89,"props":397,"children":399},{"class":91,"line":398},4,[400],{"type":55,"tag":89,"props":401,"children":402},{},[403],{"type":61,"value":404},"from azure.ai.contentsafety.models import AnalyzeTextOptions\n",{"type":55,"tag":89,"props":406,"children":408},{"class":91,"line":407},5,[409],{"type":55,"tag":89,"props":410,"children":412},{"emptyLinePlaceholder":411},true,[413],{"type":61,"value":414},"\n",{"type":55,"tag":89,"props":416,"children":418},{"class":91,"line":417},6,[419],{"type":55,"tag":89,"props":420,"children":421},{},[422],{"type":61,"value":423},"# Local dev: DefaultAzureCredential. Production: set AZURE_TOKEN_CREDENTIALS=prod or AZURE_TOKEN_CREDENTIALS=\u003Cspecific_credential>\n",{"type":55,"tag":89,"props":425,"children":427},{"class":91,"line":426},7,[428],{"type":55,"tag":89,"props":429,"children":430},{},[431],{"type":61,"value":432},"credential = DefaultAzureCredential(require_envvar=True)\n",{"type":55,"tag":89,"props":434,"children":436},{"class":91,"line":435},8,[437],{"type":55,"tag":89,"props":438,"children":439},{},[440],{"type":61,"value":441},"# Or use a specific credential directly in production:\n",{"type":55,"tag":89,"props":443,"children":445},{"class":91,"line":444},9,[446],{"type":55,"tag":89,"props":447,"children":448},{},[449],{"type":61,"value":450},"# See https:\u002F\u002Flearn.microsoft.com\u002Fpython\u002Fapi\u002Foverview\u002Fazure\u002Fidentity-readme?view=azure-python#credential-classes\n",{"type":55,"tag":89,"props":452,"children":454},{"class":91,"line":453},10,[455],{"type":55,"tag":89,"props":456,"children":457},{},[458],{"type":61,"value":459},"# credential = ManagedIdentityCredential()\n",{"type":55,"tag":89,"props":461,"children":463},{"class":91,"line":462},11,[464],{"type":55,"tag":89,"props":465,"children":466},{"emptyLinePlaceholder":411},[467],{"type":61,"value":414},{"type":55,"tag":89,"props":469,"children":471},{"class":91,"line":470},12,[472],{"type":55,"tag":89,"props":473,"children":474},{},[475],{"type":61,"value":476},"with ContentSafetyClient(\n",{"type":55,"tag":89,"props":478,"children":480},{"class":91,"line":479},13,[481],{"type":55,"tag":89,"props":482,"children":483},{},[484],{"type":61,"value":485},"    endpoint=os.environ[\"CONTENT_SAFETY_ENDPOINT\"],\n",{"type":55,"tag":89,"props":487,"children":489},{"class":91,"line":488},14,[490],{"type":55,"tag":89,"props":491,"children":492},{},[493],{"type":61,"value":494},"    credential=credential,\n",{"type":55,"tag":89,"props":496,"children":498},{"class":91,"line":497},15,[499],{"type":55,"tag":89,"props":500,"children":501},{},[502],{"type":61,"value":503},") as client:\n",{"type":55,"tag":89,"props":505,"children":507},{"class":91,"line":506},16,[508],{"type":55,"tag":89,"props":509,"children":510},{},[511],{"type":61,"value":512},"    response = client.analyze_text(AnalyzeTextOptions(text=\"Hello, world!\"))\n",{"type":55,"tag":514,"props":515,"children":517},"h3",{"id":516},"legacy-api-key-existing-keyed-deployments",[518],{"type":61,"value":519},"Legacy: API Key (existing keyed deployments)",{"type":55,"tag":64,"props":521,"children":522},{},[523,525,530,532,538],{"type":61,"value":524},"New code should use ",{"type":55,"tag":85,"props":526,"children":528},{"className":527},[],[529],{"type":61,"value":258},{"type":61,"value":531}," above. Use ",{"type":55,"tag":85,"props":533,"children":535},{"className":534},[],[536],{"type":61,"value":537},"AzureKeyCredential",{"type":61,"value":539}," only if you have an existing keyed deployment that hasn't been migrated to Entra ID yet — for example, regulated environments still completing their Entra rollout.",{"type":55,"tag":77,"props":541,"children":543},{"className":366,"code":542,"language":28,"meta":82,"style":82},"import os\nfrom azure.core.credentials import AzureKeyCredential\nfrom azure.ai.contentsafety import ContentSafetyClient\nfrom azure.ai.contentsafety.models import AnalyzeTextOptions\n\nwith ContentSafetyClient(\n    endpoint=os.environ[\"CONTENT_SAFETY_ENDPOINT\"],\n    credential=AzureKeyCredential(os.environ[\"CONTENT_SAFETY_KEY\"]),\n) as client:\n    response = client.analyze_text(AnalyzeTextOptions(text=\"Hello, world!\"))\n",[544],{"type":55,"tag":85,"props":545,"children":546},{"__ignoreMap":82},[547,554,562,569,576,583,590,597,605,612],{"type":55,"tag":89,"props":548,"children":549},{"class":91,"line":92},[550],{"type":55,"tag":89,"props":551,"children":552},{},[553],{"type":61,"value":379},{"type":55,"tag":89,"props":555,"children":556},{"class":91,"line":172},[557],{"type":55,"tag":89,"props":558,"children":559},{},[560],{"type":61,"value":561},"from azure.core.credentials import AzureKeyCredential\n",{"type":55,"tag":89,"props":563,"children":564},{"class":91,"line":195},[565],{"type":55,"tag":89,"props":566,"children":567},{},[568],{"type":61,"value":395},{"type":55,"tag":89,"props":570,"children":571},{"class":91,"line":398},[572],{"type":55,"tag":89,"props":573,"children":574},{},[575],{"type":61,"value":404},{"type":55,"tag":89,"props":577,"children":578},{"class":91,"line":407},[579],{"type":55,"tag":89,"props":580,"children":581},{"emptyLinePlaceholder":411},[582],{"type":61,"value":414},{"type":55,"tag":89,"props":584,"children":585},{"class":91,"line":417},[586],{"type":55,"tag":89,"props":587,"children":588},{},[589],{"type":61,"value":476},{"type":55,"tag":89,"props":591,"children":592},{"class":91,"line":426},[593],{"type":55,"tag":89,"props":594,"children":595},{},[596],{"type":61,"value":485},{"type":55,"tag":89,"props":598,"children":599},{"class":91,"line":435},[600],{"type":55,"tag":89,"props":601,"children":602},{},[603],{"type":61,"value":604},"    credential=AzureKeyCredential(os.environ[\"CONTENT_SAFETY_KEY\"]),\n",{"type":55,"tag":89,"props":606,"children":607},{"class":91,"line":444},[608],{"type":55,"tag":89,"props":609,"children":610},{},[611],{"type":61,"value":503},{"type":55,"tag":89,"props":613,"children":614},{"class":91,"line":453},[615],{"type":55,"tag":89,"props":616,"children":617},{},[618],{"type":61,"value":512},{"type":55,"tag":64,"props":620,"children":621},{},[622,624,630,632,637],{"type":61,"value":623},"The ",{"type":55,"tag":85,"props":625,"children":627},{"className":626},[],[628],{"type":61,"value":629},"BlocklistClient",{"type":61,"value":631}," accepts the same ",{"type":55,"tag":85,"props":633,"children":635},{"className":634},[],[636],{"type":61,"value":537},{"type":61,"value":638}," if you also need to manage blocklists with a key.",{"type":55,"tag":70,"props":640,"children":642},{"id":641},"analyze-text",[643],{"type":61,"value":644},"Analyze Text",{"type":55,"tag":77,"props":646,"children":648},{"className":366,"code":647,"language":28,"meta":82,"style":82},"from azure.ai.contentsafety import ContentSafetyClient\nfrom azure.ai.contentsafety.models import AnalyzeTextOptions, TextCategory\nfrom azure.identity import DefaultAzureCredential\n\nwith ContentSafetyClient(endpoint, DefaultAzureCredential()) as client:\n    request = AnalyzeTextOptions(text=\"Your text content to analyze\")\n    response = client.analyze_text(request)\n\n    # Check each category\n    for category in [TextCategory.HATE, TextCategory.SELF_HARM, \n                     TextCategory.SEXUAL, TextCategory.VIOLENCE]:\n        result = next((r for r in response.categories_analysis \n                       if r.category == category), None)\n        if result:\n            print(f\"{category}: severity {result.severity}\")\n",[649],{"type":55,"tag":85,"props":650,"children":651},{"__ignoreMap":82},[652,659,667,675,682,690,698,706,713,721,729,737,745,753,761],{"type":55,"tag":89,"props":653,"children":654},{"class":91,"line":92},[655],{"type":55,"tag":89,"props":656,"children":657},{},[658],{"type":61,"value":395},{"type":55,"tag":89,"props":660,"children":661},{"class":91,"line":172},[662],{"type":55,"tag":89,"props":663,"children":664},{},[665],{"type":61,"value":666},"from azure.ai.contentsafety.models import AnalyzeTextOptions, TextCategory\n",{"type":55,"tag":89,"props":668,"children":669},{"class":91,"line":195},[670],{"type":55,"tag":89,"props":671,"children":672},{},[673],{"type":61,"value":674},"from azure.identity import DefaultAzureCredential\n",{"type":55,"tag":89,"props":676,"children":677},{"class":91,"line":398},[678],{"type":55,"tag":89,"props":679,"children":680},{"emptyLinePlaceholder":411},[681],{"type":61,"value":414},{"type":55,"tag":89,"props":683,"children":684},{"class":91,"line":407},[685],{"type":55,"tag":89,"props":686,"children":687},{},[688],{"type":61,"value":689},"with ContentSafetyClient(endpoint, DefaultAzureCredential()) as client:\n",{"type":55,"tag":89,"props":691,"children":692},{"class":91,"line":417},[693],{"type":55,"tag":89,"props":694,"children":695},{},[696],{"type":61,"value":697},"    request = AnalyzeTextOptions(text=\"Your text content to analyze\")\n",{"type":55,"tag":89,"props":699,"children":700},{"class":91,"line":426},[701],{"type":55,"tag":89,"props":702,"children":703},{},[704],{"type":61,"value":705},"    response = client.analyze_text(request)\n",{"type":55,"tag":89,"props":707,"children":708},{"class":91,"line":435},[709],{"type":55,"tag":89,"props":710,"children":711},{"emptyLinePlaceholder":411},[712],{"type":61,"value":414},{"type":55,"tag":89,"props":714,"children":715},{"class":91,"line":444},[716],{"type":55,"tag":89,"props":717,"children":718},{},[719],{"type":61,"value":720},"    # Check each category\n",{"type":55,"tag":89,"props":722,"children":723},{"class":91,"line":453},[724],{"type":55,"tag":89,"props":725,"children":726},{},[727],{"type":61,"value":728},"    for category in [TextCategory.HATE, TextCategory.SELF_HARM, \n",{"type":55,"tag":89,"props":730,"children":731},{"class":91,"line":462},[732],{"type":55,"tag":89,"props":733,"children":734},{},[735],{"type":61,"value":736},"                     TextCategory.SEXUAL, TextCategory.VIOLENCE]:\n",{"type":55,"tag":89,"props":738,"children":739},{"class":91,"line":470},[740],{"type":55,"tag":89,"props":741,"children":742},{},[743],{"type":61,"value":744},"        result = next((r for r in response.categories_analysis \n",{"type":55,"tag":89,"props":746,"children":747},{"class":91,"line":479},[748],{"type":55,"tag":89,"props":749,"children":750},{},[751],{"type":61,"value":752},"                       if r.category == category), None)\n",{"type":55,"tag":89,"props":754,"children":755},{"class":91,"line":488},[756],{"type":55,"tag":89,"props":757,"children":758},{},[759],{"type":61,"value":760},"        if result:\n",{"type":55,"tag":89,"props":762,"children":763},{"class":91,"line":497},[764],{"type":55,"tag":89,"props":765,"children":766},{},[767],{"type":61,"value":768},"            print(f\"{category}: severity {result.severity}\")\n",{"type":55,"tag":70,"props":770,"children":772},{"id":771},"analyze-image",[773],{"type":61,"value":774},"Analyze Image",{"type":55,"tag":77,"props":776,"children":778},{"className":366,"code":777,"language":28,"meta":82,"style":82},"from azure.ai.contentsafety import ContentSafetyClient\nfrom azure.ai.contentsafety.models import AnalyzeImageOptions, ImageData\nfrom azure.identity import DefaultAzureCredential\nimport base64\n\nwith ContentSafetyClient(endpoint, DefaultAzureCredential()) as client:\n    # From file\n    with open(\"image.jpg\", \"rb\") as f:\n        image_data = base64.b64encode(f.read()).decode(\"utf-8\")\n\n    request = AnalyzeImageOptions(\n        image=ImageData(content=image_data)\n    )\n\n    response = client.analyze_image(request)\n\n    for result in response.categories_analysis:\n        print(f\"{result.category}: severity {result.severity}\")\n",[779],{"type":55,"tag":85,"props":780,"children":781},{"__ignoreMap":82},[782,789,797,804,812,819,826,834,842,850,857,865,873,881,888,896,903,912],{"type":55,"tag":89,"props":783,"children":784},{"class":91,"line":92},[785],{"type":55,"tag":89,"props":786,"children":787},{},[788],{"type":61,"value":395},{"type":55,"tag":89,"props":790,"children":791},{"class":91,"line":172},[792],{"type":55,"tag":89,"props":793,"children":794},{},[795],{"type":61,"value":796},"from azure.ai.contentsafety.models import AnalyzeImageOptions, ImageData\n",{"type":55,"tag":89,"props":798,"children":799},{"class":91,"line":195},[800],{"type":55,"tag":89,"props":801,"children":802},{},[803],{"type":61,"value":674},{"type":55,"tag":89,"props":805,"children":806},{"class":91,"line":398},[807],{"type":55,"tag":89,"props":808,"children":809},{},[810],{"type":61,"value":811},"import base64\n",{"type":55,"tag":89,"props":813,"children":814},{"class":91,"line":407},[815],{"type":55,"tag":89,"props":816,"children":817},{"emptyLinePlaceholder":411},[818],{"type":61,"value":414},{"type":55,"tag":89,"props":820,"children":821},{"class":91,"line":417},[822],{"type":55,"tag":89,"props":823,"children":824},{},[825],{"type":61,"value":689},{"type":55,"tag":89,"props":827,"children":828},{"class":91,"line":426},[829],{"type":55,"tag":89,"props":830,"children":831},{},[832],{"type":61,"value":833},"    # From file\n",{"type":55,"tag":89,"props":835,"children":836},{"class":91,"line":435},[837],{"type":55,"tag":89,"props":838,"children":839},{},[840],{"type":61,"value":841},"    with open(\"image.jpg\", \"rb\") as f:\n",{"type":55,"tag":89,"props":843,"children":844},{"class":91,"line":444},[845],{"type":55,"tag":89,"props":846,"children":847},{},[848],{"type":61,"value":849},"        image_data = base64.b64encode(f.read()).decode(\"utf-8\")\n",{"type":55,"tag":89,"props":851,"children":852},{"class":91,"line":453},[853],{"type":55,"tag":89,"props":854,"children":855},{"emptyLinePlaceholder":411},[856],{"type":61,"value":414},{"type":55,"tag":89,"props":858,"children":859},{"class":91,"line":462},[860],{"type":55,"tag":89,"props":861,"children":862},{},[863],{"type":61,"value":864},"    request = AnalyzeImageOptions(\n",{"type":55,"tag":89,"props":866,"children":867},{"class":91,"line":470},[868],{"type":55,"tag":89,"props":869,"children":870},{},[871],{"type":61,"value":872},"        image=ImageData(content=image_data)\n",{"type":55,"tag":89,"props":874,"children":875},{"class":91,"line":479},[876],{"type":55,"tag":89,"props":877,"children":878},{},[879],{"type":61,"value":880},"    )\n",{"type":55,"tag":89,"props":882,"children":883},{"class":91,"line":488},[884],{"type":55,"tag":89,"props":885,"children":886},{"emptyLinePlaceholder":411},[887],{"type":61,"value":414},{"type":55,"tag":89,"props":889,"children":890},{"class":91,"line":497},[891],{"type":55,"tag":89,"props":892,"children":893},{},[894],{"type":61,"value":895},"    response = client.analyze_image(request)\n",{"type":55,"tag":89,"props":897,"children":898},{"class":91,"line":506},[899],{"type":55,"tag":89,"props":900,"children":901},{"emptyLinePlaceholder":411},[902],{"type":61,"value":414},{"type":55,"tag":89,"props":904,"children":906},{"class":91,"line":905},17,[907],{"type":55,"tag":89,"props":908,"children":909},{},[910],{"type":61,"value":911},"    for result in response.categories_analysis:\n",{"type":55,"tag":89,"props":913,"children":915},{"class":91,"line":914},18,[916],{"type":55,"tag":89,"props":917,"children":918},{},[919],{"type":61,"value":920},"        print(f\"{result.category}: severity {result.severity}\")\n",{"type":55,"tag":514,"props":922,"children":924},{"id":923},"image-from-url",[925],{"type":61,"value":926},"Image from URL",{"type":55,"tag":77,"props":928,"children":930},{"className":366,"code":929,"language":28,"meta":82,"style":82},"from azure.ai.contentsafety.models import AnalyzeImageOptions, ImageData\n\nrequest = AnalyzeImageOptions(\n    image=ImageData(blob_url=\"https:\u002F\u002Fexample.com\u002Fimage.jpg\")\n)\n\nresponse = client.analyze_image(request)\n",[931],{"type":55,"tag":85,"props":932,"children":933},{"__ignoreMap":82},[934,941,948,956,964,972,979],{"type":55,"tag":89,"props":935,"children":936},{"class":91,"line":92},[937],{"type":55,"tag":89,"props":938,"children":939},{},[940],{"type":61,"value":796},{"type":55,"tag":89,"props":942,"children":943},{"class":91,"line":172},[944],{"type":55,"tag":89,"props":945,"children":946},{"emptyLinePlaceholder":411},[947],{"type":61,"value":414},{"type":55,"tag":89,"props":949,"children":950},{"class":91,"line":195},[951],{"type":55,"tag":89,"props":952,"children":953},{},[954],{"type":61,"value":955},"request = AnalyzeImageOptions(\n",{"type":55,"tag":89,"props":957,"children":958},{"class":91,"line":398},[959],{"type":55,"tag":89,"props":960,"children":961},{},[962],{"type":61,"value":963},"    image=ImageData(blob_url=\"https:\u002F\u002Fexample.com\u002Fimage.jpg\")\n",{"type":55,"tag":89,"props":965,"children":966},{"class":91,"line":407},[967],{"type":55,"tag":89,"props":968,"children":969},{},[970],{"type":61,"value":971},")\n",{"type":55,"tag":89,"props":973,"children":974},{"class":91,"line":417},[975],{"type":55,"tag":89,"props":976,"children":977},{"emptyLinePlaceholder":411},[978],{"type":61,"value":414},{"type":55,"tag":89,"props":980,"children":981},{"class":91,"line":426},[982],{"type":55,"tag":89,"props":983,"children":984},{},[985],{"type":61,"value":986},"response = client.analyze_image(request)\n",{"type":55,"tag":70,"props":988,"children":990},{"id":989},"text-blocklist-management",[991],{"type":61,"value":992},"Text Blocklist Management",{"type":55,"tag":514,"props":994,"children":996},{"id":995},"create-blocklist",[997],{"type":61,"value":998},"Create Blocklist",{"type":55,"tag":77,"props":1000,"children":1002},{"className":366,"code":1001,"language":28,"meta":82,"style":82},"from azure.ai.contentsafety import BlocklistClient\nfrom azure.ai.contentsafety.models import TextBlocklist\nfrom azure.identity import DefaultAzureCredential\n\nwith BlocklistClient(endpoint, DefaultAzureCredential()) as blocklist_client:\n    blocklist = TextBlocklist(\n        blocklist_name=\"my-blocklist\",\n        description=\"Custom terms to block\"\n    )\n\n    result = blocklist_client.create_or_update_text_blocklist(\n        blocklist_name=\"my-blocklist\",\n        options=blocklist\n    )\n",[1003],{"type":55,"tag":85,"props":1004,"children":1005},{"__ignoreMap":82},[1006,1014,1022,1029,1036,1044,1052,1060,1068,1075,1082,1090,1097,1105],{"type":55,"tag":89,"props":1007,"children":1008},{"class":91,"line":92},[1009],{"type":55,"tag":89,"props":1010,"children":1011},{},[1012],{"type":61,"value":1013},"from azure.ai.contentsafety import BlocklistClient\n",{"type":55,"tag":89,"props":1015,"children":1016},{"class":91,"line":172},[1017],{"type":55,"tag":89,"props":1018,"children":1019},{},[1020],{"type":61,"value":1021},"from azure.ai.contentsafety.models import TextBlocklist\n",{"type":55,"tag":89,"props":1023,"children":1024},{"class":91,"line":195},[1025],{"type":55,"tag":89,"props":1026,"children":1027},{},[1028],{"type":61,"value":674},{"type":55,"tag":89,"props":1030,"children":1031},{"class":91,"line":398},[1032],{"type":55,"tag":89,"props":1033,"children":1034},{"emptyLinePlaceholder":411},[1035],{"type":61,"value":414},{"type":55,"tag":89,"props":1037,"children":1038},{"class":91,"line":407},[1039],{"type":55,"tag":89,"props":1040,"children":1041},{},[1042],{"type":61,"value":1043},"with BlocklistClient(endpoint, DefaultAzureCredential()) as blocklist_client:\n",{"type":55,"tag":89,"props":1045,"children":1046},{"class":91,"line":417},[1047],{"type":55,"tag":89,"props":1048,"children":1049},{},[1050],{"type":61,"value":1051},"    blocklist = TextBlocklist(\n",{"type":55,"tag":89,"props":1053,"children":1054},{"class":91,"line":426},[1055],{"type":55,"tag":89,"props":1056,"children":1057},{},[1058],{"type":61,"value":1059},"        blocklist_name=\"my-blocklist\",\n",{"type":55,"tag":89,"props":1061,"children":1062},{"class":91,"line":435},[1063],{"type":55,"tag":89,"props":1064,"children":1065},{},[1066],{"type":61,"value":1067},"        description=\"Custom terms to block\"\n",{"type":55,"tag":89,"props":1069,"children":1070},{"class":91,"line":444},[1071],{"type":55,"tag":89,"props":1072,"children":1073},{},[1074],{"type":61,"value":880},{"type":55,"tag":89,"props":1076,"children":1077},{"class":91,"line":453},[1078],{"type":55,"tag":89,"props":1079,"children":1080},{"emptyLinePlaceholder":411},[1081],{"type":61,"value":414},{"type":55,"tag":89,"props":1083,"children":1084},{"class":91,"line":462},[1085],{"type":55,"tag":89,"props":1086,"children":1087},{},[1088],{"type":61,"value":1089},"    result = blocklist_client.create_or_update_text_blocklist(\n",{"type":55,"tag":89,"props":1091,"children":1092},{"class":91,"line":470},[1093],{"type":55,"tag":89,"props":1094,"children":1095},{},[1096],{"type":61,"value":1059},{"type":55,"tag":89,"props":1098,"children":1099},{"class":91,"line":479},[1100],{"type":55,"tag":89,"props":1101,"children":1102},{},[1103],{"type":61,"value":1104},"        options=blocklist\n",{"type":55,"tag":89,"props":1106,"children":1107},{"class":91,"line":488},[1108],{"type":55,"tag":89,"props":1109,"children":1110},{},[1111],{"type":61,"value":880},{"type":55,"tag":514,"props":1113,"children":1115},{"id":1114},"add-block-items",[1116],{"type":61,"value":1117},"Add Block Items",{"type":55,"tag":77,"props":1119,"children":1121},{"className":366,"code":1120,"language":28,"meta":82,"style":82},"from azure.ai.contentsafety.models import AddOrUpdateTextBlocklistItemsOptions, TextBlocklistItem\n\nitems = AddOrUpdateTextBlocklistItemsOptions(\n    blocklist_items=[\n        TextBlocklistItem(text=\"blocked-term-1\"),\n        TextBlocklistItem(text=\"blocked-term-2\")\n    ]\n)\n\nresult = blocklist_client.add_or_update_blocklist_items(\n    blocklist_name=\"my-blocklist\",\n    options=items\n)\n",[1122],{"type":55,"tag":85,"props":1123,"children":1124},{"__ignoreMap":82},[1125,1133,1140,1148,1156,1164,1172,1180,1187,1194,1202,1210,1218],{"type":55,"tag":89,"props":1126,"children":1127},{"class":91,"line":92},[1128],{"type":55,"tag":89,"props":1129,"children":1130},{},[1131],{"type":61,"value":1132},"from azure.ai.contentsafety.models import AddOrUpdateTextBlocklistItemsOptions, TextBlocklistItem\n",{"type":55,"tag":89,"props":1134,"children":1135},{"class":91,"line":172},[1136],{"type":55,"tag":89,"props":1137,"children":1138},{"emptyLinePlaceholder":411},[1139],{"type":61,"value":414},{"type":55,"tag":89,"props":1141,"children":1142},{"class":91,"line":195},[1143],{"type":55,"tag":89,"props":1144,"children":1145},{},[1146],{"type":61,"value":1147},"items = AddOrUpdateTextBlocklistItemsOptions(\n",{"type":55,"tag":89,"props":1149,"children":1150},{"class":91,"line":398},[1151],{"type":55,"tag":89,"props":1152,"children":1153},{},[1154],{"type":61,"value":1155},"    blocklist_items=[\n",{"type":55,"tag":89,"props":1157,"children":1158},{"class":91,"line":407},[1159],{"type":55,"tag":89,"props":1160,"children":1161},{},[1162],{"type":61,"value":1163},"        TextBlocklistItem(text=\"blocked-term-1\"),\n",{"type":55,"tag":89,"props":1165,"children":1166},{"class":91,"line":417},[1167],{"type":55,"tag":89,"props":1168,"children":1169},{},[1170],{"type":61,"value":1171},"        TextBlocklistItem(text=\"blocked-term-2\")\n",{"type":55,"tag":89,"props":1173,"children":1174},{"class":91,"line":426},[1175],{"type":55,"tag":89,"props":1176,"children":1177},{},[1178],{"type":61,"value":1179},"    ]\n",{"type":55,"tag":89,"props":1181,"children":1182},{"class":91,"line":435},[1183],{"type":55,"tag":89,"props":1184,"children":1185},{},[1186],{"type":61,"value":971},{"type":55,"tag":89,"props":1188,"children":1189},{"class":91,"line":444},[1190],{"type":55,"tag":89,"props":1191,"children":1192},{"emptyLinePlaceholder":411},[1193],{"type":61,"value":414},{"type":55,"tag":89,"props":1195,"children":1196},{"class":91,"line":453},[1197],{"type":55,"tag":89,"props":1198,"children":1199},{},[1200],{"type":61,"value":1201},"result = blocklist_client.add_or_update_blocklist_items(\n",{"type":55,"tag":89,"props":1203,"children":1204},{"class":91,"line":462},[1205],{"type":55,"tag":89,"props":1206,"children":1207},{},[1208],{"type":61,"value":1209},"    blocklist_name=\"my-blocklist\",\n",{"type":55,"tag":89,"props":1211,"children":1212},{"class":91,"line":470},[1213],{"type":55,"tag":89,"props":1214,"children":1215},{},[1216],{"type":61,"value":1217},"    options=items\n",{"type":55,"tag":89,"props":1219,"children":1220},{"class":91,"line":479},[1221],{"type":55,"tag":89,"props":1222,"children":1223},{},[1224],{"type":61,"value":971},{"type":55,"tag":514,"props":1226,"children":1228},{"id":1227},"analyze-with-blocklist",[1229],{"type":61,"value":1230},"Analyze with Blocklist",{"type":55,"tag":77,"props":1232,"children":1234},{"className":366,"code":1233,"language":28,"meta":82,"style":82},"from azure.ai.contentsafety.models import AnalyzeTextOptions\n\nrequest = AnalyzeTextOptions(\n    text=\"Text containing blocked-term-1\",\n    blocklist_names=[\"my-blocklist\"],\n    halt_on_blocklist_hit=True\n)\n\nresponse = client.analyze_text(request)\n\nif response.blocklists_match:\n    for match in response.blocklists_match:\n        print(f\"Blocked: {match.blocklist_item_text}\")\n",[1235],{"type":55,"tag":85,"props":1236,"children":1237},{"__ignoreMap":82},[1238,1245,1252,1260,1268,1276,1284,1291,1298,1306,1313,1321,1329],{"type":55,"tag":89,"props":1239,"children":1240},{"class":91,"line":92},[1241],{"type":55,"tag":89,"props":1242,"children":1243},{},[1244],{"type":61,"value":404},{"type":55,"tag":89,"props":1246,"children":1247},{"class":91,"line":172},[1248],{"type":55,"tag":89,"props":1249,"children":1250},{"emptyLinePlaceholder":411},[1251],{"type":61,"value":414},{"type":55,"tag":89,"props":1253,"children":1254},{"class":91,"line":195},[1255],{"type":55,"tag":89,"props":1256,"children":1257},{},[1258],{"type":61,"value":1259},"request = AnalyzeTextOptions(\n",{"type":55,"tag":89,"props":1261,"children":1262},{"class":91,"line":398},[1263],{"type":55,"tag":89,"props":1264,"children":1265},{},[1266],{"type":61,"value":1267},"    text=\"Text containing blocked-term-1\",\n",{"type":55,"tag":89,"props":1269,"children":1270},{"class":91,"line":407},[1271],{"type":55,"tag":89,"props":1272,"children":1273},{},[1274],{"type":61,"value":1275},"    blocklist_names=[\"my-blocklist\"],\n",{"type":55,"tag":89,"props":1277,"children":1278},{"class":91,"line":417},[1279],{"type":55,"tag":89,"props":1280,"children":1281},{},[1282],{"type":61,"value":1283},"    halt_on_blocklist_hit=True\n",{"type":55,"tag":89,"props":1285,"children":1286},{"class":91,"line":426},[1287],{"type":55,"tag":89,"props":1288,"children":1289},{},[1290],{"type":61,"value":971},{"type":55,"tag":89,"props":1292,"children":1293},{"class":91,"line":435},[1294],{"type":55,"tag":89,"props":1295,"children":1296},{"emptyLinePlaceholder":411},[1297],{"type":61,"value":414},{"type":55,"tag":89,"props":1299,"children":1300},{"class":91,"line":444},[1301],{"type":55,"tag":89,"props":1302,"children":1303},{},[1304],{"type":61,"value":1305},"response = client.analyze_text(request)\n",{"type":55,"tag":89,"props":1307,"children":1308},{"class":91,"line":453},[1309],{"type":55,"tag":89,"props":1310,"children":1311},{"emptyLinePlaceholder":411},[1312],{"type":61,"value":414},{"type":55,"tag":89,"props":1314,"children":1315},{"class":91,"line":462},[1316],{"type":55,"tag":89,"props":1317,"children":1318},{},[1319],{"type":61,"value":1320},"if response.blocklists_match:\n",{"type":55,"tag":89,"props":1322,"children":1323},{"class":91,"line":470},[1324],{"type":55,"tag":89,"props":1325,"children":1326},{},[1327],{"type":61,"value":1328},"    for match in response.blocklists_match:\n",{"type":55,"tag":89,"props":1330,"children":1331},{"class":91,"line":479},[1332],{"type":55,"tag":89,"props":1333,"children":1334},{},[1335],{"type":61,"value":1336},"        print(f\"Blocked: {match.blocklist_item_text}\")\n",{"type":55,"tag":70,"props":1338,"children":1340},{"id":1339},"severity-levels",[1341],{"type":61,"value":1342},"Severity Levels",{"type":55,"tag":64,"props":1344,"children":1345},{},[1346],{"type":61,"value":1347},"Text analysis returns 4 severity levels (0, 2, 4, 6) by default. For 8 levels (0-7):",{"type":55,"tag":77,"props":1349,"children":1351},{"className":366,"code":1350,"language":28,"meta":82,"style":82},"from azure.ai.contentsafety.models import AnalyzeTextOptions, AnalyzeTextOutputType\n\nrequest = AnalyzeTextOptions(\n    text=\"Your text\",\n    output_type=AnalyzeTextOutputType.EIGHT_SEVERITY_LEVELS\n)\n",[1352],{"type":55,"tag":85,"props":1353,"children":1354},{"__ignoreMap":82},[1355,1363,1370,1377,1385,1393],{"type":55,"tag":89,"props":1356,"children":1357},{"class":91,"line":92},[1358],{"type":55,"tag":89,"props":1359,"children":1360},{},[1361],{"type":61,"value":1362},"from azure.ai.contentsafety.models import AnalyzeTextOptions, AnalyzeTextOutputType\n",{"type":55,"tag":89,"props":1364,"children":1365},{"class":91,"line":172},[1366],{"type":55,"tag":89,"props":1367,"children":1368},{"emptyLinePlaceholder":411},[1369],{"type":61,"value":414},{"type":55,"tag":89,"props":1371,"children":1372},{"class":91,"line":195},[1373],{"type":55,"tag":89,"props":1374,"children":1375},{},[1376],{"type":61,"value":1259},{"type":55,"tag":89,"props":1378,"children":1379},{"class":91,"line":398},[1380],{"type":55,"tag":89,"props":1381,"children":1382},{},[1383],{"type":61,"value":1384},"    text=\"Your text\",\n",{"type":55,"tag":89,"props":1386,"children":1387},{"class":91,"line":407},[1388],{"type":55,"tag":89,"props":1389,"children":1390},{},[1391],{"type":61,"value":1392},"    output_type=AnalyzeTextOutputType.EIGHT_SEVERITY_LEVELS\n",{"type":55,"tag":89,"props":1394,"children":1395},{"class":91,"line":417},[1396],{"type":55,"tag":89,"props":1397,"children":1398},{},[1399],{"type":61,"value":971},{"type":55,"tag":70,"props":1401,"children":1403},{"id":1402},"harm-categories",[1404],{"type":61,"value":1405},"Harm Categories",{"type":55,"tag":1407,"props":1408,"children":1409},"table",{},[1410,1429],{"type":55,"tag":1411,"props":1412,"children":1413},"thead",{},[1414],{"type":55,"tag":1415,"props":1416,"children":1417},"tr",{},[1418,1424],{"type":55,"tag":1419,"props":1420,"children":1421},"th",{},[1422],{"type":61,"value":1423},"Category",{"type":55,"tag":1419,"props":1425,"children":1426},{},[1427],{"type":61,"value":1428},"Description",{"type":55,"tag":1430,"props":1431,"children":1432},"tbody",{},[1433,1451,1468,1485],{"type":55,"tag":1415,"props":1434,"children":1435},{},[1436,1446],{"type":55,"tag":1437,"props":1438,"children":1439},"td",{},[1440],{"type":55,"tag":85,"props":1441,"children":1443},{"className":1442},[],[1444],{"type":61,"value":1445},"Hate",{"type":55,"tag":1437,"props":1447,"children":1448},{},[1449],{"type":61,"value":1450},"Attacks based on identity (race, religion, gender, etc.)",{"type":55,"tag":1415,"props":1452,"children":1453},{},[1454,1463],{"type":55,"tag":1437,"props":1455,"children":1456},{},[1457],{"type":55,"tag":85,"props":1458,"children":1460},{"className":1459},[],[1461],{"type":61,"value":1462},"Sexual",{"type":55,"tag":1437,"props":1464,"children":1465},{},[1466],{"type":61,"value":1467},"Sexual content, relationships, anatomy",{"type":55,"tag":1415,"props":1469,"children":1470},{},[1471,1480],{"type":55,"tag":1437,"props":1472,"children":1473},{},[1474],{"type":55,"tag":85,"props":1475,"children":1477},{"className":1476},[],[1478],{"type":61,"value":1479},"Violence",{"type":55,"tag":1437,"props":1481,"children":1482},{},[1483],{"type":61,"value":1484},"Physical harm, weapons, injury",{"type":55,"tag":1415,"props":1486,"children":1487},{},[1488,1497],{"type":55,"tag":1437,"props":1489,"children":1490},{},[1491],{"type":55,"tag":85,"props":1492,"children":1494},{"className":1493},[],[1495],{"type":61,"value":1496},"SelfHarm",{"type":55,"tag":1437,"props":1498,"children":1499},{},[1500],{"type":61,"value":1501},"Self-injury, suicide, eating disorders",{"type":55,"tag":70,"props":1503,"children":1505},{"id":1504},"severity-scale",[1506],{"type":61,"value":1507},"Severity Scale",{"type":55,"tag":1407,"props":1509,"children":1510},{},[1511,1537],{"type":55,"tag":1411,"props":1512,"children":1513},{},[1514],{"type":55,"tag":1415,"props":1515,"children":1516},{},[1517,1522,1527,1532],{"type":55,"tag":1419,"props":1518,"children":1519},{},[1520],{"type":61,"value":1521},"Level",{"type":55,"tag":1419,"props":1523,"children":1524},{},[1525],{"type":61,"value":1526},"Text Range",{"type":55,"tag":1419,"props":1528,"children":1529},{},[1530],{"type":61,"value":1531},"Image Range",{"type":55,"tag":1419,"props":1533,"children":1534},{},[1535],{"type":61,"value":1536},"Meaning",{"type":55,"tag":1430,"props":1538,"children":1539},{},[1540,1562,1584,1606],{"type":55,"tag":1415,"props":1541,"children":1542},{},[1543,1548,1553,1557],{"type":55,"tag":1437,"props":1544,"children":1545},{},[1546],{"type":61,"value":1547},"0",{"type":55,"tag":1437,"props":1549,"children":1550},{},[1551],{"type":61,"value":1552},"Safe",{"type":55,"tag":1437,"props":1554,"children":1555},{},[1556],{"type":61,"value":1552},{"type":55,"tag":1437,"props":1558,"children":1559},{},[1560],{"type":61,"value":1561},"No harmful content",{"type":55,"tag":1415,"props":1563,"children":1564},{},[1565,1570,1575,1579],{"type":55,"tag":1437,"props":1566,"children":1567},{},[1568],{"type":61,"value":1569},"2",{"type":55,"tag":1437,"props":1571,"children":1572},{},[1573],{"type":61,"value":1574},"Low",{"type":55,"tag":1437,"props":1576,"children":1577},{},[1578],{"type":61,"value":1574},{"type":55,"tag":1437,"props":1580,"children":1581},{},[1582],{"type":61,"value":1583},"Mild references",{"type":55,"tag":1415,"props":1585,"children":1586},{},[1587,1592,1597,1601],{"type":55,"tag":1437,"props":1588,"children":1589},{},[1590],{"type":61,"value":1591},"4",{"type":55,"tag":1437,"props":1593,"children":1594},{},[1595],{"type":61,"value":1596},"Medium",{"type":55,"tag":1437,"props":1598,"children":1599},{},[1600],{"type":61,"value":1596},{"type":55,"tag":1437,"props":1602,"children":1603},{},[1604],{"type":61,"value":1605},"Moderate content",{"type":55,"tag":1415,"props":1607,"children":1608},{},[1609,1614,1619,1623],{"type":55,"tag":1437,"props":1610,"children":1611},{},[1612],{"type":61,"value":1613},"6",{"type":55,"tag":1437,"props":1615,"children":1616},{},[1617],{"type":61,"value":1618},"High",{"type":55,"tag":1437,"props":1620,"children":1621},{},[1622],{"type":61,"value":1618},{"type":55,"tag":1437,"props":1624,"children":1625},{},[1626],{"type":61,"value":1627},"Severe content",{"type":55,"tag":70,"props":1629,"children":1631},{"id":1630},"client-types",[1632],{"type":61,"value":1633},"Client Types",{"type":55,"tag":1407,"props":1635,"children":1636},{},[1637,1653],{"type":55,"tag":1411,"props":1638,"children":1639},{},[1640],{"type":55,"tag":1415,"props":1641,"children":1642},{},[1643,1648],{"type":55,"tag":1419,"props":1644,"children":1645},{},[1646],{"type":61,"value":1647},"Client",{"type":55,"tag":1419,"props":1649,"children":1650},{},[1651],{"type":61,"value":1652},"Purpose",{"type":55,"tag":1430,"props":1654,"children":1655},{},[1656,1673],{"type":55,"tag":1415,"props":1657,"children":1658},{},[1659,1668],{"type":55,"tag":1437,"props":1660,"children":1661},{},[1662],{"type":55,"tag":85,"props":1663,"children":1665},{"className":1664},[],[1666],{"type":61,"value":1667},"ContentSafetyClient",{"type":55,"tag":1437,"props":1669,"children":1670},{},[1671],{"type":61,"value":1672},"Analyze text and images",{"type":55,"tag":1415,"props":1674,"children":1675},{},[1676,1684],{"type":55,"tag":1437,"props":1677,"children":1678},{},[1679],{"type":55,"tag":85,"props":1680,"children":1682},{"className":1681},[],[1683],{"type":61,"value":629},{"type":55,"tag":1437,"props":1685,"children":1686},{},[1687],{"type":61,"value":1688},"Manage custom blocklists",{"type":55,"tag":70,"props":1690,"children":1692},{"id":1691},"best-practices",[1693],{"type":61,"value":1694},"Best Practices",{"type":55,"tag":241,"props":1696,"children":1697},{},[1698,1724,1772,1782,1792,1802,1812,1822,1832],{"type":55,"tag":245,"props":1699,"children":1700},{},[1701,1706,1708,1714,1716,1722],{"type":55,"tag":235,"props":1702,"children":1703},{},[1704],{"type":61,"value":1705},"Pick sync OR async and stay consistent.",{"type":61,"value":1707}," Do not mix ",{"type":55,"tag":85,"props":1709,"children":1711},{"className":1710},[],[1712],{"type":61,"value":1713},"azure.ai.contentsafety",{"type":61,"value":1715}," sync clients with ",{"type":55,"tag":85,"props":1717,"children":1719},{"className":1718},[],[1720],{"type":61,"value":1721},"azure.ai.contentsafety.aio",{"type":61,"value":1723}," async clients in the same call path. Choose one mode per module.",{"type":55,"tag":245,"props":1725,"children":1726},{},[1727,1732,1734,1740,1742,1748,1750,1755,1757,1762,1764,1770],{"type":55,"tag":235,"props":1728,"children":1729},{},[1730],{"type":61,"value":1731},"Always use context managers for clients and async credentials.",{"type":61,"value":1733}," Wrap every client in ",{"type":55,"tag":85,"props":1735,"children":1737},{"className":1736},[],[1738],{"type":61,"value":1739},"with ContentSafetyClient(...) as client:",{"type":61,"value":1741}," (sync) or ",{"type":55,"tag":85,"props":1743,"children":1745},{"className":1744},[],[1746],{"type":61,"value":1747},"async with ContentSafetyClient(...) as client:",{"type":61,"value":1749}," (async). For async ",{"type":55,"tag":85,"props":1751,"children":1753},{"className":1752},[],[1754],{"type":61,"value":258},{"type":61,"value":1756}," from ",{"type":55,"tag":85,"props":1758,"children":1760},{"className":1759},[],[1761],{"type":61,"value":356},{"type":61,"value":1763},", also use ",{"type":55,"tag":85,"props":1765,"children":1767},{"className":1766},[],[1768],{"type":61,"value":1769},"async with credential:",{"type":61,"value":1771}," so tokens and transports are cleaned up.",{"type":55,"tag":245,"props":1773,"children":1774},{},[1775,1780],{"type":55,"tag":235,"props":1776,"children":1777},{},[1778],{"type":61,"value":1779},"Use blocklists",{"type":61,"value":1781}," for domain-specific terms",{"type":55,"tag":245,"props":1783,"children":1784},{},[1785,1790],{"type":55,"tag":235,"props":1786,"children":1787},{},[1788],{"type":61,"value":1789},"Set severity thresholds",{"type":61,"value":1791}," appropriate for your use case",{"type":55,"tag":245,"props":1793,"children":1794},{},[1795,1800],{"type":55,"tag":235,"props":1796,"children":1797},{},[1798],{"type":61,"value":1799},"Handle multiple categories",{"type":61,"value":1801}," — content can be harmful in multiple ways",{"type":55,"tag":245,"props":1803,"children":1804},{},[1805,1810],{"type":55,"tag":235,"props":1806,"children":1807},{},[1808],{"type":61,"value":1809},"Use halt_on_blocklist_hit",{"type":61,"value":1811}," for immediate rejection",{"type":55,"tag":245,"props":1813,"children":1814},{},[1815,1820],{"type":55,"tag":235,"props":1816,"children":1817},{},[1818],{"type":61,"value":1819},"Log analysis results",{"type":61,"value":1821}," for audit and improvement",{"type":55,"tag":245,"props":1823,"children":1824},{},[1825,1830],{"type":55,"tag":235,"props":1826,"children":1827},{},[1828],{"type":61,"value":1829},"Consider 8-severity mode",{"type":61,"value":1831}," for finer-grained control",{"type":55,"tag":245,"props":1833,"children":1834},{},[1835,1840],{"type":55,"tag":235,"props":1836,"children":1837},{},[1838],{"type":61,"value":1839},"Pre-moderate AI outputs",{"type":61,"value":1841}," before showing to users",{"type":55,"tag":70,"props":1843,"children":1845},{"id":1844},"reference-files",[1846],{"type":61,"value":1847},"Reference Files",{"type":55,"tag":1407,"props":1849,"children":1850},{},[1851,1867],{"type":55,"tag":1411,"props":1852,"children":1853},{},[1854],{"type":55,"tag":1415,"props":1855,"children":1856},{},[1857,1862],{"type":55,"tag":1419,"props":1858,"children":1859},{},[1860],{"type":61,"value":1861},"File",{"type":55,"tag":1419,"props":1863,"children":1864},{},[1865],{"type":61,"value":1866},"Contents",{"type":55,"tag":1430,"props":1868,"children":1869},{},[1870,1887],{"type":55,"tag":1415,"props":1871,"children":1872},{},[1873,1882],{"type":55,"tag":1437,"props":1874,"children":1875},{},[1876],{"type":55,"tag":1877,"props":1878,"children":1880},"a",{"href":1879},"references\u002Fcapabilities.md",[1881],{"type":61,"value":1879},{"type":55,"tag":1437,"props":1883,"children":1884},{},[1885],{"type":61,"value":1886},"Additional non-hero capabilities, operation-group coverage, and production checklists.",{"type":55,"tag":1415,"props":1888,"children":1889},{},[1890,1898],{"type":55,"tag":1437,"props":1891,"children":1892},{},[1893],{"type":55,"tag":1877,"props":1894,"children":1896},{"href":1895},"references\u002Fnon-hero-scenarios.md",[1897],{"type":61,"value":1895},{"type":55,"tag":1437,"props":1899,"children":1900},{},[1901],{"type":61,"value":1902},"Dedicated non-hero examples for secondary\u002Fadvanced scenarios.",{"type":55,"tag":1904,"props":1905,"children":1906},"style",{},[1907],{"type":61,"value":1908},"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":1910,"total":2007},[1911,1925,1946,1959,1968,1979,1992],{"slug":1912,"name":1912,"fn":1913,"description":1914,"org":1915,"tags":1916,"stars":29,"repoUrl":30,"updatedAt":1924},"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},[1917,1920,1922,1923],{"name":1918,"slug":1919,"type":15},".NET","net",{"name":1921,"slug":36,"type":15},"Agents",{"name":17,"slug":18,"type":15},{"name":23,"slug":24,"type":15},"2026-07-03T16:32:10.297433",{"slug":1926,"name":1926,"fn":1927,"description":1928,"org":1929,"tags":1930,"stars":29,"repoUrl":30,"updatedAt":1945},"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},[1931,1934,1935,1938,1941,1942],{"name":1932,"slug":1933,"type":15},"Analytics","analytics",{"name":17,"slug":18,"type":15},{"name":1936,"slug":1937,"type":15},"Data Analysis","data-analysis",{"name":1939,"slug":1940,"type":15},"Java","java",{"name":9,"slug":8,"type":15},{"name":1943,"slug":1944,"type":15},"Monitoring","monitoring","2026-05-13T06:14:16.261754",{"slug":1947,"name":1947,"fn":1948,"description":1949,"org":1950,"tags":1951,"stars":29,"repoUrl":30,"updatedAt":1958},"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},[1952,1955,1956,1957],{"name":1953,"slug":1954,"type":15},"AI Infrastructure","ai-infrastructure",{"name":17,"slug":18,"type":15},{"name":1939,"slug":1940,"type":15},{"name":13,"slug":14,"type":15},"2026-07-07T06:53:31.293235",{"slug":4,"name":4,"fn":5,"description":6,"org":1960,"tags":1961,"stars":29,"repoUrl":30,"updatedAt":31},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1962,1963,1964,1965,1966,1967],{"name":17,"slug":18,"type":15},{"name":20,"slug":21,"type":15},{"name":23,"slug":24,"type":15},{"name":9,"slug":8,"type":15},{"name":27,"slug":28,"type":15},{"name":13,"slug":14,"type":15},{"slug":1969,"name":1969,"fn":1970,"description":1971,"org":1972,"tags":1973,"stars":29,"repoUrl":30,"updatedAt":1978},"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},[1974,1975,1976,1977],{"name":1932,"slug":1933,"type":15},{"name":17,"slug":18,"type":15},{"name":23,"slug":24,"type":15},{"name":27,"slug":28,"type":15},"2026-07-31T05:54:29.068751",{"slug":1980,"name":1980,"fn":1981,"description":1982,"org":1983,"tags":1984,"stars":29,"repoUrl":30,"updatedAt":1991},"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},[1985,1988,1989,1990],{"name":1986,"slug":1987,"type":15},"API Development","api-development",{"name":17,"slug":18,"type":15},{"name":9,"slug":8,"type":15},{"name":27,"slug":28,"type":15},"2026-07-18T05:14:16.988376",{"slug":1993,"name":1993,"fn":1994,"description":1995,"org":1996,"tags":1997,"stars":29,"repoUrl":30,"updatedAt":2006},"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},[1998,1999,2002,2005],{"name":17,"slug":18,"type":15},{"name":2000,"slug":2001,"type":15},"Computer Vision","computer-vision",{"name":2003,"slug":2004,"type":15},"Images","images",{"name":27,"slug":28,"type":15},"2026-07-18T05:14:18.007737",38,{"items":2009,"total":2144},[2010,2032,2039,2048,2055,2064,2071,2078,2085,2100,2119,2132],{"slug":2011,"name":2011,"fn":2012,"description":2013,"org":2014,"tags":2015,"stars":2029,"repoUrl":2030,"updatedAt":2031},"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},[2016,2019,2022,2023,2026],{"name":2017,"slug":2018,"type":15},"Engineering","engineering",{"name":2020,"slug":2021,"type":15},"Local Development","local-development",{"name":9,"slug":8,"type":15},{"name":2024,"slug":2025,"type":15},"Project Management","project-management",{"name":2027,"slug":2028,"type":15},"Rush","rush",6484,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Frushstack","2026-04-06T18:34:44.965032",{"slug":1912,"name":1912,"fn":1913,"description":1914,"org":2033,"tags":2034,"stars":29,"repoUrl":30,"updatedAt":1924},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2035,2036,2037,2038],{"name":1918,"slug":1919,"type":15},{"name":1921,"slug":36,"type":15},{"name":17,"slug":18,"type":15},{"name":23,"slug":24,"type":15},{"slug":1926,"name":1926,"fn":1927,"description":1928,"org":2040,"tags":2041,"stars":29,"repoUrl":30,"updatedAt":1945},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2042,2043,2044,2045,2046,2047],{"name":1932,"slug":1933,"type":15},{"name":17,"slug":18,"type":15},{"name":1936,"slug":1937,"type":15},{"name":1939,"slug":1940,"type":15},{"name":9,"slug":8,"type":15},{"name":1943,"slug":1944,"type":15},{"slug":1947,"name":1947,"fn":1948,"description":1949,"org":2049,"tags":2050,"stars":29,"repoUrl":30,"updatedAt":1958},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2051,2052,2053,2054],{"name":1953,"slug":1954,"type":15},{"name":17,"slug":18,"type":15},{"name":1939,"slug":1940,"type":15},{"name":13,"slug":14,"type":15},{"slug":4,"name":4,"fn":5,"description":6,"org":2056,"tags":2057,"stars":29,"repoUrl":30,"updatedAt":31},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2058,2059,2060,2061,2062,2063],{"name":17,"slug":18,"type":15},{"name":20,"slug":21,"type":15},{"name":23,"slug":24,"type":15},{"name":9,"slug":8,"type":15},{"name":27,"slug":28,"type":15},{"name":13,"slug":14,"type":15},{"slug":1969,"name":1969,"fn":1970,"description":1971,"org":2065,"tags":2066,"stars":29,"repoUrl":30,"updatedAt":1978},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2067,2068,2069,2070],{"name":1932,"slug":1933,"type":15},{"name":17,"slug":18,"type":15},{"name":23,"slug":24,"type":15},{"name":27,"slug":28,"type":15},{"slug":1980,"name":1980,"fn":1981,"description":1982,"org":2072,"tags":2073,"stars":29,"repoUrl":30,"updatedAt":1991},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2074,2075,2076,2077],{"name":1986,"slug":1987,"type":15},{"name":17,"slug":18,"type":15},{"name":9,"slug":8,"type":15},{"name":27,"slug":28,"type":15},{"slug":1993,"name":1993,"fn":1994,"description":1995,"org":2079,"tags":2080,"stars":29,"repoUrl":30,"updatedAt":2006},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2081,2082,2083,2084],{"name":17,"slug":18,"type":15},{"name":2000,"slug":2001,"type":15},{"name":2003,"slug":2004,"type":15},{"name":27,"slug":28,"type":15},{"slug":2086,"name":2086,"fn":2087,"description":2088,"org":2089,"tags":2090,"stars":29,"repoUrl":30,"updatedAt":2099},"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},[2091,2092,2095,2098],{"name":17,"slug":18,"type":15},{"name":2093,"slug":2094,"type":15},"Configuration","configuration",{"name":2096,"slug":2097,"type":15},"Feature Flags","feature-flags",{"name":1939,"slug":1940,"type":15},"2026-07-03T16:32:01.278468",{"slug":2101,"name":2101,"fn":2102,"description":2103,"org":2104,"tags":2105,"stars":29,"repoUrl":30,"updatedAt":2118},"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},[2106,2109,2112,2115],{"name":2107,"slug":2108,"type":15},"Cosmos DB","cosmos-db",{"name":2110,"slug":2111,"type":15},"Database","database",{"name":2113,"slug":2114,"type":15},"NoSQL","nosql",{"name":2116,"slug":2117,"type":15},"Rust","rust","2026-07-31T05:54:27.021432",{"slug":2120,"name":2120,"fn":2102,"description":2121,"org":2122,"tags":2123,"stars":29,"repoUrl":30,"updatedAt":2131},"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},[2124,2125,2126,2127,2128],{"name":2107,"slug":2108,"type":15},{"name":2110,"slug":2111,"type":15},{"name":9,"slug":8,"type":15},{"name":2113,"slug":2114,"type":15},{"name":2129,"slug":2130,"type":15},"TypeScript","typescript","2026-07-03T16:31:19.368382",{"slug":2133,"name":2133,"fn":2134,"description":2135,"org":2136,"tags":2137,"stars":29,"repoUrl":30,"updatedAt":2143},"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},[2138,2139,2140,2141,2142],{"name":17,"slug":18,"type":15},{"name":2107,"slug":2108,"type":15},{"name":2110,"slug":2111,"type":15},{"name":1939,"slug":1940,"type":15},{"name":2113,"slug":2114,"type":15},"2026-05-13T06:14:17.582229",267]