Inference API
Content moderation
Check inputs and outputs against safety and content moderation models.
POST/v1/moderations
API Key (Bearer zrv_...)
Screen text inputs against safety policies using moderation endpoints.
Code example
from openai import OpenAI
client = OpenAI(
base_url="https://api.zorveus.com/v1",
api_key="zrv_your_api_key",
)
response = client.moderations.create(
model="openai/text-moderation-latest",
input="Sample text content for automated compliance screening.",
)
result = response.results[0]
print(f"Flagged: {result.flagged}")
print(f"Categories: {result.categories}")Use the result
Read results[0].flagged for the provider's overall decision and inspect category fields when your policy needs them. Category names and scores can change between moderation models, so store the model ID with any audit decision.
Moderation is a model call. The request still passes through API-key, model-policy, wallet, cap, and credit checks.
Use GET /v1/models to verify that the moderation model is routable. Do not present a moderation result as a legal or compliance determination.
Was this page helpful?
Edit this page on GitHub