Examples

API errors

HTTP status codes and error handling

API errors are returned as JSON.

{
  "error": "Message"
}

Status codes

StatusMeaningCommon cause
400Bad requestMissing file, invalid JSON, wrong content type.
401UnauthorizedMissing or invalid API token.
403ForbiddenInvalid upload bucket.
404Not foundUnknown job ID or unsupported local-mode endpoint.
409ConflictJob download requested before the file is ready.
429Quota exhaustedAPI conversion quota is used up.
500Server errorConversion 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_TOKEN

Unsupported 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 5xx responses with backoff.
  • Do not retry 400, 401, or 403 until 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.