Skip to content
TutujinAPI

Text and image content moderation

LLM-assisted moderation means a model sorts text and images into labels your platform defines (allow, block, review, plus violation categories), code publishes, blocks or queues each item for human review, and appeals always go to people. The model is an aid: your platform owns the rules and the final decisions. For 300,000 texts and 50,000 images a month, at live prices in each model’s cheapest group, model costs are about ¥189 a month.

Prices updated Nov 13, 2026, 6:13 PM

Monthly cost estimate

Assumptions: 300,000 texts a month (comments, messages, posts) at about 1,000 input tokens each (900 rules and examples, 100 content) and 50 output tokens; 50,000 images at about 1,500 input tokens each (1,000 image, 500 rules) and 60 output tokens; about 15,000 review items and appeals prepared by the main model at about 3,000 input and 300 output tokens each.

¥188.64per month

  • Text classification¥72
  • Image moderation¥36
  • Review and appeal assistance¥80.64
See the usage assumed

The business problem

Comments, direct messages, posts, product descriptions, avatars and images all need review. Doing it all by hand falls behind as volume grows and leaves gaps at night and on holidays; keyword rules alone block harmless posts and miss anything reworded.

An LLM reads text in context and understands images, which makes it a good first filter. It also makes mistakes, can judge the same item differently twice, and the model provider’s own safety policy sometimes refuses to process violating content at all. Decisions affect users’ accounts and speech, so they cannot be left to a model alone.

The common setup: rules block obvious ads and blocklisted content, the model classifies the rest against explicit labels and gives a reason, high-risk and uncertain items go to a human review queue, and people make penalty decisions and handle appeals. The platform owns the rules, the outcomes and its legal obligations where it operates.

Recommended models

Recommended models are picked from the live catalog; prices are each model's cheapest group, updated Nov 13, 2026, 6:13 PM. Click a model to see every group's price.

Reference architecture

  1. 1

    Write down the rules

    Turn your policy into explicit labels: allow, block, review, plus violation types such as spam, harassment, sexual content, violence, illegal content and privacy leaks. Give each label a definition with positive and negative examples, set by your operations and legal teams.

  2. 2

    Pre-filter with rules

    Use keywords, blocklists, links and image hashes to stop obvious violations and duplicates before they reach a model; whatever rules catch costs nothing in model usage.

  3. 3

    Classify with models

    Send text to the small model and images to the vision model and ask for JSON with the label, violation type and a one-sentence reason. When the model refuses, finish_reason is content_filter, the reply is empty or it cannot be parsed, treat the item as “review” — never as allowed.

  4. 4

    Route by risk

    Clearly fine items are published, clear violations are blocked with a reason shown to the user, and uncertain items or anything leading to heavy penalties such as account bans go to the human review queue. Start with a narrow automatic scope and widen it based on what human review finds.

  5. 5

    Human review and appeals

    Moderators see the original text or image, the model’s label and reason, and the context gathered by the review model, then decide. Every appeal is handled by a person; the model only prepares the material.

  6. 6

    Log and calibrate

    Keep the model result, the moderator’s decision and timestamps for every item. Regularly sample what was auto-allowed and auto-blocked, measure mistakes, and add typical errors to the rules and examples.

Cost estimate

Assumptions: 300,000 texts a month (comments, messages, posts) at about 1,000 input tokens each (900 rules and examples, 100 content) and 50 output tokens; 50,000 images at about 1,500 input tokens each (1,000 image, 500 rules) and 60 output tokens; about 15,000 review items and appeals prepared by the main model at about 3,000 input and 300 output tokens each.

ItemModelUsage assumedCost
Text classificationgemini-2.5-flash-lite300,000 × (1,000 input + 50 output tokens)¥72
Image moderationClaude Haiku 5.550,000 × (1,500 input + 60 output tokens)¥36
Review and appeal assistanceqwen3.5-plus15,000 × (3,000 input + 300 output tokens)¥80.64
Total (per month)¥188.64

Calculated from live prices in each model's cheapest group, updated Nov 13, 2026, 6:13 PM.

Model usage only: moderators, storage and servers are not included. How many tokens an image becomes depends on the model and resolution; the table assumes about 1,000 per image, and the usage field in each response is what you are billed on. Deduplicate re-uploaded images by hash and check them once. The rules sit unchanged at the start of the system prompt, so if the model supports context caching the cached part is billed at the lower cache-read price; content stopped by the rule pre-filter costs nothing in model usage.

Sample code

Text and images share one set of labels and one function, and the model answers in JSON. Request errors, refusals, content-filter stops and unparseable answers all go to the human review queue; none of them counts as allowed.

Sample code (Python, text and image moderation)
import base64
import json
import os
from openai import APIError, OpenAI

client = OpenAI(base_url="https://www.tutujin.com/v1", api_key=os.environ["TUTUJIN_API_KEY"])

POLICY = """You moderate posts in a community app. Reply with one JSON object only:
{"decision": "allow" | "block" | "review", "category": "none" | "spam" | "abuse" | "sexual" | "violence" | "illegal" | "privacy", "reason": "one short sentence"}
spam: ads, or contact details to move a deal off the platform. abuse: insults or threats aimed at a person.
privacy: someone else's phone number, address or ID number. Judge only by these rules. If you are not sure, answer "review"."""
REVIEW = {"decision": "review", "category": "unknown"}
review_queue = []


def moderate(content, model):
    """Anything other than a clear, parseable answer goes to a person, never to "allow"."""
    try:
        resp = client.chat.completions.create(
            model=model,
            messages=[{"role": "system", "content": POLICY}, {"role": "user", "content": content}],
        )
    except APIError as e:  # refused or blocked by the model provider
        return {**REVIEW, "reason": "request failed: " + type(e).__name__}
    choice = resp.choices[0]
    text = choice.message.content or ""
    if choice.finish_reason == "content_filter" or "{" not in text:
        return {**REVIEW, "reason": "model declined"}
    try:
        result = json.loads(text[text.find("{"): text.rfind("}") + 1])
    except json.JSONDecodeError:
        return {**REVIEW, "reason": "unparseable answer"}
    if result.get("decision") not in ("allow", "block", "review"):
        return {**REVIEW, "reason": "unknown label"}
    return result


def moderate_text(text):
    return moderate(text, "gemini-2.5-flash-lite")


def moderate_image(path):
    with open(path, "rb") as f:  # scale images down before this: fewer tokens
        url = "data:image/jpeg;base64," + base64.b64encode(f.read()).decode()
    content = [
        {"type": "text", "text": "Moderate this image, including any text in it."},
        {"type": "image_url", "image_url": {"url": url}},
    ]
    return moderate(content, "claude-haiku-5-5")


for item_id, result in [
    ("post-1", moderate_text("DM me on another app for cheap followers!!")),
    ("avatar-7", moderate_image("avatar.jpg")),
]:
    if result["decision"] == "review":
        # a person decides; qwen3.5-plus can gather the context for the reviewer
        review_queue.append({"id": item_id, **result})
    print(item_id, result)

Try this with one key

Sign up, create an API key in the console, and put your base_url and key into the code above. For company purchasing or invoices, add our WeChat support JsnonoChat.

Tutujin support WeChat QR code
WeChatJsnonoChat

Scan the code or search the WeChat ID to add us

FAQ

How much does content moderation cost per month?

With 300,000 texts, 50,000 images and about 15,000 review and appeal summaries a month, the cheapest groups come to about ¥189 a month. The more the rule pre-filter catches and the smaller the images, the lower the bill.

Can model decisions be used as the basis for penalties?

We do not recommend it. Models make mistakes and can judge the same item differently on different runs. Use them to pass clearly fine content, block clear violations and prioritize the review queue; heavy penalties such as bans or removals, and every appeal, should be confirmed by a moderator. Your platform is responsible for the rules and the outcomes.

What if the model refuses or returns nothing?

Some model providers refuse to answer, return finish_reason content_filter or return an error when they see violating content. Send all of these to human review as “review”, never treat them as allowed, and test how your chosen model behaves on real samples of each violation type before going live.

Does LLM moderation satisfy regulatory requirements?

There is no such guarantee. This setup is a technical aid, not a compliance commitment. Platforms have to meet the content obligations of the laws where they operate themselves; offering generative AI services to the public in mainland China also involves algorithm filing, security assessment and labeling of generated content, as our Acceptable Use Policy notes.

How is image moderation billed?

Images are billed as the input tokens they convert to, and higher resolution means more tokens; the usage field in each response is what you pay for. Scale images down to the point where the content is still clear, and deduplicate re-uploads by hash so each image is checked once.

Should severely illegal content go to the model too?

Suspected sexual content involving minors and other severely illegal material, once rules or a model flag it, should be handled and reported through the procedures the law where you operate requires. Do not resubmit confirmed items to models as ordinary samples or use them for testing.