Recipes

XGuardModeration

Changed on

Evaluate text or generation prompts against XGuard content moderation policies. /// Generates one ChatCompletion job per label and aggregates results with logprob-based scoring.

post/v2/consumer/recipes/xGuardModeration

Request

  • The document declares no server URL.
  • Auth: none required

Query parameters

experimentalboolean
allowMatureContentboolean
whatifboolean
ephemeralboolean
tier'paid' | 'free'

How a workflow is paid for.

Request body

modestring required
labelsstring[] nullable

Only the named labels are evaluated; names not in the defaults (or overrides) are silently ignored. Omitted or empty evaluates all labels.

storeFullResponseboolean required

Stores the full raw chat completion (including all logprobs) in the destination blob, ~200KB instead of ~2-3KB; debugging only. Not the reasoning switch (see Civitai.Orchestration.Grains.Workflows.Steps.XGuardModeration.XGuardModerationInput.IncludeReasoning): it only raises the token budget from 1 to 128.

includeReasoningboolean required

Site-text moderation only (prompt scan always emits one token). Generates an explanation after the verdict, populating ModelReason and MatchedTerms, with a larger token budget and a distinct blob-cache key.

Response

OK

blockedboolean required
triggeredLabelsstring[] required

Changes