Skip to main content
POST
cURL
This is the core endpoint for content moderation and analytics. Send content in the OpenAI-like message format and receive a session-level verdict plus artifact-level results for any inline or referenced artifacts you explicitly include. 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 session envelope with the overall session verdict and any explicit artifact results
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

The endpoint returns a single object with two top-level fields: The session object includes: Each policy object in session.policies 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
Each object in artifacts[] uses the same response shape as Check Artifact and Get Artifact Results.

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:

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:

Example Response

For a response example with populated artifacts[], see Checking Images.

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
external_session_id
string | null
include_context
boolean | null
metadata
object
deployment_id
string | null

Response

Success

session
object
required
Example:
artifacts
object[]
required