|image||String | File||
1. Acceptable values include image URL or file binary, but don’t mix 2 types of data in one request, and it will cause processing error
Optional parameter for image’s additional information. It will be useful in later use for searching or connecting images.1、If using multiple tag fields, they will be treated as one-to-one correspondence with image fields.
2、If the number of tag fields is less than the number of image fields, the rest image fields share the correspondence with the value of the last tag.
|timestamp||Number||Unix timestamp generated by requester for verifying signature.|
|nonce||Number||Random value for verifying signature.|
Base64 encoded signature string signed with RSA-SHA256 algorithm.Signing steps:
The signature for verifying the result JSON string.Verifying the signature with RSA-SHA256 algorithm and TUPU public key (download from here).Steps:
1. Parse the received string using JSON.parse() to obtain a JSON object named “data”.
2. There are two keys in “data”: “signature” and “json”, where signature is the digital signature and json is the results you’re interested in.
3. You need to verify json by decoding signature with base64 and use it to verify json using RSA-SHA256.
4. After verification, parse json to a JSON object using JSON.parse() to obtain the final result, see "json", and click API SDK for code examples.
|json||String||It’s a JSON string, please parse it before further process.General properties in result JSON
code：0: Successful; 1: Authentication error; 2: Invalid model ID; 3: No file uploaded; 4: Invalid API version; 5: Deprecated API version; 6: Wrong secret ID; 7: Invalid task ID, you can’t perform this task with your secretId; 8: Secret ID errors; 9: No certificate uploaded; 10: Wrong pipe ID; 11: Callback parameter missing; 12: Time parameter error; 13: Task not configured or closed; 14: Image error: 404, 400, download failed, too large; 100: Server error; 101: Unknown error.
message：Text information of the result
timestamp：Unix timestamp from API server
nonce：Random value for verifying signature.
Other properties are service relevant. Please refer API Response for more detail
Example 1: pornography recognition: http://7u2rqb.com2.z0.glb.qiniucdn.com/1059726834gra_koisaya011.jpg?nrop
Example 2: advertisement recognition: http://7u2rqb.com2.z0.glb.qiniucdn.com/1059726834gra_koisaya011.jpg?ad
Example 3: pornography and advertisement recognition: http://7u2rqb.com2.z0.glb.qiniucdn.com/1059726834gra_koisaya011.jpg?tupu/ad/nrop
Example 4: pornography videos: http://7u2rqb.com2.z0.glb.qiniucdn.com/c.mkv?tupu-video/nrop
Example 5: pornography gif images: http://7u2rqb.com2.z0.glb.qiniucdn.com/bull.gif?tupu-video/nrop
1. The format of return value is the same as that when called from Tupu API, more details will be discussed below.
2. Contact us for any customization needs for using our technology with Qiniu.