API - Inappropriate Content

REQUEST

Analyze an image and rate it for the appropriatenes of it's content for a type of audience - adult, teen, everyone.

        https://www.moderatecontent.com/api/v2?
        key=your_api_key&
        url=https://www.moderatecontent.com/img/sample.png
    
ARGUMENTS

key
string
The api key used to reference your account within the system.
f96f44847704d2291b2967536afe8898

url
string
The url pointing at an image accessible over the internet, no larger than 10mb and with a format of either .jpg .png .bmp .gif.
https://www.moderatecontent.com/img/sample.jpg
RESPONSE

    {
        "url_classified": "https://www.moderatecontent.com/img/sample.png",
        "rating_index": 1,
        "rating_letter": "e",
        "predictions": {
            "teen": 0.11751182222118,
            "everyone": 99.823732266668,
            "adult": 0.05875591111059
        },
        "rating_label": "everyone",
        "error_code": 0,
        "frame": 1
    }
    

url_classified
string
The url pointing at an image accessible over the internet, no larger than 10mb and with a format of either .jpg .png .bmp .gif.
https://www.moderatecontent.com/img/sample.jpg

rating_index
integer
A numeric representation of the content rating (1 = everyone, 2 = teen, 3 = adult).
1

rating_letter
string
A single char representing the content rating (e = everyone, t = teen, a = adult).
a

predictions
object
The classification scores created by the computer vision model for each classification. Values range between 0 and 100.
{ "teen": 0.11751182222118, "everyone": 99.823732266668, "adult": 0.05875591111059 }

teen
double
The score by the computer vision model for the teen classification.
Parent: predictions
0.11751182222118

everyone
double
The score by the computer vision model for the everyone classification.
Parent: predictions
99.823732266668

adult
double
The score by the computer vision model for the adult classification.
Parent: predictions
0.05875591111059

rating_label
string
A label representing the content rating (everyone, teen, adult).
everyone

error_code
integer
A code representing the type of error returned. The value 0 means no error was found.
1024

error
string
Optional
A message representing the type of error returned. This occurs when the error_code is not 0.
No url specified in querystring

frame
integer
Optional
The index of the frame where the rating originated. Animated gifs have 1..n frames, the API returns the frame with the highest prediction for adult.
1
ERROR MESSAGES

1001
Url not accessible or malformed image
A catch-all message from our prediction model, when it doesn't have an image to predict. Often, the URL can not be reached due to scraping restrictions.

1002
No url specified in querystring
Parsing the querystring, we look for a parameter like &url=https://moderatecontent.com/image.png.

1003
Content does not begin with boundary
You have an incorrectly formed POST multipart/form-data, this can be tricky to setup without a library.

1004
Permissions Error
Generated when the API receives an image with forged byte code.

1005
Unexpected end of data
Image truncated during transmission.

1006
Malformed post upload request
A catch-all message for POST requests with unexpected content.

1007
Malformed post url
The url field in your form POST is not a valid image.

1008
Requested file size too large > 10 mb
We recommend keeping your images below 1 mb to reduce latency. Increasing the size doesn't make our model more accurate.

Need some support?


Send us an email and we will get back to you as soon as possible!

info@moderatecontent.com

Terms of Service and Privacy Policy