Operation supported analysis types

Certain analysis types are supported depending on operation query's type and content input.

Create an operation

Operation of type text

Textual AI is supported in type text operation.

To create a Textual AI operation, pass list of text entries as contents and one or more following analysis types: sentiment-simple, sentiment-real, topic, spam-detection, personality-mb or intention to the request.

curl -i -X POST 'https://product-api.redflagai.co/api/v2/products/api/operations' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {{JWT_TOKEN}}' \
-d '{
    "type": "text",
    "analyses": [
        "spam-detection",
        "sentiment-real",
        "topic"
    ],
    "contents": [
        "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
        "Praesent eget purus vel metus hendrerit vestibulum."
    ]
}'

Operation of type file

Visual AI, Motion AI and Audial AI are supported in type file operation.

You can choose to make a single AI applied or multiple AI applied operation request. Before that, upload JPG, PNG, MP3 or MP4 file to obtain file ID to represent as operation's content or use AWS S3 URLs for each file to avoid using upload.

curl -i -X POST 'https://product-api.redflagai.co/api/v2/products/api/operations/upload' \
-H 'Content-Type: multipart/form-data' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {{JWT_TOKEN}}' \
-F 'file=@"{{FILE_LOCATION}}"'

Single AI operation

  • To create a Visual AI operation, pass list of image file IDs as contents and one or more following analysis types: face-id, object-id, activity-id, logo-id, or caption to the request.

  • To create a Motion AI operation, pass list of video file IDs as contents and one or more following analysis types: face-id, object-id, activity-id, logo-id, or caption to the request.

  • To create a Audial AI operation, pass list of audio or movie file IDs as contents and one or more following analysis types: sentiment-real, sentiment-simple, or topic to the request.

Multiple AI operation

To create a multiple AI operation, pass list of any file type IDs as contents and any AI's analysis types. We will analyze result by only applying supported analysis types to the matching content.

For example, if you request face-id and sentiment-real analyses to MP4 and JPG contents, we will apply Motion AI's face-id to MP4, Visual AI's face-id to JPG, and Audial AI's sentiment-real to MP4.

If using AWS S3 URLs, the files must be accessible publicly and URLs must end with .jpg, .png, .mp3, .mp4 extensions. Using file IDs and AWS S3 URLs in the same Operation is not possible, create two Operations instead.

curl -i -X POST 'https://product-api.redflagai.co/api/v2/products/api/operations' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {{JWT_TOKEN}}' \
-d '{
    "type": "file",
    "analyses": [
        "face-id",
        "sentiment-real",
        "topic"
    ],
    "contents": [
        1, 2, 3
    ]
}'

Check operation status and result

If create operation request is successful, you will receive an id. Store the id so you can use it later to check status and result of operation via show route.

Last updated

Was this helpful?