Status Codes
| Status Code | Name | Description | What to Do |
|---|---|---|---|
| 200 | Success | Sectioning completed successfully. | Continue with normal operations. |
| 400 | Bad Request | Invalid request due to Markdown download failure from URL. | Review error message for specific issue. See Status 400. |
| 401 | Unauthorized | Missing or invalid API key. | Check that your Authorization 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. | Review your request parameters. See Status 422. |
| 429 | Too Many Requests | Rate limit exceeded. | Wait before retrying. Reduce request frequency and implement exponential backoff. |
| 500 | Internal Server Error | Server error during sectioning. | Retry. If the issue persists, contact support@landing.ai. See Status 500. |
| 504 | Gateway Timeout | Request 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 providedmarkdown_url.
Error message:
- 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 themarkdown parameter or markdown_url parameter, or when the values are empty.
Error message:
- Use the
markdownparameter to upload a Markdown file or provide inline Markdown content, OR - Use the
markdown_urlparameter to provide a URL to a Markdown file.
Error: Both ‘markdown’ and ‘markdown_url’ provided
This error occurs when your request includes both themarkdown and markdown_url parameters.
Error message:
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 formarkdown_url is not a valid URL.
Error message:
- Verify that the URL is correctly formatted (for example,
https://example.com/document.md). - Ensure the URL includes a scheme (
https://orhttp://).
Error: Multiple markdown files detected
This error occurs when multiple Markdown files are included in the request. Error message:Error: Unsupported format
This error occurs when you provide a file other than Markdown (.md) to the section endpoint. Error message:- 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:
- 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:- Retry the request.
- If the error persists, contact support@landing.ai.
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
guidelinesparameter is optional. Start without guidelines to see the default behavior before customizing the hierarchy.

