API Reference
Create remove-background video task
Remove the background from a video. The default foreground output is a transparent WebM; set output_type=mask for an MP4 mask.
Poll Get remove-background video task status until COMPLETED or FAILED.
Model:
remove-background-videoCredit:5/second
post
/v1/videos/remove-backgroundAuthorization — 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.
- Foreground WebM
- ≈ 25 giây
Đo với video đầu vào 1280 px.
Yêu cầu đầu vào
Video
- Định dạng
- MP4, MOV
- Cạnh dài nhất tối đa
- 3840 px (4K)
- Thời lượng tối đa
- 300 giây (5 phút)
Parameters
| Name | Type | Status | Description |
|---|---|---|---|
task_id | string | Required | |
output_type | string | Optional | Return transparent foreground WebM or mask MP4. foregroundmask (default: foreground) |
Responses
Task createdTaskCreatedResponse
| Field | Type | Description |
|---|---|---|
task_id | string | Unique task identifier. Poll the matching task-status endpoint for results. |
status | string | |
created_at | integer | Unix timestamp of task creation |
curl -X POST "https://api.snapedit.app/v1/videos/remove-background" \
-H "api-key: YOUR_API_KEY" \
-F "task_id=value" \
-F "output_type=foreground"Response
{
"task_id": "task_abc123",
"status": "CREATED",
"created_at": 1745827200
}Examples (2 examples)
Play or pause one video to control the whole comparison.
Parameters
output_type=foreground (default)
Input
Output