Use these error code tables to troubleshoot issues encountered when calling the (v1/tools/agentic-document-analysis) endpoint.

Status Codes

Status CodeNameDescriptionWhat to Do
200SuccessRequest processed successfully and document analyzedContinue with normal operations
206Partial ContentDocument processed but some pages failed or field extraction encountered errorsCheck response for errors field and extraction_error details. Some pages may have been skipped or extraction may have failed
400Bad RequestSchema validation failed due to invalid extraction schema formatReview your extraction schema format
401UnauthorizedMissing or invalid API keyCheck that your apikey header is present and contains a valid API key
402Payment RequiredYour account does not have enough credits to complete processingIf you have multiple accounts, make sure you’re using the correct API key. Add more credits to your account.
422Unprocessable EntityInput validation failedSee specific 422 error types in Detailed 422 Validation Errors
429Too Many RequestsRate limit exceededWait before retrying. Reduce request frequency and implement exponential backoff
500Internal Server ErrorServer error during processingRetry. If the issue persists, contact support@landing.ai
503Service UnavailableServer is not availableRetry. If the issue persists, contact support@landing.ai
504Gateway TimeoutRequest processing exceeded the timeout limitReduce document size or contact support@landing.ai for help with large documents

Detailed 422 Validation Errors

Error DescriptionWhat to Do
”Image size should be less than 50MB”Reduce image file size to under 50MB
”PDF size should be less than 50MB”Reduce PDF file size to under 50MB
”PDF contains zero pages. Please provide a PDF with at least one page”Use a valid PDF file with content
”PDF must not exceed X pages”Reduce PDF page count. Page limits depend on your account tier
”Failed to open PDF. Ensure it is a valid PDF file”Use a valid, non-corrupted PDF file. If the PDF is password-protected, remove the password.
”Multiple image files detected (X). Please provide only one image file”Send only one image file per request
”Multiple PDF files detected (X). Please provide only one PDF file”Send only one PDF file per request
”Invalid value for pages parameter: must be a comma-separated list of integers”Format pages parameter correctly (e.g., “0,1,2” for first 3 pages)
“Invalid JSON schema provided for fields_schema”Review your extraction schema format

Field Extraction Errors

These are error types that may occur when performing field extraction.
Error TypeDescriptionWhat to Do
FieldExtractionErrorServer-side extraction failureRetry. If the issue persists, contact support@landing.ai
FieldValidationErrorClient-side validation failureReview your extraction schema format
Schema validation failedInvalid schema structureReview your extraction schema format