API Reference
Responses & Errors
Error schema and recommended handling strategies.
API Reference
Error schema and recommended handling strategies.
{
"error": {
"code": "insufficient_credits",
"message": "Not enough credits to process this video",
"request_id": "req_123456"
}
}| Endpoint | HTTP | Example Message | Action |
|---|---|---|---|
| /api/upload | 400 | Invalid file type | Use supported video MIME |
| /api/upload | 400 | File too large | Keep file <= 500MB |
| /v1/jobs/{job_id} | 404 | Job not found | Check job id and key ownership |
| /api/download/{job_id} | 400 | Job not completed | Poll status until completed |
| /v1/jobs | 500 | Processing failed | Retry with backoff |
| Check | How to Verify |
|---|---|
| Authentication | Call endpoint with valid and invalid key, confirm 200 vs 401 |
| Rate limits | Burst test and confirm 429 handling with backoff |
| Idempotency | Retry same request and verify no duplicate side effects |
| Observability | Confirm request_id/job_id appears in logs and dashboards |
| Class | Examples | Action |
|---|---|---|
| Client Errors (4xx) | invalid_request, invalid_api_key | Fix payload/config |
| Capacity/Limit | rate_limited, insufficient_credits | Retry/backoff or top-up |
| Server Errors (5xx) | internal_error, timeout | Retry with fallback and alerting |
Responses & Errors belongs to the API Reference section and covers error schema and recommended handling strategies.
The page is written for developers and operators who need predictable video background removal behavior in production, not just a one-off demo request.
Before you promote this workflow, test it with at least one short clip, one longer clip, and one visually difficult clip from your actual product or customer segment.
For support and debugging, persist the original input reference, selected model, output format, credit usage, and final job status alongside your internal user or project id.
| Question | Answer |
|---|---|
| Is Responses & Errors required for every integration? | Use it when your integration calls this endpoint directly; otherwise review it to understand the contract behind SDK helpers. |
| What should I test before going live? | Verify success, failure, timeout, retry, and insufficient-credit paths with realistic video files and the same output format you plan to ship. |
| How does this connect to the rest of the API? | Most workflows connect upload or source URL handling, job creation, status polling, output retrieval, usage tracking, and operational logging. |