Submit a VOD task
Update:
Submit a VOD video for asynchronous image and audio moderation. Retrieve results by query or callback after submission.
POSThttps://vsafe.ilivedata.com/api/v1/video/check/submit
Request format
Send a UTF-8 encoded JSON body.
Request header
Required
Description
Content-Type
Yes
application/json; charset=UTF-8
Accept
Recommended
application/json
For authentication headers and signing rules, see Request signature in the Help Center. Use the submitting project when querying or stopping a task.
Video requirements
- Supported input types: URL, BASE64
- Supported video formats: mp4, m4v, mov, mkv, webm, flv, avi, asf, wmv, rm, rmvb, 3gp, 3g2, mpg, mpeg, vob, ts, mts, m2ts, ogv, mxf, dv
- Video size: URL downloads must not exceed
1GB; BASE64 input must not exceed 15 MiB encoded characters, without a Data URL prefix
- Video requirements: Files must be complete, unencrypted, and contain a decodable video track. Audio tracks must also be decodable when audio moderation is required. Supported formats refer to file containers; processing depends on the codecs inside the file, not just its extension
- URL requirements: Point directly to an accessible video file; web pages and playlist URLs are not supported
Request body
Parameter
Type
Required
Description
type
Integer
Yes
1: URL; 2: Base64.
video
String
Yes
For type=1, an accessible video URL; for type=2, plain Base64 without a Data URL prefix, at most 15×1024×1024 encoded characters. No videoName is required.
frequency
Integer
No
Frame interval in seconds, 1–60. When omitted, uses project sampling configuration; without a matching rule, defaults to 2 seconds for videos under 10 seconds, otherwise 3 seconds. Enabled flash-frame detection takes precedence.
referImage
String
No
Reference image URL for face comparison; use JPG/PNG under 10 MB. Execution depends on the moderation strategy and downstream support.
strategyId
String
No
Moderation strategy; defaults to DEFAULT.
lang
String
No
Audio language; omitted or empty means auto. Supported languages
alternativeTags
Integer[]
No
Additional moderation categories: 100,110,120,130,140,150,160,170,180,190,900,999. This is not the full list of output categories.
userId
String
No
Business end-user ID; keep within 32 characters. Does not select an RTC stream or publisher.
userIP
String
No
End-user IP.
did
String
No
Device ID.
dtype
String
No
Device type: 1 iPhone, 2 Android, 3 iPad, 4 Windows Phone, 5 PC, 6 Web, 7 WAP.
callbackRegion
String
No
Callback region: cn/us/eu/ap. The task region takes precedence; this is a fallback when the task region cannot be obtained.
callbackUrl
String
No
HTTP/HTTPS receiver URL; overrides project callback settings only together with a nonblank callbackSecretKey.
callbackSecretKey
String
No
Callback signing secret shared with the receiver. An incomplete URL/secret pair falls back to project settings.
extra
Object
No
Opaque JSON object with at most 20 key/value pairs. May be returned with results; status-only responses can omit it.
Request example
{
"type": 1,
"video": "https://media.example.com/video.mp4",
"strategyId": "DEFAULT",
"lang": "auto",
"extra": {
"bizId": "vod-10001"
}
}
The domain is a placeholder; replace it with a real accessible video. For Base64, set type to 2 and put the encoded video file in video.
Response format
The response body is JSON, with the response header Content-Type: application/json.
Field
Type
Description
errorCode
Integer
0 means accepted, not that moderation has completed.
errorMessage
String
Error message; normally omitted on success.
result.taskId
String
Task ID for queries and callback correlation.
{
"errorCode": 0,
"result": {
"taskId": "cn_00000000-0000-0000-0000-000000000001_1791763200000"
}
}
Save result.taskId from the actual response. The example ID cannot be reused in subsequent requests.
Errors
See Error codes and handling; handle HTTP status, errorCode, task/result status code, and moderation verdict result separately.
Submit a VOD video for asynchronous image and audio moderation. Retrieve results by query or callback after submission.
POST
https://vsafe.ilivedata.com/api/v1/video/check/submitRequest format
Send a UTF-8 encoded JSON body.
| Request header | Required | Description |
|---|---|---|
Content-Type |
Yes | application/json; charset=UTF-8 |
Accept |
Recommended | application/json |
For authentication headers and signing rules, see Request signature in the Help Center. Use the submitting project when querying or stopping a task.
Video requirements
- Supported input types: URL, BASE64
- Supported video formats: mp4, m4v, mov, mkv, webm, flv, avi, asf, wmv, rm, rmvb, 3gp, 3g2, mpg, mpeg, vob, ts, mts, m2ts, ogv, mxf, dv
- Video size: URL downloads must not exceed
1GB; BASE64 input must not exceed15 MiBencoded characters, without a Data URL prefix - Video requirements: Files must be complete, unencrypted, and contain a decodable video track. Audio tracks must also be decodable when audio moderation is required. Supported formats refer to file containers; processing depends on the codecs inside the file, not just its extension
- URL requirements: Point directly to an accessible video file; web pages and playlist URLs are not supported
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
type |
Integer | Yes | 1: URL; 2: Base64. |
video |
String | Yes | For type=1, an accessible video URL; for type=2, plain Base64 without a Data URL prefix, at most 15×1024×1024 encoded characters. No videoName is required. |
frequency |
Integer | No | Frame interval in seconds, 1–60. When omitted, uses project sampling configuration; without a matching rule, defaults to 2 seconds for videos under 10 seconds, otherwise 3 seconds. Enabled flash-frame detection takes precedence. |
referImage |
String | No | Reference image URL for face comparison; use JPG/PNG under 10 MB. Execution depends on the moderation strategy and downstream support. |
strategyId |
String | No | Moderation strategy; defaults to DEFAULT. |
lang |
String | No | Audio language; omitted or empty means auto. Supported languages |
alternativeTags |
Integer[] | No | Additional moderation categories: 100,110,120,130,140,150,160,170,180,190,900,999. This is not the full list of output categories. |
userId |
String | No | Business end-user ID; keep within 32 characters. Does not select an RTC stream or publisher. |
userIP |
String | No | End-user IP. |
did |
String | No | Device ID. |
dtype |
String | No | Device type: 1 iPhone, 2 Android, 3 iPad, 4 Windows Phone, 5 PC, 6 Web, 7 WAP. |
callbackRegion |
String | No | Callback region: cn/us/eu/ap. The task region takes precedence; this is a fallback when the task region cannot be obtained. |
callbackUrl |
String | No | HTTP/HTTPS receiver URL; overrides project callback settings only together with a nonblank callbackSecretKey. |
callbackSecretKey |
String | No | Callback signing secret shared with the receiver. An incomplete URL/secret pair falls back to project settings. |
extra |
Object | No | Opaque JSON object with at most 20 key/value pairs. May be returned with results; status-only responses can omit it. |
Request example
{
"type": 1,
"video": "https://media.example.com/video.mp4",
"strategyId": "DEFAULT",
"lang": "auto",
"extra": {
"bizId": "vod-10001"
}
}
The domain is a placeholder; replace it with a real accessible video. For Base64, set type to 2 and put the encoded video file in video.
Response format
The response body is JSON, with the response header Content-Type: application/json.
| Field | Type | Description |
|---|---|---|
errorCode |
Integer | 0 means accepted, not that moderation has completed. |
errorMessage |
String | Error message; normally omitted on success. |
result.taskId |
String | Task ID for queries and callback correlation. |
{
"errorCode": 0,
"result": {
"taskId": "cn_00000000-0000-0000-0000-000000000001_1791763200000"
}
}
Save result.taskId from the actual response. The example ID cannot be reused in subsequent requests.
Errors
See Error codes and handling; handle HTTP status, errorCode, task/result status code, and moderation verdict result separately.