Table of contents

Adult Content API

The Adult Content API provides an overview of adult content for a video.

GET /api/data/items/{id}/adult?interval={interval}
  • id - (string) The identifier of the item to get the adult content summary for
  • interval - (int) The interval (in seconds) to group results into

The response is a histogram containing an item for each interval bucket that contains stats about the summary.nsfw_nsfw_score values.

{
    "adult_summary": [
        {
            "start_at": 0,
            "avg": 0.024366162717342377,
            "max": 0.024366162717342377
        }, {
            "start_at": 1,
            "avg": 0.02099231630563736,
            "max": 0.02099231630563736
        }, {
            "start_at": 2,
            "avg": 0.05407408997416496,
            "max": 0.05407408997416496
        }, {
            "start_at": 3,
            "avg": 0.0655045360326767,
            "max": 0.0655045360326767
        }
    ]
}
  • adult_summary[].start_at - (int) The start time of the bucket
  • adult_summary[].avg (number) Average NSFW score (0-1)
  • adult_summary[].max (number) The maximum NSFW score (0-1)

Categorized Adult Content

If running categorized adult content, the following endpoint will return categorized information:

GET /api/data/items/{id}/adult/{category}?interval={interval}
  • id - (string) The identifier of the item to get the adult content summary for
  • category - (string) the adult category to load
  • interval - (int) The interval (in seconds) to group results into

Sample response:

{
	"category": "Category Name",
	"interval": 10,
    "adult_summary": [
        {
            "start_at": 0,
            "avg": 0.024366162717342377,
            "max": 0.024366162717342377
        }, {
            "start_at": 1,
            "avg": 0.02099231630563736,
            "max": 0.02099231630563736
        }, {
            "start_at": 2,
            "avg": 0.05407408997416496,
            "max": 0.05407408997416496
        }, {
            "start_at": 3,
            "avg": 0.0655045360326767,
            "max": 0.0655045360326767
        }
    ]
}

This documentation is generated from the latest version of GrayMeta Platform. For documentation relevant to your own deployed version, please use the documentation inside the application.