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, orcaptionto 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, orcaptionto 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, ortopicto 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.
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
]
}'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",
"logo-id",
"object-id"
],
"contents": [
"https://public-bucket.s3.amazonaws.com/h249-ob30-10fn.mp4",
"https://public-bucket.s3.amazonaws.com/bc2c-4d05-8200.jpg",
"https://public-bucket.s3.amazonaws.com/perh-i29f-pplk.jpg"
]
}'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?