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

Status Codes

Status CodeNameDescriptionWhat to Do
200SuccessSectioning completed successfully.Continue with normal operations.
400Bad RequestInvalid request due to Markdown download failure from URL.Review error message for specific issue. See Status 400.
401UnauthorizedMissing or invalid API key.Check that your Authorization 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.
429Too Many RequestsRate limit exceeded.Wait before retrying. Reduce request frequency and implement exponential backoff.
500Internal Server ErrorServer error during sectioning.Retry. If the issue persists, contact support@landing.ai. See Status 500.
504Gateway TimeoutRequest processing exceeded the timeout limit.Reduce Markdown content size. See Status 504.

Status 400: Bad Request

This status code indicates a client-side error. Review the specific error message to identify the issue.

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).

Status 422: Unprocessable Entity

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

Error: No markdown provided

This error occurs when your request does not include the markdown parameter or markdown_url parameter, or when the values are empty. 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 provide inline Markdown content, OR
  • Use the markdown_url parameter to provide a URL to a Markdown file.

Error: Both ‘markdown’ and ‘markdown_url’ provided

This error occurs when your request includes both the markdown and markdown_url parameters. Error message:
Cannot provide both 'markdown' and 'markdown_url'.
What to do: Remove one of the parameters. Use either markdown (to upload a file or provide inline content) or markdown_url (to specify a URL), but not both in the same request.

Error: Invalid ‘markdown_url’ format

This error occurs when the value provided for markdown_url is not a valid URL. Error message:
Invalid URL format: {url}
What to do:
  • Verify that the URL is correctly formatted (for example, https://example.com/document.md).
  • Ensure the URL includes a scheme (https:// or http://).

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 document 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 section endpoint. Error message:
Unsupported format: {mime_type} ({filename}). Supported formats: MD
What to do:
  • The section endpoint only accepts Markdown files with a .md extension.
  • If you have a PDF, DOCX, or other document format, use the API to convert your document to Markdown first, then pass the parsed Markdown output to the section endpoint.
  • Ensure your file has a .md extension and contains valid UTF-8 encoded Markdown content.

Error: Missing reference anchors

This error occurs when the Markdown content does not contain reference anchors. The section endpoint requires Markdown output from the API, which includes <a id="..."></a> anchors that uses to map sections to chunks. Error message:
Invalid markdown: missing reference anchors. Markdown must contain <a id="..."></a> reference delimiters. Use the parse tool to generate properly formatted markdown.
What to do:
  • Do not pass plain Markdown or documents you have formatted manually. Use the Markdown output from the API as input.
  • Confirm the Markdown content contains <a id="..."></a> anchor tags before sending it to the section endpoint.

Status 500: Internal Server Error

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

Status 504: Gateway Timeout

This error occurs when the sectioning process exceeds the timeout limit. What to do:
  • Reduce the size of your Markdown document.
  • If the error persists, contact support@landing.ai.

Best Practices for Avoiding Errors

  • Use parsed Markdown: Always pass Markdown content generated by the API. The section endpoint requires structured Markdown with reference anchors (<a id="..."></a>).
  • Use guidelines sparingly: The guidelines parameter is optional. Start without guidelines to see the default behavior before customizing the hierarchy.

When Are Credits Consumed?

Credits are consumed only when the API returns a 200 status code. All other responses, including errors, do not consume credits.