Skip to main content

Dogwhistle Detection

Analyzes a comment to detect potential dogwhistles - coded language that appears innocuous to the general population but conveys hidden meanings to specific groups. This endpoint can help identify subtle forms of harmful or discriminatory content that might bypass traditional content moderation.

The analysis considers the article context and can optionally focus on specific sensitive topics or known dogwhistle examples. The response includes confidence levels and detailed breakdowns when dogwhistles are detected.

Header Parameters
X-User-Email email REQUIRED

Account email address, for authentication

X-API-Key string REQUIRED

API key owned by the user (email), for authentication

Request Body REQUIRED
article_context_id uuid REQUIRED

UUID that identifies the article context for the comment analysis.

comment string REQUIRED

The comment text to analyze for dogwhistles.

sensitive_topics string[]

Optional list of sensitive topics to focus the analysis on.

dogwhistle_examples string[]

Optional list of specific dogwhistle examples to look for.

Responses
200

Successful response - returns JSON result from dogwhistle detection analysis.

Schema OPTIONAL
detection object

Main detection results and analysis.

reasoning string

Explanation of the analysis and reasoning behind the detection.

dogwhistles_detected boolean

Whether dogwhistles were found in the comment.

confidence number

Possible values: value ≤ 1

Confidence level of the detection (0.0 to 1.0).

details object OPTIONAL

Optional detailed information about detected dogwhistles.

dogwhistle_terms string[] OPTIONAL

Specific terms or phrases detected as potential dogwhistles.

categories string[] OPTIONAL

Categories or types of dogwhistles detected.

subtlety_level number OPTIONAL

Possible values: value ≤ 1

How subtle the dogwhistles are (0.0 = obvious, 1.0 = very subtle).

harm_potential number OPTIONAL

Possible values: value ≤ 1

Potential harm level of the detected content (0.0 = low, 1.0 = high).

400

Bad Request - Missing or invalid parameters.

401

Unauthorized - Missing or incorrect authentication.

415

Unsupported Media Type

500

Internal Server Error