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
/v1/videos/object-trackAuthorization — This endpoint requires an API key. Pass it in the api-key header on every request. Learn more
Average processing time
For a 10-second input video.
- Processing time
- ≈ 25 s
Input requirements
Videos
- Formats
- MP4, MOV
- Maximum duration
- 300 seconds (5 minutes)
Parameters
| Name | Type | Status | Description |
|---|---|---|---|
task_id | string | Required | Task identifier returned by the object-tracking upload endpoint. |
objects | string | Required | JSON-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
| Field | Type | Description |
|---|---|---|
task_id | string | Unique task identifier. |
input_video_id | string | Source-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"{
"task_id": "tracking-task-id",
"input_video_id": "provider__input-bucket__object-key"
}