SnapeditAPI
Đăng nhậpBắt đầu miễn phí
Đăng nhập
API Reference

Create object-tracking video task

Track 1–64 selected objects through the uploaded source video to produce an aligned mask video.

Submit objects as a JSON-encoded array in a multipart form field. Each object requires a box in source-video pixels, ordered [x1, y1, x2, y2]; optionally include mask, a base64-encoded binary mask within that box (0 for background, 255 for foreground), for more precise selection.

Example objects (box only): [{"box":[455,85,700,544]}].

Example with a more precise mask:

[
  {
    "box": [455, 85, 700, 544],
    "mask": "iVBORw0KGgoAAAA..."
  }
]

The mask string above is abbreviated; supply the full base64-encoded mask.

Poll Get object-tracking video task status until COMPLETED or FAILED.

Credit: 3/second

post/v1/videos/object-track

Authorization — This endpoint requires an API key. Pass it in the api-key header on every request. Learn more

Thời gian xử lý trung bình

Cho video đầu vào dài 10 giây.

Thời gian xử lý
≈ 25 giây

Yêu cầu đầu vào

Video

Định dạng
MP4, MOV
Thời lượng tối đa
300 giây (5 phút)
Xem tất cả yêu cầu đầu vào

Parameters

NameTypeStatusDescription
task_id
stringRequiredTask identifier returned by the object-tracking upload endpoint.
objects
stringRequiredJSON-encoded array of 1–64 objects. Each requires box: [x1, y1, x2, y2] in source-video pixels and optionally mask: a base64-encoded binary mask within the box (0 background, 255 foreground).

Responses

Tracking task submittedObjectTrackVideoCreatedResponse

FieldTypeDescription
task_idstringUnique task identifier.
input_video_idstringSource-video storage ID, reusable with the completed mask_video_id in standard removal.
curl -X POST "https://api.snapedit.app/v1/videos/object-track" \
  -H "api-key: YOUR_API_KEY" \
  -F "task_id=value" \
  -F "objects=value"
Response
{
  "task_id": "tracking-task-id",
  "input_video_id": "provider__input-bucket__object-key"
}

Examples (1 example)

Play or pause one video to control the whole comparison.

Parameters

objects: [{"box": [455, 85, 700, 544]}] (optional base64 mask within the box)

Input

Input 2

Output

{
  "task_id": "tracking-task-id",
  "input_video_id": "provider__input-bucket__object-key"
}

Output Mask