---
title: "Azure AI Content Safety REST SDK for TypeScript: review, setup & limitations · Undominated.ai"
canonical: https://undominated.ai/skills/microsoft-azure-ai-contentsafety-ts/
description: "Microsoft's TypeScript guide to the @azure-rest/ai-content-safety REST client: scoring text and images for hate, sexual, violence and self-harm severity, managing custom blocklists, and folding the results into one allow-or-block decision."
---

# Azure AI Content Safety REST SDK for TypeScript: review, setup & limitations · Undominated.ai

> Microsoft's TypeScript guide to the @azure-rest/ai-content-safety REST client: scoring text and images for hate, sexual, violence and self-harm severity, managing custom blocklists, and folding the results into one allow-or-block decision.

[← Explore all skills](/skills/)

CONTENT MODERATION / Microsoft

# Azure AI Content Safety REST SDK for TypeScript

Microsoft's TypeScript guide to the @azure-rest/ai-content-safety REST client: scoring text and images for hate, sexual, violence and self-harm severity, managing custom blocklists, and folding the results into one allow-or-block decision.

 [See setup guidance ↓](#setup)[Original source ↗](https://github.com/microsoft/skills/tree/fc164ba1d7a0c10377dbcc1c9ac07253b9329fdb/.github/plugins/azure-sdk-typescript/skills/azure-ai-contentsafety-ts)

SOURCE REVIEW

 Reviewed 2026-10-21
 Evidence 6 linked sources
 Publisher Microsoft
 Licence [MIT ↗](https://github.com/microsoft/skills/blob/fc164ba1d7a0c10377dbcc1c9ac07253b9329fdb/LICENSE)
 Revision fc164ba1d7a0
 [Read what was—and wasn’t—checked ↓](#review)

“Analyze text and images for harmful content using Azure AI Content Safety (@azure-rest/ai-content-safety). Use when moderating user-generated content, detecting hate speech, violence, sexual content, or self-harm, or managing custom blocklists.”

 [Microsoft · upstream description ↗](https://github.com/microsoft/skills/blob/fc164ba1d7a0c10377dbcc1c9ac07253b9329fdb/.github/plugins/azure-sdk-typescript/skills/azure-ai-contentsafety-ts/SKILL.md) Our analysis follows below.

01 / THE REASONING

## Why this made the selection.

 - It warns that ContentSafetyClient is a function, not a class, and checks isUnexpected() after each call whose response body it reads.
- It maps severity levels to actions (0 allow, 2 review or allow with warning, 4 block or require human review, 6 block immediately) and explains FourSeverityLevels (the default: 0, 2, 4, 6) and EightSeverityLevels (0-7).
- It tabulates the REST paths it uses, including blocklist item add and remove, and gives a moderateContent helper that refuses content above a severity threshold or with any blocklist match.

### A good fit for

 - Moderate user-generated text in a Node.js backend against a chosen severity threshold
- Check a local image (sent as base64) or an image at a blob URL for harmful content
- Create a custom blocklist, add terms to it and report which terms a text matched
- Return one allow-or-block result with the flagged categories, highest severity and blocklist matches

### Weigh up before choosing

 - Both install lines Microsoft prints for this skill, `npx skills add microsoft/skills --skill azure-sdk-typescript` and `/plugin install azure-sdk-typescript@skills`, install the whole azure-sdk-typescript plugin rather than the Content Safety skill alone.
- The file shows API-key authentication with CONTENT_SAFETY_KEY first and DefaultAzureCredential second, and does not say which to prefer.
- Blocklist create, add and delete samples have no confirmation or dry-run step, and the delete call does not check its response.
- The file does not say how long a blocklist change takes to apply.
- The azure-ai-contentsafety-ts directory holds SKILL.md only and was last changed at the pin by commit ee33ce9d, committed 2026-04-21 (2026-04-22T00:13:36Z UTC).

02 / THE REVIEW RECORD

## What we actually inspected.

Source review has boundaries. A clear record is more useful than a “safe” badge.

### Material inspected

 - .github/plugins/azure-sdk-typescript/skills/azure-ai-contentsafety-ts/SKILL.md (all 311 lines)
- .github/plugins/azure-sdk-typescript/README.md
- .github/plugins/azure-sdk-typescript/.claude-plugin/plugin.json
- README.md
- LICENSE

### Our findings

 - The Installation line adds @azure-rest/ai-content-safety, @azure/identity and @azure/core-auth.
- The harm categories are Hate, Sexual, Violence and SelfHarm, each with a one-line description.
- The practice list says to set thresholds per category, use blocklists for domain-specific terms and log moderation decisions as an audit trail.
- CONTENT_SAFETY_ENDPOINT and CONTENT_SAFETY_KEY are listed, plus AZURE_TOKEN_CREDENTIALS, marked required only if DefaultAzureCredential is used in production.
- The frontmatter declares license MIT, author Microsoft, version 1.0.0 and package @azure-rest/ai-content-safety. It declares no allowed-tools.

### Not established by this review

 - No text or image was analysed, and no blocklist was created, changed or deleted.
- @azure-rest/ai-content-safety, @azure/identity and @azure/core-auth were not installed from npm.
- Neither the azure-sdk-typescript plugin nor azure-ai-contentsafety-ts was installed.
- Not executed: it was not installed or run.

The review applies to the material and revision named here. A newer upstream release can change its behavior.

03 / PUT IT TO WORK

## Add a skill to your workflow.

[Upstream setup instructions ↗](https://github.com/microsoft/skills/blob/fc164ba1d7a0c10377dbcc1c9ac07253b9329fdb/.github/plugins/azure-sdk-typescript/README.md)
 - The azure-sdk-typescript plugin README prints `npx skills add microsoft/skills --skill azure-sdk-typescript` under Install. It installs the whole azure-sdk-typescript plugin, whose skill table lists azure-ai-contentsafety-ts; it does not install that skill alone.
- The same README prints `/plugin install azure-sdk-typescript@skills`, which also brings in azure-ai-contentsafety-ts together with every other skill in the plugin. The repository README runs plugin commands inside Copilot CLI after `/plugin marketplace add microsoft/skills`.

### Before you start

 - The skill prints `npm install @azure-rest/ai-content-safety @azure/identity @azure/core-auth`. This review did not run it.
- A Content Safety resource at CONTENT_SAFETY_ENDPOINT, with CONTENT_SAFETY_KEY for key authentication or an Entra credential for DefaultAzureCredential (AZURE_TOKEN_CREDENTIALS in production).
- Copilot CLI, where `/plugin install azure-sdk-typescript@skills` adds this Content Safety skill with the rest of the plugin.

### Compatibility

Copilot CLI · GitHub Copilot in VS Code

### Implementation

TypeScript

### Reference text; text and images reach Content Safety only from code an operator runs

 - The azure-ai-contentsafety-ts frontmatter declares no allowed-tools, and its directory holds SKILL.md alone, with no scripts.
- Samples send text, a local ./image.png encoded as base64, or an image blob URL to the resource at CONTENT_SAFETY_ENDPOINT (https://<resource>.cognitiveservices.azure.com).
- Blocklist samples create my-blocklist, add items, list blocklists and delete my-blocklist on that resource.
- They authenticate with CONTENT_SAFETY_KEY through AzureKeyCredential or with DefaultAzureCredential.

### Cost model

Free to copy under MIT. The file states no price for Content Safety analysis or blocklist calls, and this review looked none up.

04 / FOLLOW THE EVIDENCE

## The source trail.

Our notes are separate from the original resource. Check upstream before adopting a new version.

 - [azure-ai-contentsafety-ts SKILL.md at the pin ↗](https://github.com/microsoft/skills/blob/fc164ba1d7a0c10377dbcc1c9ac07253b9329fdb/.github/plugins/azure-sdk-typescript/skills/azure-ai-contentsafety-ts/SKILL.md) Checked 2026-10-21 https://github.com/microsoft/skills/blob/fc164ba1d7a0c10377dbcc1c9ac07253b9329fdb/.github/plugins/azure-sdk-typescript/skills/azure-ai-contentsafety-ts/SKILL.md Supports: name, upstreamDescription, summary, whySelected, bestFor, limitations, review.findings, install.prerequisites, access.permissions
- [azure-sdk-typescript plugin README ↗](https://github.com/microsoft/skills/blob/fc164ba1d7a0c10377dbcc1c9ac07253b9329fdb/.github/plugins/azure-sdk-typescript/README.md) Checked 2026-10-21 https://github.com/microsoft/skills/blob/fc164ba1d7a0c10377dbcc1c9ac07253b9329fdb/.github/plugins/azure-sdk-typescript/README.md Supports: install.sourceUrl, install.steps, limitations (install scope)
- [azure-sdk-typescript plugin.json ↗](https://github.com/microsoft/skills/blob/fc164ba1d7a0c10377dbcc1c9ac07253b9329fdb/.github/plugins/azure-sdk-typescript/.claude-plugin/plugin.json) Checked 2026-10-21 https://github.com/microsoft/skills/blob/fc164ba1d7a0c10377dbcc1c9ac07253b9329fdb/.github/plugins/azure-sdk-typescript/.claude-plugin/plugin.json Supports: publisher, license (plugin licence field)
- [Repository README ↗](https://github.com/microsoft/skills/blob/fc164ba1d7a0c10377dbcc1c9ac07253b9329fdb/README.md) Checked 2026-10-21 https://github.com/microsoft/skills/blob/fc164ba1d7a0c10377dbcc1c9ac07253b9329fdb/README.md Supports: compatibility, install.steps (Copilot CLI plugin commands)
- [Repository LICENSE ↗](https://github.com/microsoft/skills/blob/fc164ba1d7a0c10377dbcc1c9ac07253b9329fdb/LICENSE) Checked 2026-10-21 https://github.com/microsoft/skills/blob/fc164ba1d7a0c10377dbcc1c9ac07253b9329fdb/LICENSE Supports: license
- [Commit ee33ce9d, the last change to azure-ai-contentsafety-ts at the pin ↗](https://github.com/microsoft/skills/commit/ee33ce9d2b4372b0cfe58375bebbf0bd989e3ac9) Checked 2026-10-21 https://github.com/microsoft/skills/commit/ee33ce9d2b4372b0cfe58375bebbf0bd989e3ac9 Supports: limitations (last commit date)

KEEP COMPARING

## Other approaches to consider.

Related by category or shared topics. These are alternatives to inspect, not a measured quality order.

 [### Azure AI Content Safety SDK for Java ↗ Microsoft's Java guide to com.azure:azure-ai-contentsafety at 1.1.0-beta.1: text and image harm analysis with ContentSafetyClient, and blocklist management with BlocklistClient.](/skills/microsoft-azure-ai-contentsafety-java/)[### Azure AI Content Safety for Python ↗ Pins Microsoft's Python Content Safety skill, which keeps new code on Entra credentials and can stop analysis when a blocklist matches.](/skills/microsoft-azure-ai-contentsafety-py/)[### Azure Key Vault Keys SDK for TypeScript ↗ Microsoft's TypeScript guide to @azure/keyvault-keys for creating, rotating and deleting Key Vault keys and for encrypt, sign and wrap operations through CryptographyClient; the same file also carries secret operations.](/skills/microsoft-azure-keyvault-keys-ts/)

 [AI Tools ↗](/tools/)[Skills ↗](/skills/)[Agents ↗](/agents/)[MCP Servers ↗](/mcp-servers/)[Workflows ↗](/workflows/)

## Continue your investigation

 - [Choose a toolkit](/tools/)
- [Inspect execution hosts](/agents/)
- [Check tool access](/mcp-servers/)
- [Check project dependencies](/check-repo/)
