Skip to main content
Use this section to troubleshoot issues encountered when calling the API (https://api.va.landing.ai/v1/ade/extract).

Status Codes

Status CodeNameDescriptionWhat to Do
200SuccessExtraction completed successfully and extracted data conforms to the schema.Continue with normal operations.
206Partial ContentExtraction completed but extracted data does not fully conform to the schema.Review the schema_violation_error field in the response and adjust your schema or document. See Status 206 errors.
400Bad RequestInvalid request due to malformed input, unsupported version, or client-side extraction errors.Review error message for specific issue. See Status 400 errors.
401UnauthorizedMissing or invalid API key.Check that your apikey header is present and contains a valid API key.
402Payment RequiredYour 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.
422Unprocessable EntityInput validation failed.Review your request parameters. See Status 422 errors.
429Too Many RequestsRate limit exceeded.Wait before retrying. Reduce request frequency and implement exponential backoff.
500Internal Server ErrorServer error during processing.Retry. If the issue persists, contact support@landing.ai. See Status 500 errors.
504Gateway TimeoutRequest processing exceeded the timeout limit (475 seconds).Reduce document size or simplify extraction schema. See Status 504 errors.

Status 206: Partial Content

This response occurs when extraction completes successfully but the extracted data does not fully conform to the provided JSON schema. The API returns a 206 status code with the extracted data and a schema_violation_error field that contains details about the validation failure. Because the API returns at least partial results, the API call consumes credits. The errors in this section may appear in the schema_violation_error field when you receive a 206 status code. What to do:
  • Review the specific validation error in the schema_violation_error field.
  • Verify the JSON schema follows the guidelines described in Extraction Schema (JSON). Update your JSON schema if needed.
  • Check if the document contains the expected data in the expected format.

Error: Extracted data does not completely conform to the requested schema

This error occurs when the extracted data violates the JSON schema validation rules. The error message includes details from the validation process. Error message:
Extracted data does not completely conform to the requested schema. See below error for details.
{validation_error_details}
Please read our documentation for more information: https://docs.landing.ai/ade/ade-extract-troubleshoot
What to do:
  • Review the validation error details to identify the specific schema violation.
  • Verify the JSON schema follows the guidelines described in Extraction Schema (JSON). Update your JSON schema if needed.
  • Check if the document contains the expected data in the expected format.

Error: None is not of type ‘TYPE’

This error occurs when a field contains a null value but the field is not marked as nullable in the schema. Error message:
None is not of type 'string'

Failed validating 'type' in schema['properties']['field_name']:
    {'type': 'string'}

On instance['field_name']:
    None
What to do: Mark the field as nullable using the nullable keyword. For more information, go to Nullable Fields.

Error: Top-level schema must be of type ‘object’

This error occurs if the top-level element on the schema is not object. The top-level element of the schema must be object. Correct:
{
  "title": "Invoice Schema",
  "description": "Schema for invoice extraction",
  "type": "object",
  "required": [
    "Account Number"
  ],
  "properties": {
    "Account Number": {
      "type": "string",
      "description": "Account Number"
    }
  }
}
Incorrect:
{
  "title": "Invoice Schema",
  "description": "Schema for invoice extraction",
  "type": "array",
  "items": {
    "type": "object",
    "required": [
      "Account Number"
    ],
    "properties": {
      "Account Number": {
        "type": "string",
        "description": "Account Number"
      }
    }
  }
}

Error: Schema depth exceeds 5 at PATH

This error occurs when the schema has more than five nested levels. The extraction schema supports up to five nested levels.

Error: Type list definition at PATH cannot contain ‘object’ or ‘array’. Please use ‘anyOf’ instead.

This error occurs when you define a JSON schema field with a type array (e.g., "type": ["string", "array"]) that includes object or array as one of the options. Common scenarios that trigger this error:
  • "type": ["number", "object"]
  • "type": ["string", "array"]
  • "type": ["object", "array"]
Solution: Replace the type array with an anyOf construct. For more information, go to Type Arrays with Complex Types. Correct:
{
  "type": "object",
  "properties": {
    "field1": {"type": "string"},
    "field2": {
      "anyOf": [
        {"type": "number"},
        {"type": "object"}
      ]
    }
  },
  "required": ["field1", "field2"]
}
Incorrect
{
  "type": "object",
  "properties": {
    "field1": {"type": "string"},
    "field2": {"type": ["number", "object"]}
  },
  "required": ["field1", "field2"]
}

Error: ‘properties’ must be defined for object at root

This error occurs when fields (properties) are not defined for object types in the extraction schema. To fix this issue, define the properties field for all object types in the schema. Correct:
{
  "title": "Invoice Schema",
  "description": "Schema for invoice extraction",
  "type": "object",
  "required": [
    "Name",
    "Total"
  ],
  "properties": {
    "Account Number": {
      "type": "string",
      "description": "Name"
    },
    "Total": {
      "type": "number",
      "description": " Total"
    }
  }
}
Incorrect:
{
  "title": "Invoice Schema",
  "description": "Schema for invoice extraction",
  "type": "object",
  "required": [
    "Name",
    "Total"
  ]
}

Error: ‘items’ must be defined for array at PATH

This error occurs when an array is missing the items definition. To fix this issue, define the fields in the array with items. Correct:
{
  "title": "Markdown Document Field Extraction Schema",
  "type": "object",
  "properties": {
    "sections": {
      "type": "array",
      "title": "Sections",
      "description": "A list of main sections in the document.",
      "items": {
        "type": "object",
        "properties": {
          "heading": {
            "type": "string",
            "title": "Section Heading",
            "description": "The heading/title of the section."
          },
          "content": {
            "type": "string",
            "title": "Section Content",
            "description": "The main text content of the section."
          }
        },
        "required": [
          "heading",
          "content"
        ]
      }
    }
  },
  "required": [
    "sections"
  ]
}
Incorrect:
{
  "title": "Markdown Document Field Extraction Schema",
  "type": "object",
  "properties": {
    "sections": {
      "type": "array",
      "title": "Sections",
      "description": "A list of main sections in the document.",
    }
  },
  "required": [
    "sections"
  ]
}

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 JSON schema

This error occurs when the extraction_schema parameter contains invalid JSON. Error message:
Invalid JSON schema: Expecting value: line 1 column 1 (char 0)
What to do:
  • Verify your extraction schema is valid JSON.
  • Check for syntax errors (missing commas, quotes, brackets).
  • Verify the JSON schema follows the guidelines described in Extraction Schema (JSON). Update your JSON schema if needed.

Error: Failed to download document from URL

This error occurs when the API cannot download the Markdown file from the provided markdown_url. Error message:
Failed to download document from URL: {error_details}
What to do:
  • Verify the URL is accessible and returns valid content.
  • Check network connectivity and URL permissions.
  • Ensure the URL points to a Markdown file (.md extension).

Error: Field extraction invalid

This error occurs when the extraction process fails due to issues with the extraction schema or the extracted data. Error message:
Field extraction invalid: {error_details}
What to do:
  • Review the error details in the response.
  • Verify the JSON schema follows the guidelines described in Extraction Schema (JSON). Update your JSON schema if needed.
  • Ensure all required fields are properly defined in the schema.
  • Check if the document contains data that matches the schema structure.

Error: Invalid extract version

This error occurs when an unsupported model version is specified. Error message:
Invalid extract version '{version}' provided. Valid versions are: {list_of_versions} or use 'extract-latest' to use the latest version.
What to do:
  • Use one of the supported versions listed in the error message.
  • Use extract-latest to automatically use the latest version.
  • If you don’t specify a version, the API uses the latest version by default.
  • For more information, go to Extraction Model Versions.

Status 422: Unprocessable Entity

This status code indicates input validation failures. Review the error message and adjust your request parameters.

Error: Cannot provide both ‘markdown’ and ‘markdown_url’

This error occurs when both a Markdown file and a URL to a Markdown file are provided in the same request. Error message:
Cannot provide both 'markdown' and 'markdown_url'. Please provide only one.
What to do: Choose one input method:
  • Provide a Markdown file using the markdown parameter, OR
  • Provide a URL to a Markdown file using the markdown_url parameter.

Error: Must provide either ‘markdown’ or ‘markdown_url’

This error occurs when your request does not include either the markdown or markdown_url parameter. Error message:
Must provide either 'markdown' or 'markdown_url'.
What to do: Add one of these parameters to your request:
  • Use the markdown parameter to upload a Markdown file, OR
  • Use the markdown_url parameter to provide a URL to a Markdown file.

Error: No markdown file or URL provided

This error occurs when you include a markdown or markdown_url parameter in your request, but the value is empty or blank. Error message:
No markdown file or URL provided.
What to do:
  • If using markdown: Ensure you are uploading a valid Markdown file (not an empty file or blank value).
  • If using markdown_url: Ensure the parameter contains a valid URL (not an empty string or blank value).
  • Verify that your request properly includes the file or URL value.

Error: Multiple Markdown files detected

This error occurs when multiple Markdown files are included in the request. Error message:
Multiple markdown files detected (X). Please provide only one markdown file.
What to do: Send only one Markdown file per request.

Error: Unsupported format

This error occurs when you provide a file other than Markdown (.md) to the extract endpoint, such as PDF, DOCX, XLSX, or image files. Error message:
Unsupported format: {mime_type} ({filename}). Supported formats: MD
What to do:
  • The extract endpoint only accepts Markdown files with a .md extension.
  • If you have a PDF, DOCX, or other document format, use the Parse API endpoint to convert your document to Markdown first.
  • Ensure your file has a .md extension and contains valid UTF-8 encoded Markdown content.

Status 500: Internal Server Error

This error indicates an unexpected server error occurred during processing. What to do:

Status 504: Gateway Timeout

This error occurs when the extraction process exceeds the timeout limit (475 seconds). Error message:
Request timed out after 475 seconds
What to do:
  • Reduce the size of your Markdown document.
  • Simplify your extraction schema and verify it follows the guidelines described in Extraction Schema (JSON). Update your JSON schema if needed.
  • If the error persists, contact support@landing.ai.

Errors for extract-20250930

The following errors only occur when using extraction model extract-20250930.

Error: Only JSON schema version 2020-12 is supported. Invalid JSON Schema: ‘unknown_type’ is not valid under any of the given schemas

This error occurs when an unsupported data type is specified for a field in the extraction schema. To see a list of supported data types, go to Supported Data Types.

Error: Keyword ‘KEY’ is not supported

This error occurs when a prohibited keyword is included in the schema. For more information, go to Extraction Schema (JSON).