Video Removal API Reference
Video Removal Submission API
GET/POST
/ai/video/removal
Request Parameters
paramJson
Object
Yes
Parameter
videoUrl
String
Yes
Video URL. Supported specifications:
Video formats: mp4, mov, webm, avi, mkv
Video file size limit: up to 200MB
Video duration limit: up to 6 minutes
Maximum resolution supported: 1080P
language
String
Yes
Source language code, supports Chinese (zh) / English (en).
Example value: "en"
artificialTextOnly
Boolean
No
Default is true
, which removes only artificially created text;
Passing false
will remove all text, including both artificial text and natural text on products.
Example value: true
removeAudio
Boolean
No
Default is false
, which keeps the original audio track.
Set to true
to mute the original audio.
inpaintingBoxes
Dict[]
No
Remove Specified Areas.
inpaintingBoxes
is an array of objects, where each object contains a timestamp and the corresponding normalized coordinates of the box (x1, y1, x2, y2).
Example input:
[
{"timestamp": [1.5, 3.7], "box": [0.3, 0.4, 0.6, 0.7]},
{"timestamp": [5, 6.4], "box": [0.5, 0.6, 0.8, 0.8]},
{"timestamp": [6.8, 7.6], "box": [0.4, 0.7, 0.7, 0.9]}
]
The origin is at the top-left corner of the video frame, with x-coordinates running horizontally and y-coordinates vertically. Normalization involves dividing the x-coordinate by the width and the y-coordinate by the height, resulting in values between 0 and 1.
colorBlocks
Boolean
No
Whether to remove the color block behind the text.
The default value is false
.
When true
is passed, the removal range is larger, allowing you to remove the entire color block and text, as well as surrounding logos or stickers, etc.
Example:

By default (false
):

If set to true
:

Sample Request
The API's maximum response time is 30s. When calling the API, it's recommended to set the request timeout to no more than 30s.
For other programming languages, please refer to Quick Start.
/*The domain url of the API.
*for api purchased on global site. set api_domain to "https://api.aidc-ai.com"
*for api purchased on chinese site. set api_domain to "https://cn-api.aidc-ai.com"*/
IopClient client = new IopClientImpl("domain url", "your key", "your secret");
IopRequest request = new IopRequest();
request.setApiName("/ai/video/removal");
// If no official quota is purchased, please add a trial flag; otherwise, a NoResource error code will be returned.
// request.addHeaderParameter("x-iop-trial","true");
request.addHeaderParameter("x-iop-ai-partner-type", "aidge_video_share");
JSONObject jsonObject = new JSONObject();
jsonObject.put("videoUrl", "https://pro-video.lazcdn.com/gv/lzd_gsp_assortment/video_target/gv93-76454756-a1aafe28-92707877-5efa/trans/d1941c18-8d80-4fb6-bc67-133cb7ebeec8-hd.mp4");
jsonObject.put("language", "zh");
// Create inpaintingBoxes
JSONArray inpaintingBoxes = new JSONArray();
JSONObject box1 = new JSONObject();
box1.put("timestamps", new JSONArray(new String[]{"1", "4.5"}));
box1.put("box", new JSONArray(new String[]{"0.2", "0.8", "0.8", "1.0"}));
inpaintingBoxes.put(box1);
jsonObject.put("inpaintingBoxes", inpaintingBoxes.toString());
request.addApiParameter("paramJson", jsonObject.toString());
IopResponse response = client.execute(request);
System.out.println(response.getBody());
Thread.sleep(10);
Response Parameters
resCode
Number
Response code; 200 indicates a successful call, other response codes can be referred to the error code information.
data
Object
Structured information of the returned result.
taskStatus: submitted、running、finished、failed(Enum Value)
requestId
String
Request ID: used to identify a unique request call.
resMessage
String
Error message, like "content has sensitive data, please try other input".
{
"data": {
"usage": 0,
"result": {"taskId": "5104d468-1226-48f1-bc1b-c67ace8ba597"}‘
},
"resCode": 200,
"resMessage": "success",
"code": "0",
"request_id": "2151f8e017567307426955233",
"_trace_id_": "213db7b317567307425621499eba99"
}
Video Removal Query API
GET/POST
/ai/video/removal/result
Request Parameters
taskId
String
Yes
Task ID.
Response Parameters
resCode
Number
Response code; 200 indicates a successful call, other response codes can be referred to the error code information.
data
Object
Structured information of the returned result.
requestId
String
Request ID: used to identify a unique request call.
resMessage
String
Error message,like "content has sensitive data, please try other input".
Response Example
{
"data": {
"usage": 0,
"taskId": "5104d468-1226-48f1-bc1b-c67ace8ba597",
"taskStatus": "finished",
"taskResult": [
{
"usage": 1,
"taskStatus": "finished",
"taskResult": "{\"result\":\"{\\\"data\\\":{\\\"message\\\":[],\\\"usageMap\\\":\\\"{\\\\\\\"usage\\\\\\\":12,\\\\\\\"removeVideo\\\\\\\":8}\\\",\\\"structData\\\":{\\\"videoUrl\\\":\\\"https://aib-image.oss-ap-southeast-1.aliyuncs.com/video-trans%2Fb8d258da-8731-11f0-864c-00163e17520f.mp4?OSSAccessKeyId=LTAI5tSEGjGp5wixZgHLc3bV&Expires=1759322807&Signature=Xjth7QiZdNpZwtgmUUP53ED1pF0%3D\\\",\\\"usageMap\\\":\\\"{\\\\\\\"removeVideo\\\\\\\": 8, \\\\\\\"usage\\\\\\\": 12}\\\"}},\\\"success\\\":true,\\\"requestId\\\":\\\"0bafc8b417567308074862638d0f5d\\\"}\",\"usage\":1,\"usageMap\":\"{\\\"usage\\\":12,\\\"removeVideo\\\":8}\"}"
}
]
},
"resCode": 200,
"resMessage": "success",
"code": "0",
"request_id": "2102e47617567308126158541",
"_trace_id_": "216661c117567308124622162ebafa"
}
Error Code
500
system error
System error.
501
rate limit exceed
The current interface has reached the current limit. Please contact us via Discord or email us ([email protected]) to increase the current limit value.
700
video duration exceeds the limit
Video duration exceeds the limit.
701
the video file size exceeds the limit
Video file size exceeds the limit.
702
video format not supported
Video format is not supported.
703
video resolution is not supported
Video resolution is not supported.
801
model failed
Internal call exception. Please contact us via Discord or email us ([email protected]) for troubleshooting.
1000
content has sensitive data, please try other input
The request parameters contain sensitive information and cannot be processed at this time. Please try a different input.
1001
content control failed, please retry
The risk control service failed. Please contact us via Discord or email us ([email protected]) .
1002
content risk filter failed, please contact us
Content risk filter failed. Please contact us via Discord or email us ([email protected]) .
Last updated
Was this helpful?