Errors
The Scavio API uses standard HTTP status codes and returns a structured JSON error body so you can debug issues quickly.
Error Response Format
Every error response has a top-level error string. Validation errors (400) also include a details array that pinpoints each invalid field.
JSON
{
"error": "Human-readable error description"
}Status Codes
| Status | Description |
|---|---|
| 400 | Invalid request body or parameters. Inspect the details array. |
| 401 | Missing or invalid API key |
| 402 | No credits remaining. Top up or upgrade your plan. |
| 403 | API key does not have permission for this action |
| 404 | Endpoint not found. Check the request URL. |
| 405 | Method not allowed. All data endpoints require a POST request with a JSON body. |
| 429 | Too many requests. Wait and retry. |
| 500 | Server error. Retry after a short delay. |
Common Errors
Missing or invalid parameter
400 Bad Request
{
"error": "Invalid request: query is required",
"details": [
{ "path": "query", "message": "query is required" }
]
}Invalid API key
401 Unauthorized
{
"error": "Invalid or missing API key"
}Out of credits
402 Payment Required
{
"error": "No credits remaining. Please upgrade your plan or purchase additional credits."
}Wrong HTTP method
405 Method Not Allowed
{
"error": "Method GET not allowed on /api/v1/tiktok/video. Use POST with a JSON body.",
"allowed_methods": ["POST"]
}Rate limited
429 Too Many Requests
{
"error": "Rate limit exceeded. Retry after 30 seconds."
}Best Practices
- Always check the HTTP status code before parsing the response body
- Read the
errorstring for a human-readable description, and switch on the HTTP status code for programmatic handling - On a 400, inspect the
detailsarray to see exactly which field failed validation - Implement retry logic with exponential backoff for 429 and 500 errors
- Do not retry 400, 401, or 405 errors -- fix the request first