Information Submission Interface Specification
Update:
1. Parameter specification
- Request URL:
Get it from the Console - Service Configuration
- Interface description:
Submit the video information to the interface. After the information is submitted, screenshots of the video will be
detected, and the results need to be obtained by calling the Result Obtaining Interface.
- Supported Formats:
Video package formats supported by the detection interface: flv、mkv 、mp4 、rmvb 、avi 、wmv、3gp、ts、mov etc.
- Size limit:
Size limit of the video: <1G.
- HTTP Request Header:
Header
Value
Description
Content-Type
application/json;charset=UTF-8
Request body type
Accept
application/json;charset=UTF-8
Accepted return type
X-AppId
The only identifier of the project or application.
X-TimeStamp
The UTC timestamp of the request. Timestamps need to be formatted according to W3C standards, for example: 2010-01-31T23:59:59Z. (http://www.w3.org/TR/xmlschema-2/#dateTime)。
Authorization
Signature authentication
-
Request method:POST
-
Request body JSON object:
Parameter
Required
Type
Description|
type
Required
Number
1: Video URL; 2: Video BASE64 value
video
Required
String
Video content, if type=1, then the value is the Video URL, if type=2, then the value is Video BASE64 value. When type is 2, then the video must be less than 10m.
strategyId
Optional
String
Strategy number, use DEFAULT if no this param in request
videoName
Optional
String
The name of the video file. When type=2 and the video is BASE64, this parameter is essential and can indicate the video format
lang
Optional
String
Default auto. For a list of supported languages, please refer to the Audio Audit Documentation
frequency
Optional
Number
Default frame extraction setting, there will be one frame captured and detected every 5 seconds, the settable range is 1~60 seconds
referImage
Optional
String
The URL of the reference image used for face comparison, supported format: jpg, png; supported image size: <10M
userId
Optional
String
Unique end user ID. The user ID should be no more than 32 characters.
userIP
Optional
String
User IP address
did
Optional
String
User device ID
dtype
Optional
String
User device type: 1:iPhone 2:User device type: android 3: ipad 4:wphone 5: pc 6:web 7:wap
callbackRegion
Optional
String
callback region:default use cn server to do callback,supports : cn,us,ap
callbackUrl
Optional
String
callback url:http
callbackSecretKey
Optional
String
callback secret key, customizable. but is necessary be consistent in your callback signature
extra
Optional
json
Extended fields, multiple keys and values can be passed through. For example, the two parameters of the game server and the game version, the input method:"extra":{"server": "123","version":"456"}
-
Example of request body:
JSON Response
{
"type":2,
"video":"http://xxx.xxx.com/xxxx",
"userId": "testUser",
"did": "868034031518269",
"dtype": "1"
}
-
Request signature:
1. Parameter specification
- Request URL:
Get it from the Console - Service Configuration
- Interface description:
Submit the video information to the interface. After the information is submitted, screenshots of the video will be detected, and the results need to be obtained by calling the Result Obtaining Interface.
- Supported Formats:
Video package formats supported by the detection interface: flv、mkv 、mp4 、rmvb 、avi 、wmv、3gp、ts、mov etc.
- Size limit:
Size limit of the video: <1G.
- HTTP Request Header:
| Header | Value | Description |
|---|---|---|
| Content-Type | application/json;charset=UTF-8 | Request body type |
| Accept | application/json;charset=UTF-8 | Accepted return type |
| X-AppId | The only identifier of the project or application. | |
| X-TimeStamp | The UTC timestamp of the request. Timestamps need to be formatted according to W3C standards, for example: 2010-01-31T23:59:59Z. (http://www.w3.org/TR/xmlschema-2/#dateTime)。 | |
| Authorization | Signature authentication |
-
Request method:POST
-
Request body JSON object:
| Parameter | Required | Type | Description| |
|---|---|---|---|
| type | Required | Number | 1: Video URL; 2: Video BASE64 value |
| video | Required | String | Video content, if type=1, then the value is the Video URL, if type=2, then the value is Video BASE64 value. When type is 2, then the video must be less than 10m. |
| strategyId | Optional | String | Strategy number, use DEFAULT if no this param in request |
| videoName | Optional | String | The name of the video file. When type=2 and the video is BASE64, this parameter is essential and can indicate the video format |
| lang | Optional | String | Default auto. For a list of supported languages, please refer to the Audio Audit Documentation |
| frequency | Optional | Number | Default frame extraction setting, there will be one frame captured and detected every 5 seconds, the settable range is 1~60 seconds |
| referImage | Optional | String | The URL of the reference image used for face comparison, supported format: jpg, png; supported image size: <10M |
| userId | Optional | String | Unique end user ID. The user ID should be no more than 32 characters. |
| userIP | Optional | String | User IP address |
| did | Optional | String | User device ID |
| dtype | Optional | String | User device type: 1:iPhone 2:User device type: android 3: ipad 4:wphone 5: pc 6:web 7:wap |
| callbackRegion | Optional | String | callback region:default use cn server to do callback,supports : cn,us,ap |
| callbackUrl | Optional | String | callback url:http |
| callbackSecretKey | Optional | String | callback secret key, customizable. but is necessary be consistent in your callback signature |
| extra | Optional | json | Extended fields, multiple keys and values can be passed through. For example, the two parameters of the game server and the game version, the input method:"extra":{"server": "123","version":"456"} |
-
Example of request body:
JSON Response { "type":2, "video":"http://xxx.xxx.com/xxxx", "userId": "testUser", "did": "868034031518269", "dtype": "1" } -
Request signature: