Moderation

Check content for moderation

Send user-generated content (text, image, or video) and get an allow/flag/block decision based on your policy. This is the primary endpoint for content moderation. Returns category scores, a decision action, and a decision ID for audit trail.

post/v1/check

Request

Request body

contentstring required

The user-generated content to moderate. For text, send the raw string. For images, send a URL or base64 data URI. For video, send a URL.

policyIdstring required

ID of the moderation policy to evaluate against. Use "default" if you have not created a custom policy.

contentType'text' | 'image' | 'video'

Type of content. Determines which AI models are used for scoring.

requestIdstring

Idempotency key. If you send the same requestId twice, you get the cached result instead of a duplicate check.

metadataobject

Attach context like userId or source. Stored with the decision for audit purposes.

Example request

{
  "content": "This is a sample text to moderate",
  "policyId": "default",
  "requestId": "req_abc123",
  "metadata": {
    "userId": "user_123",
    "source": "chat"
  }
}

Response

Moderation decision

decisionIdstring required

Unique decision ID for audit trail. Use this to look up the decision later or for appeals.

safeboolean required

true if no category thresholds were exceeded

flaggedboolean required

true if content needs human review

action'allow' | 'review' | 'block' required

What to do with this content: allow it, queue for review, or block it

providerstring required

Provider used for moderation

latencynumber required

Total request latency in milliseconds

costnumber required

Estimated cost in USD

requestIdstring

Your provided requestId (if any)

cachedboolean

Whether this was a cached response (idempotency)

Example response

{
  "decisionId": "dec_abc123",
  "categories": [
    {
      "category": "hate_speech",
      "score": 0.85,
      "triggered": true
    }
  ],
  "provider": "openai",
  "latency": 245,
  "cost": 0.001,
  "requestId": "req_abc123"
}

Changes

No recorded changes to this operation across all 1 revision of this API.