EN ▾

OpenAI Moderation API Pricing vs a Token-Priced LLM

If you searched for openai moderation api pricing, the first thing to know is that we do not quote their rates here, so check their current pricing page. What this article gives you is the cost of doing a similar classification job with a chat model billed per token.

Updated

A scale weighing token coins against a filter gate, illustrating per-token versus fixed moderation pricing

Key points

  • A moderation endpoint is a fixed classifier; a chat LLM is a general model you instruct, so the two are not drop-in replacements.
  • Our API charges $0.15 per 1M input tokens and $0.50 per 1M output tokens, with failed or refused requests not charged.
  • Classifying 100,000 short comments costs about $4.50 at 200 input and 30 output tokens each.
  • Pick a fixed moderation endpoint for standard category flags, an LLM when you need your own rules.

What the question is really asking

People who search for openai moderation api pricing usually want to know what it costs to screen user text at scale. For that vendor's current rates, go to their official pricing page and check it on the day you plan your budget. Prices change, and a number copied into a blog post goes stale.

What we can do honestly is show the other side of the comparison. Our service is a text-only, OpenAI-compatible chat API for an open-weight model, billed per token. You can use it as a classifier by telling the model your rules and asking for a JSON verdict. This article walks through what that costs, and where a dedicated moderation endpoint is the better tool.

One boundary first. Our API has two methods: POST /v1/chat/completions and GET /v1/models. There is no moderation endpoint, no embeddings and no image input. If your job needs image moderation, this is not the service for it.

Two different kinds of product

A moderation endpoint is a purpose-built classifier. You send text, you get back category flags and scores. The categories are fixed by the vendor, the output format is fixed, and the model does one thing. That is attractive when your policy matches the vendor's categories.

A chat model is a general tool. You write the policy in the prompt, and the model applies it. That costs you prompt design and testing, but it gives you control. Typical reasons teams pick this route:

  • Your rules do not match standard categories, for example "flag any message that tries to move the buyer off the platform".
  • You moderate fiction or roleplay platforms where lawful adult content is allowed and you only want to catch specific things, such as sexual content involving minors, which is a hard limit on our side too.
  • You want a reason string in the verdict, so a human reviewer sees why a message was flagged.
  • You want one model for moderation, tagging and summaries, so there is one integration to maintain.

The trade-off is plain. A dedicated classifier is built and tuned for the task. A general model needs your testing before you trust it with decisions that affect real accounts. Keep a human in the loop for appeals either way.

Our pricing, exactly

ItemRate
Input tokens$0.15 per 1M
Output tokens$0.50 per 1M
SubscriptionNone, pay as you go from prepaid credit
Failed or refused requestsNot charged
Credit expiryNever

Top-ups are any whole amount from $20 to $500. You get +5% bonus credit from $50, +10% from $100 and +15% from $200. Payment is by crypto (USDT on TRC20, USDC on Base). The pricing page has the current table.

Because billing is per token, the cost of one check depends on two things you control: how long the text is, and how long the verdict is. A short JSON verdict keeps the output side tiny.

Worked cost examples

Assume a prompt of about 150 tokens for your rules plus a comment of about 50 tokens, so 200 input tokens per check. Assume the model replies with a short JSON object of 30 tokens. Here are three volumes.

10,000 checks

Input: 10,000 x 200 = 2,000,000 tokens, which is 2 x $0.15 = $0.30. Output: 10,000 x 30 = 300,000 tokens, which is 0.3 x $0.50 = $0.15. Total: $0.45.

100,000 checks

Input: 20,000,000 tokens, 20 x $0.15 = $3.00. Output: 3,000,000 tokens, 3 x $0.50 = $1.50. Total: $4.50.

1,000,000 checks

Input: 200,000,000 tokens, 200 x $0.15 = $30.00. Output: 30,000,000 tokens, 30 x $0.50 = $15.00. Total: $45.00.

The trial credit of $0.50 covers one check at $0.000045 (200 x $0.15 / 1M = $0.00003, plus 30 x $0.50 / 1M = $0.000015), which gives about 11,111 checks. That is enough to test your prompt on a real sample before you spend anything.

Your own numbers will differ. A long rulebook in the prompt raises the input side on every call. Moving to a shorter system prompt is the cheapest optimisation you have.

A minimal moderation prompt

Here is a working starting point. It asks for JSON mode output and a fixed set of fields, and runs at temperature 0 so the same text gets the same verdict as often as possible.

import json
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.contentmoderationapis.com/v1",
    api_key=os.environ["API_KEY"],
)

RULES = (
    "You review user comments for a forum. "
    "Flag a comment only if it contains: threats of violence, doxxing, spam links, "
    "or sexual content involving minors. Everything else is allowed. "
    'Reply with a JSON object: {"flag": true or false, "reason": short string}.'
)

def check(comment):
    resp = client.chat.completions.create(
        model="uncensored",
        temperature=0,
        max_tokens=60,
        response_format={"type": "json_object"},
        messages=[
            {"role": "system", "content": RULES},
            {"role": "user", "content": comment},
        ],
    )
    return json.loads(resp.choices[0].message.content)

print(check("Meet me outside tomorrow and bring friends. You will regret it."))

The max_tokens cap of 60 protects your budget and keeps the verdict short. Build a test set of a few hundred labelled examples, run it, and read the misses before you trust the results. Our docs cover JSON mode and the other request options.

What drives your bill

Three levers move the total, in this order of impact.

  1. Prompt length. Your rulebook is sent on every call. A 150-token rulebook across 1,000,000 checks is 150,000,000 input tokens, or $22.50 of the bill on its own (150 x $0.15). Trim it to 75 tokens and that part drops to $11.25.
  2. Verdict length. Output tokens cost more than input tokens, $0.50 against $0.15 per 1M. A verdict of 10 tokens, such as {"flag":false}, costs a third of a 30-token verdict with a reason. A common trick is to ask for a reason only when the flag is true.
  3. Retries and re-checks. If you run each message twice for safety, you pay twice. A cheap first pass with escalation of borderline cases only is usually better.

Batching several comments into one request also cuts the repeated rulebook cost. Send ten comments with one rulebook and ask for an array of ten verdicts inside an object. The saving is real, but test accuracy, since long batches can blur the judgement on each item.

Throughput for large backlogs

Cost is only half of a bulk job. A full key allows 8 concurrent requests and 300 requests per minute. At 300 per minute, 100,000 checks take a little over five and a half hours of steady running (100,000 / 300 is about 333 minutes). Plan for that, or split the work across a night. A trial key is limited to 2 concurrent and 60 per minute, so use it for testing only.

When you exceed a limit you get HTTP 429 with the code rate_limited or concurrency. On temporary overload there is a 429 with Retry-After: 5. Back off for that long and retry. A small worker pool of 6 to 8 threads with a retry wrapper is the right shape for this job. Responses carry an X-Balance-USD header, so your script can stop cleanly before the credit runs out.

How to choose

Use a fixed moderation endpoint when your policy matches its categories, you want a stable score format, and you do not want to maintain prompts. Check that vendor's pricing and terms directly.

Use a token-priced LLM when your policy is your own, when you want written reasons, or when one integration should handle moderation and other text tasks. Prompts are not used for training on our side, which may matter for private user content. Start with the trial credit, run your labelled sample, and compare the verdicts with what your reviewers decide. The result will tell you more than any pricing table.

Questions and answers

How much does the OpenAI moderation API cost?

We do not state another vendor's prices. Check the official OpenAI pricing page for the current rate, as it can change.

Can your API replace a moderation endpoint?

It can do a similar job when you write the rules in a prompt and ask for a JSON verdict, but it has no dedicated moderation method. It is text only, so it cannot screen images.

What does it cost to classify 100,000 short comments?

At 200 input and 30 output tokens per comment, about $4.50: $3.00 for input and $1.50 for output. Longer prompts or replies raise it.

Are failed requests billed?

No. Failed or refused requests are not charged, and credit never expires.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.

Get API key