Video subtitle & watermark removal
Submit a video cleanup task and retrieve the processed video.
POST /api-platform/v1/video/remove-subtitles detects subtitles when region is omitted, or processes the supplied rectangle. POST /api-platform/v1/video/remove-watermark requires one fixed rectangle. Coordinates are integer pixels in the original encoded video, with x2 > x1, y2 > y1, entirely inside the frame. Moving or multiple watermark regions are not supported in this release.
| Parameter | Values |
|---|---|
videoUrl | Public HTTP(S) video URL, at most 200 MiB / 600 seconds |
engine | base (default), pro |
method | BASE only: inpaint (default) or blur; omit for PRO |
region | {x1,y1,x2,y2}, optional for subtitles, required for watermarks |
Normalize video rotation before submitting. PRO requires an MP4 container and a shorter edge no larger than 1080 pixels. PRO availability depends on the server's upload configuration. The server probes the actual video duration. Tools API explains availability, idempotency, media uploads, and polling.
curl 'https://aihub-admin.aimix.pro/api-platform/v1/video/remove-watermark' \
-H "Authorization: Bearer $PIXMIND_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cleanup-order-001' \
-d '{"videoUrl":"https://example.com/input.mp4","engine":"base","method":"inpaint","region":{"x1":100,"y1":80,"x2":420,"y2":180}}'const response = await fetch("https://aihub-admin.aimix.pro/api-platform/v1/video/remove-subtitles", {
method: "POST", headers: {Authorization: `Bearer ${process.env.PIXMIND_API_KEY}`, "Content-Type": "application/json", "Idempotency-Key": "cleanup-order-002"},
body: JSON.stringify({videoUrl: "https://example.com/input.mp4", engine: "base", method: "inpaint"})
});
const created = await response.json();
if (!response.ok || created.code !== 1000) throw new Error(created.message);
console.log(created.data.taskId, created.data.statusUrl);import os, requests
response = requests.post("https://aihub-admin.aimix.pro/api-platform/v1/video/remove-subtitles",
headers={"Authorization": "Bearer " + os.environ["PIXMIND_API_KEY"], "Idempotency-Key": "cleanup-order-003"},
json={"videoUrl": "https://example.com/input.mp4", "engine": "base", "method": "inpaint"}, timeout=30)
response.raise_for_status()
created = response.json()
if created["code"] != 1000: raise RuntimeError(created["message"])
print(created["data"])Create returns {taskId,status:"processing",type,model,statusUrl} inside data. Query GET /api-platform/v1/video/cleanup/tasks/{taskId}. A completed task returns status:"ready", videoUrl, progress, and usage:{credits,units,refunded}. A failed task returns status:"failed" and error:{code,message}; charged failures refund the original API transaction.