v1/tools/agentic-document-analysis
) endpoint.
Status Codes
Status Code | Name | Description | What to Do |
---|---|---|---|
200 | Success | Request processed successfully and document analyzed | Continue with normal operations |
206 | Partial Content | Document processed but some pages failed or field extraction encountered errors | Check response for errors field and extraction_error details. Some pages may have been skipped or extraction may have failed |
400 | Bad Request | Schema validation failed due to invalid extraction schema format | Review your extraction schema format |
401 | Unauthorized | Missing or invalid API key | Check that your apikey header is present and contains a valid API key |
402 | Payment Required | Your account does not have enough credits to complete processing | If you have multiple accounts, make sure you’re using the correct API key. Add more credits to your account. |
422 | Unprocessable Entity | Input validation failed | See specific 422 error types in Detailed 422 Validation Errors |
429 | Too Many Requests | Rate limit exceeded | Wait before retrying. Reduce request frequency and implement exponential backoff |
500 | Internal Server Error | Server error during processing | Retry. If the issue persists, contact support@landing.ai |
503 | Service Unavailable | Server is not available | Retry. If the issue persists, contact support@landing.ai |
504 | Gateway Timeout | Request processing exceeded the timeout limit | Reduce document size or contact support@landing.ai for help with large documents |
Detailed 422 Validation Errors
Error Description | What 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 Type | Description | What to Do |
---|---|---|
FieldExtractionError | Server-side extraction failure | Retry. If the issue persists, contact support@landing.ai |
FieldValidationError | Client-side validation failure | Review your extraction schema format |
Schema validation failed | Invalid schema structure | Review your extraction schema format |