POST
/
moderate
/
image
curl --request POST \
  --url https://moderationapi.com/api/v1/moderate/image \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "doNotStore": true,
  "authorId": "<string>",
  "contextId": "<string>",
  "metadata": {},
  "url": "<string>"
}'
{
  "status": "<string>",
  "contentId": "<string>",
  "request": {
    "timestamp": 123,
    "quota_usage": 123
  },
  "flagged": true,
  "labels": [
    {
      "label": "nudity",
      "score": 0.5
    }
  ],
  "texts": [
    "<string>"
  ]
}

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
doNotStore
boolean

Do not store the content. The content won't enter the review queue

authorId
string

The author of the content.

contextId
string

For example the ID of a chat room or a post

metadata
object

Any metadata you want to store with the content

url
string
required

The URL of the image you want to analyze.

Response

200 - application/json
status
string
required

Success if the request was successful

contentId
string

The ID of the content. Only returned if the content was stored.

request
object
required

Information about the request

flagged
boolean
required

Whether the content was flagged by any models

labels
object[]
required

The confidence of all labels

texts
string[]

The texts found in the image, if the image text model is enabled

Was this page helpful?