Image Tagging API

Filestack provides a simple interface for getting image tags from the Google Vision API. You can auto-analyze the content of an image and find out what's in the image, or find out whether an image contains any offensive material (whether the image is safe for work or not). Note: A valid Filestack security policy and signature is required in order to request tags or SFW status.

Filestack file policies are URL safe, Base64, JSON parseable strings. To generate a policy, create a json object with the appropriate key value pairs. Then base64 encode it. URL safe is achieved by replacing '+' with '-' and '/' with '_'. Base64 also includes a trailing '=' as padding. You will need to leave this character in the string in order for it to be valid.policy:eyJoYW5kbGUiOiJLVzlFSmhZdFM2eTQ4V2htMlM2RCIsImV4cGlyeSI6MTUwODE0MTUwNH0=

security=signature:your_HMAC-SHA256_hex_encoded_signature

String

Can be abbreviated as s:your_HMAC-SHA256_hex_encoded_signature

The signature is a hex encoded string with lowercase letters. There are common libraries for calculating HMAC-SHA256 on a variety of languages. It is advisable to use a well tested and vetted library as opposed to writing your own. You can also generate policies and signatures in the Filestack developer portal in the Security section with the debugging tool.signature:4098f262b9dba23e4766ce127353aaf4f37fde0fd726d164d944e031fd862c18.

The second method for submitting a request to get the tags for an image is to pass the image with the tags task and include a "user", which is the word "app" and a "password" which is the "App Secret" that can be found in the Security section of the developer portal under App Secret. Be careful when using this method, as the APP Secret should be secret and not known publicly.

This task specifies you want to know whether the image contains any offensive content. If the image is safe, the response will be true, if it is not safe for work, the response will be false.

security=policy:your_base64_encoded_policy

String

Can be abbreviated as p:your_base64_encoded_policy

Filestack file policies are URL safe, Base64, JSON parseable strings. To generate a policy, create a json object with the appropriate key value pairs. Then base64 encode it. URL safe is achieved by replacing '+' with '-' and '/' with '_'. Base64 also includes a trailing '=' as padding. You will need to leave this character in the string in order for it to be valid.policy:eyJoYW5kbGUiOiJLVzlFSmhZdFM2eTQ4V2htMlM2RCIsImV4cGlyeSI6MTUwODE0MTUwNH0=

security=signature:your_HMAC-SHA256_hex_encoded_signature

String

Can be abbreviated as s:your_HMAC-SHA256_hex_encoded_signature

The signature is a hex encoded string with lowercase letters. There are common libraries for calculating HMAC-SHA256 on a variety of languages. It is advisable to use a well tested and vetted library as opposed to writing your own. You can also generate policies and signatures in the Filestack developer portal in the Security section with the debugging tool.signature:4098f262b9dba23e4766ce127353aaf4f37fde0fd726d164d944e031fd862c18.

The second method for submitting a request to get the tags for an image is to pass the image with the tags task and include a "user", which is the word "app" and a "password" which is the "App Secret" that can be found in the Security section of the developer portal under App Secret. Be careful when using this method, as the APP Secret should be secret and not known publicly.