Skip to main content
POST
cURL
This is the core endpoint for content moderation and analytics — send your content using the OpenAI-like message format and receive instant feedback on policy violations. Metrics are computed for each request in the background.

How It Works

  1. You submit content as one or more messages
  2. White Circle analyzes the content against all policies in your deployment
  3. You receive a response indicating which (if any) policies got flagged
Each check is associated with a session. Sessions help you track content over time and enable features like context merging.
Policies and metrics are evaluated against only the last message in the messages array. All preceding messages provide context for the evaluation but are not themselves checked for violations.

Request Overview

Response Overview

Each policy in the policies object includes:
  • name — Human-readable policy name
  • flagged — Whether this specific policy was violated
  • flagged_source — Array of content types that triggered the violation: ["text"], ["image"], or ["text", "image"] when both text and image violated

Message Roles

The API uses OpenAI-compatible message format. Each message must have a role field: The last message’s role determines which policies are evaluated: Role strings with postfixes (e.g., "user-12345", "assistant-v2") are normalized to their base role.
Send both user and assistant messages to detect violations in either direction, whether they’re harmful requests from users or problematic responses from your AI.

Content Types

White Circle supports different content formats within a message:
image_url and input_image content parts are not supported. To include images in a session, use artifact content parts.

Text

Plain text content in string format

Images

Images inline or by reference via artifact content parts

Artifacts

Standalone content checks for images, with pre-check and reference support

Advanced Features

Context Merging

Send only new messages and let White Circle automatically merge them with the previous session context

Metadata

Attach user information, timestamps, and custom data to enable risk scoring and analytics

Session Tracking

Use external_session_id to track content using your own identifiers. This can be any string that makes sense for your application:
Using external_session_id allows you to:

Authorizations

Authorization
string
header
required

API Key required. Format: Bearer wc-your-api-key

Headers

whitecircle-version
string
required

API Version

Body

application/json
messages
object[]
required

Array of chat messages to analyze for policy violations

deployment_id
string
required

The deployment ID to check against

external_session_id
string | null

Optional external identifier for tracking this session

include_context
boolean | null

Include previous conversation context. Defaults to true if external_session_id is provided

metadata
object

Optional session-level metadata

policies
string[] | null

Optional list of specific policy IDs to check against. If omitted, all deployment policies are used

Response

Success

flagged
boolean
required
internal_session_id
string
required
policies
object
required
external_session_id
string | null
note
string | null