API Docs

Simple to integrate, clear to consume

The API currently supports API-key authentication and returns summary categories, public label codes, label names, and scores for each text.

Authentication

Create an API key in the user center after sign-in. Requests support Authorization: Bearer <API_KEY>Authorization: <API_KEY> or X-API-Key: <API_KEY>

Endpoint

https://www.aimoderations.com/api/v1/moderation/check/

Billing

Each request consumes quota. Exact deduction rules are shown in the signed-in user center.

Response Schema

Returns the top-level risk category, primary label code, primary label name, public label list, summary categories, remaining quota, and current quota cost.

Result Consistency

The website demo, user center, and API share the same public label schema, making results easier for product, operations, and customers to understand.

Recommended Use Cases

Suitable for comment moderation, community text moderation, live-chat interception, and LLM output risk control before release.

Delivery Mode

Available both as a public-cloud API and as a private deployment option for stricter business needs.

Policy Support

Supports multiple policy templates and also manual configuration by public label code, top-level category, and threshold.

Free Credits

New users receive 1000 free credits, and approved company verification grants another 50000 free credits.

Request Example

curl -X POST 'https://www.aimoderations.com/api/v1/moderation/check/' \
-H 'Authorization: your_api_key' \
-H 'Content-Type: application/json' \
-d '{
  "text": "Add me on WeChat and I will show you more explicit content"
}'

Response Example

{
  "ok": true,
  "quota_remaining": 999,
  "result": {
    "text_length": 56,
    "quota_cost": 1,
    "primary_category": "Spam & Promotion",
    "primary_label_code": "offsite_lead_gen",
    "primary_label": "Off-platform Diversion",
    "summary_categories": [
      {
        "name": "Spam & Promotion",
        "score": 0.98,
        "labels": [
          {
            "code": "offsite_lead_gen",
            "label": "Off-platform Diversion",
            "score": 0.98,
            "definition": "The text tries to move users off the current platform through add-friend, DM, or diversion wording."
          }
        ]
      }
    ],
    "predicted_labels": ["Off-platform Diversion", "Contact Info Promotion"]
  }
}

Field Reference

Field Type Description
quota_remainingintegerRemaining quota after the request.
text_lengthintegerTotal character count of the submitted text.
quota_costintegerQuota consumed by this request.
primary_categorystringTop-level risk category for routing business actions.
primary_label_codestringPublic label code, suitable for policy rules.
primary_labelstringPublic label name, suitable for operators and customers.
summary_categoriesarraySummary buckets grouped by top-level risk type, each with labels, scores, and definitions.
predicted_scoresarrayPublic labels above threshold, each with code, label, score, and definition.
top_scoresarrayTopK public labels for advanced strategies; the website demo only shows items above threshold by default.

Integration Guidance

  • For business policies, prioritize primary_category and primary_label_code
  • During integration, focus on quota_costprimary_category and primary_label_code
  • The default threshold is 0.5,and low-score labels below threshold should generally be treated as normal content, with optional use in advanced rules.

Top-level Risk Categories

A result layer that customers can understand

Sexual Content

Detects explicit sexual content, suggestive flirting, solicitation, minor-related sexual risk, and adult content distribution.

Suitable for communities, chat, comments, fiction, UGC, and LLM-generated text moderation.

Illegal Content

Covers gambling, drugs, fraud, underground trade, privacy abuse, and circumvention-related violations.

Suitable for content platforms, ecommerce, tools, AI apps, and enterprise compliance workflows.

Political Sensitivity

Detects sensitive expressions related to public institutions, political figures, regional conflict, historical controversy, and ideology.

Suitable for LLM output review, pre-publication moderation, and manual review routing.

Abuse & Hate

Detects personal attacks, discriminatory insults, hate speech, and hostile expressions.

Suitable for comment moderation, customer support chats, communities, and live interactions.

Spam & Promotion

Detects off-platform diversion, contact info drops, ecommerce promotion, financial marketing, and recruitment spam.

Suitable for anti-spam and anti-diversion controls across communities, social platforms, and brand sites.

Violence & Extremism

Detects violent harm, terrorism, self-harm risk, and weapons or dangerous goods related content.

Suitable for high-risk moderation, AI safety, and strict risk-control scenarios.

Other Risks

Captures noisy text, prompt-abuse signals, and edge-case risks that need secondary review.

Useful for custom policies, downgrade routing, and manual review queues.

Safe

No clear violation is detected, or the text falls into neutral discussion and normal daily-life context.

Can be used as the default pass result and combined with custom business dictionaries.

Public Label Catalog

Public Label Preview

Below is a preview of the public label system exposed to customers. Only three representative labels are shown for each top-level category on the website. Contact support for the full catalog.

Sexual Content

Three representative labels are shown here. Total labels: 7 Contact support for more details.

Sexual Content sexual_solicitation

Sexual Solicitation

The text contains prostitution, sexual service solicitation, or adult traffic diversion.

Recommended to block directly and record account risk.
Sexual Content sexual_teasing

Sexual Suggestiveness

The text contains teasing, suggestive, or borderline sexual expressions.

Block, fold, or send to review depending on the business scenario.
Sexual Content explicit_sexual_content

Explicit Sexual Content

The text directly describes sexual acts, sexual crimes, or explicit adult scenes.

Recommended for high-priority blocking.
Total 7 labels. Contact support for full details.

Illegal Content

Three representative labels are shown here. Total labels: 8 Contact support for more details.

Illegal Content gambling_and_betting

Gambling & Betting

The text involves gambling platforms, betting activities, or abnormal wagering guidance.

Recommended to block directly and raise account risk level.
Illegal Content drugs_and_contraband

Drugs & Contraband

The text involves drugs, prohibited medicine, or other restricted goods.

Recommended to block directly.
Illegal Content fraud_and_blackmarket

Fraud & Underground Trade

The text involves fraud, forgery, pyramid schemes, organized crime, or other black/grey market activities.

Recommended for high-priority blocking and linkage with fraud control.
Total 8 labels. Contact support for full details.

Political Sensitivity

Three representative labels are shown here. Total labels: 5 Contact support for more details.

Political Sensitivity public_affairs_sensitive

Public Affairs Sensitivity

The text involves governments, institutions, regulations, or sensitive public governance discussion.

Block, downgrade, or review depending on the business scenario.
Political Sensitivity political_figure_sensitive

Political Figure Sensitivity

The text involves political figures, major public figures, or related controversial expressions.

Handle with context-aware and region-specific policies.
Political Sensitivity separatism_and_regional_conflict

Separatism & Regional Conflict

The text involves sovereignty disputes, separatist rhetoric, or escalated regional conflict expressions.

Recommended for high-priority review or blocking.
Total 5 labels. Contact support for full details.

Abuse & Hate

Three representative labels are shown here. Total labels: 2 Contact support for more details.

Abuse & Hate abusive_attack

Abusive Attack

The text contains obvious personal attacks, verbal abuse, or malicious provocation.

Block, downgrade, or route to manual review.
Abuse & Hate discriminatory_hate

Discriminatory Hate

The text contains discriminatory insults toward groups based on region, gender, profession, appearance, or ethnicity.

Recommended for high-priority blocking.
Total 2 labels. Contact support for full details.

Spam & Promotion

Three representative labels are shown here. Total labels: 5 Contact support for more details.

Spam & Promotion offsite_lead_gen

Off-platform Diversion

The text tries to move users off the current platform through add-friend, DM, or diversion wording.

Recommended to block or rate-limit.
Spam & Promotion contact_exchange

Contact Info Promotion

The text contains WeChat, QQ, phone numbers, URLs, public accounts, or other contact entry points.

Recommended to block or mask based on account profile.
Spam & Promotion commerce_marketing

Commerce & Course Promotion

The text includes product promotion, ecommerce sales, or training-course marketing.

Throttle, fold, or block according to anti-ad rules.
Total 5 labels. Contact support for full details.

Violence & Extremism

Three representative labels are shown here. Total labels: 4 Contact support for more details.

Violence & Extremism violent_harm

Violent Harm

The text involves gore, physical harm, murder, or hired violence.

Recommended for high-priority blocking.
Violence & Extremism terror_extremism

Terror & Extremism

The text involves terrorist organizations, terrorist incidents, or extremist content.

Recommended to block directly with strict retention.
Violence & Extremism self_harm

Self-harm Risk

The text involves suicide, self-harm, or expressions of harming oneself.

Recommended for priority blocking and, where applicable, care escalation or human intervention.
Total 4 labels. Contact support for full details.

Other Risks

Three representative labels are shown here. Total labels: 2 Contact support for more details.

Other Risks noisy_text

Low-quality Noise

The text is dominated by gibberish, repetition, spammy filler, or low-information content.

Recommended to discard, fold, or route to a low-priority queue.
Other Risks other_risk_signal

General Risk Signal

Non-standard but noteworthy risk signals are detected and should be judged with additional business rules.

Recommended for manual review or a secondary rule engine.
Total 2 labels. Contact support for full details.

Safe

Three representative labels are shown here. Total labels: 3 Contact support for more details.

Safe safe_pass

Safe Pass

No clear policy violation is detected in the current text.

Allow by default, or combine with business dictionaries and random review if needed.
Safe safe_context

Neutral Public Discussion

The text contains neutral discussion, objective statements, or ordinary mentions that do not directly form a risk.

Usually safe to allow, with optional low-priority review depending on the business context.
Safe lifestyle_normal

Normal Lifestyle Content

The text is mainly about daily life, health, parenting, or ordinary social topics.

Usually safe to allow directly.
Total 3 labels. Contact support for full details.

Online Swagger

The platform includes built-in OpenAPI docs for field debugging, header validation, and quick response checks.

curl -X POST 'https://www.aimoderations.com/api/v1/moderation/check/' \
-H 'Authorization: your_api_key' \
-H 'Content-Type: application/json' \
-d '{
  "text": "Add me on WeChat and I can share more resources"
}'
Online Swagger

Visual API debugging

Built-in OpenAPI docs make it easy to debug fields and validate responses.

Open Swagger