Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.omnifence.ai/llms.txt

Use this file to discover all available pages before exploring further.

Stars API includes a content moderation module that screens text prompts, images, and videos for unsafe content. Each modality is exposed as its own endpoint with a focused pipeline tuned to that medium. Audio and chat modalities are in development.

Why moderation

AI generation platforms need to prevent harmful content from being created or distributed. The moderation module automates this by analysing inputs against the configured content categories and returning an is_prohibited verdict.

Modalities

Prompt moderation

Screen a text prompt against your blocklist and an LLM prohibition check before generation.
  • Input: prompt text field
  • Pipeline: a blocklist scan followed by an LLM prohibition check (your account administrator can enable additional optional steps)
  • Output: is_prohibited verdict, plus a reason when a prompt is rejected
Learn more about prompt moderation

Image moderation

Screen a single image with vision-language and NSFW classifiers, plus any per-client custom categories you have configured.
  • Input: image_url field — a public HTTP/HTTPS URL (direct file upload is currently paused)
  • Pipeline: VLM classification + NSFW classification + optional custom VLM children, all in parallel
  • Output: is_prohibited verdict and flagged categories
Learn more about image moderation

Video moderation

Analyse a video by extracting frames and checking each one individually, then merging the results.
  • Input: video_url field — a public HTTP/HTTPS URL up to 300 MB (direct file upload is currently paused)
  • Pipeline: frame extraction followed by per-frame analysis
  • Output: is_prohibited verdict and flagged categories merged across frames
Learn more about video moderation

Coming soon

Asynchronous processing

All modalities run asynchronously. When you submit a request, the API returns a job_id immediately with status: "queued". You can then:
  1. Poll the job status endpoint for results.
  2. Stream real-time updates via SSE.
  3. Receive results via webhook when the job completes.

Pipeline architecture

Moderation jobs use a parent-child architecture. The parent job coordinates one or more child jobs, each handling a specific check. All children must complete before the parent aggregates the results into a final decision.

Prompt moderation pipeline

PROMPT_MODERATION (parent)
└── TEXT_MODERATION          — Blocklist scan, LLM prohibition check

Image moderation pipeline

IMAGE_MODERATION (parent)
├── VLM_CLASSIFICATION       — Visual analysis via LLM (one per enabled VLM category)
├── NSFW_CLASSIFICATION       — GPU-based NSFW detection
└── VLM_CLASSIFICATION        — Per-client custom categories (one per enabled custom category)

Video moderation pipeline

VIDEO_MODERATION (parent)
└── FRAME_EXTRACTION         — Sample frames from video via FFmpeg
    └── FRAME_MODERATION     — Per-frame content analysis (one per frame)
If any child job fails, the parent job fails.