Examples
API errors
HTTP status codes and error handling
API errors are returned as JSON.
{
"error": "Message"
}Status codes
| Status | Meaning | Common cause |
|---|---|---|
400 | Bad request | Missing file, invalid JSON, wrong content type. |
401 | Unauthorized | Missing or invalid API token. |
403 | Forbidden | Invalid upload bucket. |
404 | Not found | Unknown job ID or unsupported local-mode endpoint. |
409 | Conflict | Job download requested before the file is ready. |
429 | Too many requests or quota exhausted | API conversion quota is exhausted. |
500 | Server error | Conversion failed or an unexpected error occurred. |
Common errors
Missing file
{
"error": "Missing 'file' field"
}Send multipart/form-data with a file field.
Invalid token
{
"error": "Invalid API token"
}Check that the header is exactly:
Authorization: Bearer YOUR_API_TOKENUnsupported format
{
"error": "Unsupported file format"
}Check supported formats. If the file extension is wrong, pass from.
Not ready
{
"error": "Not ready"
}The job has not completed. Poll /convert/jobs/:id until status is success.
Retry guidance
- Retry network failures and
5xxresponses with backoff. - Do not retry
400,401, or403until the request is fixed. - For async jobs, retry job creation only if you did not receive a job ID.
- If a job returns
failed, create a new job after fixing the input.