Create a moderation rule
This endpoint creates a moderation rule. A rule defines a named set of category conditions that determine what the moderation agent flags and which action it applies (cut, blur, beep, mute, or flag).
Each condition targets a detection category on an audio or video track. You can optionally specify a confidence threshold between 0 and 1. If you omit the threshold, the system uses the default value for that category.
How it works
-
Send a POST request with a
nameand a non-emptyconditionsarray. -
For each condition, specify a
category, atype(audioorvideo), and optionally athresholdand anaction. -
The response returns the ID of the created rule. Use this ID as
ruleIdwhen creating a moderation job.
A rule name must be unique. Each category can appear only once in a rule.
Example
A video platform creates a rule that flags nudity and graphic violence on the video track and mutes profanity on the audio track, then reuses it across every upload job.
Authentication
FastPix APIs are secured with Basic Authentication. Use your Access Token ID as the username and Secret Key as the password in the Authorization header of each API request.
- Username: Access Token ID
- Password: Secret Key
Activate your FastPix account to generate your API credentials. See the guide here
Request
A human-readable name for the rule. Must be unique within the workspace.