> ## Documentation Index
> Fetch the complete documentation index at: https://docs.landing.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Troubleshoot Classification

export const classify = 'ADE Classify';

export const splitJSON = 'split rules';

export const split = 'ADE Split';

export const adePythonLibrary = 'ade-python';

export const dpt2mini = 'DPT-2 mini';

export const dpt2 = 'DPT-2';

export const dpt1 = 'DPT-1';

export const dpt = 'Document Pre-Trained Transformer';

export const companyName = 'LandingAI';

export const extract = 'ADE Extract';

export const parse = 'ADE Parse';

export const ade = 'Agentic Document Extraction';

Use this section to troubleshoot issues encountered when calling the [{classify}](https://docs.landing.ai/api-reference/tools/ade-classify) API.

## Common Status Codes

| Status Code | Name                   | Description                                                       | What to Do                                                                                                                                  |
| ----------- | ---------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| 200         | Success                | Classification completed successfully.                            | Continue with normal operations.                                                                                                            |
| 400         | Bad Request            | Invalid request parameters.                                       | Review the error message. See [Status 400](#status-400-bad-request).                                                                        |
| 401         | Unauthorized           | Missing or invalid API key.                                       | Check that your API key header is present and contains a valid [API key](./agentic-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](./agentic-api-key). Add more credits to your account.           |
| 413         | Content Too Large      | The document exceeds the 200 MB size limit.                       | Reduce the file size and retry. See [Status 413](#status-413-content-too-large).                                                            |
| 415         | Unsupported Media Type | The document could not be read or converted.                      | Convert the document to PDF and retry. See [Status 415](#status-415-unsupported-media-type).                                                |
| 422         | Unprocessable Entity   | Input validation failed.                                          | Review your request parameters. See [Status 422](#status-422-unprocessable-entity).                                                         |
| 429         | Too Many Requests      | Rate limit exceeded.                                              | Wait before retrying. Reduce request frequency and implement exponential backoff.                                                           |
| 500         | Internal Server Error  | Server error during classification.                               | Retry. If the issue persists, contact [support@landing.ai](mailto:support@landing.ai). See [Status 500](#status-500-internal-server-error). |
| 502         | Bad Gateway            | The classification service returned an error.                     | Retry. If the issue persists, contact [support@landing.ai](mailto:support@landing.ai). See [Status 502](#status-502-bad-gateway).           |
| 504         | Gateway Timeout        | Request processing exceeded the timeout limit.                    | Reduce document size or number of pages. See [Status 504](#status-504-gateway-timeout).                                                     |

## 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 document URL

This error occurs when the URL provided in `document_url` cannot be fetched. The URL may be invalid, unreachable, or return a non-200 response.

**What to do:**

* Verify the URL is correct and publicly accessible.
* Confirm the server hosting the document does not require authentication or block external requests.
* If the document is behind a firewall or requires credentials, download it locally and upload it using the `document` parameter instead.

## Status 413: Content Too Large

This error occurs when the document you submit exceeds the 200 MB file size limit.

**What to do:**

* Reduce the file size before uploading.
* If the document is a PDF, consider compressing it or splitting it into smaller files before classifying.

## Status 415: Unsupported Media Type

This error occurs when a document in a supported office format (such as DOCX or PPTX) could not be converted to PDF for processing. This is a server-side conversion failure, not a format restriction.

**What to do:**

* Convert the document to PDF before uploading and retry.
* If the error persists, contact [support@landing.ai](mailto:support@landing.ai).

## Status 422: Unprocessable Entity

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

### Error: Unsupported file format

This error occurs when you submit a file type that the {classify} API does not support.

**What to do:**

* Convert your document to a supported format before calling the API.
* For supported file formats, see [Supported File Types](./ade-classify#supported-file-types).

### Error: Both document fields provided

This error occurs when you include both `document` and `document_url` in the same request.

**What to do:**

* Include only one document input per request: either upload a file using `document` or provide a URL using `document_url`.

## Status 500: Internal Server Error

This error indicates an unexpected server error occurred during classification.

**What to do:**

* Retry the request.
* If the error persists, contact [support@landing.ai](mailto:support@landing.ai).

## Status 502: Bad Gateway

This error occurs when the internal classification service fails to process the document, typically due to a transient error in the LLM service.

**What to do:**

* Retry the request.
* If the error persists, contact [support@landing.ai](mailto:support@landing.ai).

## Status 504: Gateway Timeout

This error occurs when the classification process exceeds the timeout limit.

**What to do:**

* Reduce the size of your document or the number of pages being classified.
* If the error persists, contact [support@landing.ai](mailto:support@landing.ai).

## When Are Credits Consumed?

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