/v1/ade/classify).
Common Status Codes
Status 400: Bad Request
This status code indicates invalid request parameters or client-side errors. Review the specific error message to identify the issue.Error: Invalid document URL
This error occurs when the URL provided indocument_url cannot be fetched. The URL may be invalid, unreachable, or return a non-200 response.
What to do:
- Verify the URL is correct and publicly accessible.
- Confirm the server hosting the document does not require authentication or block external requests.
- If the document is behind a firewall or requires credentials, download it locally and upload it using the
documentparameter instead.
Error: Unknown model version
This error occurs when themodel parameter names a version that does not exist. The error message lists the available versions.
What to do:
- Omit
modelto use the latest version, or pass one of the versions the error message lists.
Status 413: Content Too Large
This error occurs when the document you submit exceeds the 50 MiB file size limit. What to do:- Reduce the file size before uploading.
- If the document is a PDF, consider compressing it or splitting it into smaller files before classifying.
Status 422: Unprocessable Entity
This status code indicates input validation failures. Review the error message and adjust your request parameters.Error: Document could not be converted
This error occurs when a document in a supported Office format (such as DOCX or PPTX) could not be converted to PDF for processing. The file may be corrupted or encrypted. What to do:- Convert the document to PDF before uploading and retry.
- If the error persists, contact support@landing.ai.
Error: Unsupported file format
This error occurs when you submit a file type that the Classify API does not support, such as a spreadsheet (XLSX or CSV). What to do:- Convert your document to a supported format before calling the API.
- For supported file formats, see Supported File Types.
Error: Both document fields provided
This error occurs when you include bothdocument and document_url in the same request.
What to do:
- Include only one document input per request: either upload a file using
documentor provide a URL usingdocument_url.
Status 500: Internal Server Error
This error indicates an unexpected server error occurred during classification. What to do:- Retry the request.
- If the error persists, contact support@landing.ai.
Status 502: Bad Gateway
This error occurs when the internal classification service fails to process the document, typically due to a transient error in the large language model (LLM) service. What to do:- Retry the request.
- If the error persists, contact support@landing.ai.
Status 504: Gateway Timeout
This error occurs when classification does not finish within the 475-second limit for synchronous requests. What to do:- Reduce the size of your document or the number of pages being classified.
- If the error persists, contact support@landing.ai.