Language

ContentSafetyClient Class

Definition

The ContentSafetyClient.

public class ContentSafetyClient
type ContentSafetyClient = class
Public Class ContentSafetyClient
Inheritance
ContentSafetyClient

Constructors

Name Description
ContentSafetyClient()

Initializes a new instance of ContentSafetyClient for mocking.

ContentSafetyClient(ContentSafetyClientSettings)

Initializes a new instance of ContentSafetyClient from a ContentSafetyClientSettings.

ContentSafetyClient(Uri, AzureKeyCredential, ContentSafetyClientOptions)

Initializes a new instance of ContentSafetyClient.

ContentSafetyClient(Uri, AzureKeyCredential)

Initializes a new instance of ContentSafetyClient.

ContentSafetyClient(Uri, TokenCredential, ContentSafetyClientOptions)

Initializes a new instance of ContentSafetyClient.

ContentSafetyClient(Uri, TokenCredential)

Initializes a new instance of ContentSafetyClient.

Properties

Name Description
Pipeline

The HTTP pipeline for sending and receiving REST requests and responses.

Methods

Name Description
AnalyzeImage(AnalyzeImageOptions, CancellationToken)

A synchronous API for the analysis of potentially harmful image content. Currently, it supports four categories: Hate, SelfHarm, Sexual, and Violence.

AnalyzeImage(BinaryData, CancellationToken)

Analyze Image with Binary Data.

AnalyzeImage(RequestContent, RequestContext)

[Protocol Method] A synchronous API for the analysis of potentially harmful image content. Currently, it supports four categories: Hate, SelfHarm, Sexual, and Violence.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
AnalyzeImage(Uri, CancellationToken)

Analyze Image with Blob URI.

AnalyzeImageAsync(AnalyzeImageOptions, CancellationToken)

A synchronous API for the analysis of potentially harmful image content. Currently, it supports four categories: Hate, SelfHarm, Sexual, and Violence.

AnalyzeImageAsync(BinaryData, CancellationToken)

Analyze Image with Binary Data Async.

AnalyzeImageAsync(RequestContent, RequestContext)

[Protocol Method] A synchronous API for the analysis of potentially harmful image content. Currently, it supports four categories: Hate, SelfHarm, Sexual, and Violence.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
AnalyzeImageAsync(Uri, CancellationToken)

Analyze Image with Blob URI Async.

AnalyzeText(AnalyzeTextOptions, CancellationToken)

A synchronous API for the analysis of potentially harmful text content. Currently, it supports four categories: Hate, SelfHarm, Sexual, and Violence.

AnalyzeText(RequestContent, RequestContext)

[Protocol Method] A synchronous API for the analysis of potentially harmful text content. Currently, it supports four categories: Hate, SelfHarm, Sexual, and Violence.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
AnalyzeText(String, CancellationToken)

Analyze Text.

AnalyzeTextAsync(AnalyzeTextOptions, CancellationToken)

A synchronous API for the analysis of potentially harmful text content. Currently, it supports four categories: Hate, SelfHarm, Sexual, and Violence.

AnalyzeTextAsync(RequestContent, RequestContext)

[Protocol Method] A synchronous API for the analysis of potentially harmful text content. Currently, it supports four categories: Hate, SelfHarm, Sexual, and Violence.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
AnalyzeTextAsync(String, CancellationToken)

Analyze Text Async.

DetectTextProtectedMaterial(DetectTextProtectedMaterialOptions, CancellationToken)

A synchronous API for detecting protected material in the given text.

DetectTextProtectedMaterial(RequestContent, RequestContext)

[Protocol Method] A synchronous API for detecting protected material in the given text.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
DetectTextProtectedMaterialAsync(DetectTextProtectedMaterialOptions, CancellationToken)

A synchronous API for detecting protected material in the given text.

DetectTextProtectedMaterialAsync(RequestContent, RequestContext)

[Protocol Method] A synchronous API for detecting protected material in the given text.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
ShieldPrompt(RequestContent, RequestContext)

[Protocol Method] A synchronous API for shielding prompt from direct and indirect injection attacks.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
ShieldPrompt(ShieldPromptOptions, CancellationToken)

A synchronous API for shielding prompt from direct and indirect injection attacks.

ShieldPromptAsync(RequestContent, RequestContext)

[Protocol Method] A synchronous API for shielding prompt from direct and indirect injection attacks.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
ShieldPromptAsync(ShieldPromptOptions, CancellationToken)

A synchronous API for shielding prompt from direct and indirect injection attacks.

UnifiedModerate(RequestContent, RequestContext)

[Protocol Method] A synchronous API that evaluates input, output, a proposed tool call, or a completed tool result against an applicable Agent Control Specification policy and returns the enforced content and policy verdict.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
UnifiedModerate(UnifiedModerateConfig, CancellationToken)

A synchronous API that evaluates input, output, a proposed tool call, or a completed tool result against an applicable Agent Control Specification policy and returns the enforced content and policy verdict.

UnifiedModerateAsync(RequestContent, RequestContext)

[Protocol Method] A synchronous API that evaluates input, output, a proposed tool call, or a completed tool result against an applicable Agent Control Specification policy and returns the enforced content and policy verdict.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
UnifiedModerateAsync(UnifiedModerateConfig, CancellationToken)

A synchronous API that evaluates input, output, a proposed tool call, or a completed tool result against an applicable Agent Control Specification policy and returns the enforced content and policy verdict.

Applies to