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

# Error Codes

> Error codes returned by the API

All endpoints return a unified response format. A non-zero `code` indicates an error; see the `message` field for details.

<AccordionGroup>
  <Accordion title="Success" icon="circle-check">
    | code | Description |
    | ---- | ----------- |
    | `0`  | Success     |
  </Accordion>

  <Accordion title="Authentication & Authorization" icon="key">
    <Warning>
      For auth errors, verify your API Key format (`sk-***`) and check your account subscription status.
    </Warning>

    | code   | Description                                    |
    | ------ | ---------------------------------------------- |
    | `1107` | Invalid API Key                                |
    | `1108` | No active plan, please purchase a subscription |
    | `1123` | Insufficient remaining pages in plan           |
  </Accordion>

  <Accordion title="Rate Limits" icon="gauge">
    | code   | Description                   |
    | ------ | ----------------------------- |
    | `1101` | Parsing requests too frequent |
    | `1124` | QPS limit exceeded            |
  </Accordion>

  <Accordion title="File Issues" icon="file-circle-exclamation">
    | code   | Description                                                                                |
    | ------ | ------------------------------------------------------------------------------------------ |
    | `1104` | Unsupported file type                                                                      |
    | `1106` | Invalid or corrupted PDF file                                                              |
    | `1111` | File not found                                                                             |
    | `1118` | File size exceeds limit (max 200MB)                                                        |
    | `1132` | File exceeds 200MB / 300 pages limit, please split and resubmit                            |
    | `1143` | Unable to download the file. Verify that the link is valid and accessible, then try again. |
  </Accordion>

  <Accordion title="Parameter Errors" icon="triangle-exclamation">
    | code   | Description                                                                                     |
    | ------ | ----------------------------------------------------------------------------------------------- |
    | `1105` | Invalid output format                                                                           |
    | `1133` | Parameter error                                                                                 |
    | `1140` | file and file\_url cannot both be empty; provide one of them.                                   |
    | `1141` | file and file\_url cannot both be provided; provide only one.                                   |
    | `1142` | The file URL is invalid. Verify that it can directly open or download the file, then try again. |
  </Accordion>

  <Accordion title="Task Errors" icon="circle-xmark">
    | code   | Description                   |
    | ------ | ----------------------------- |
    | `1102` | Parsing task timed out        |
    | `1120` | Task record not found         |
    | `1137` | Parsing task failed           |
    | `1138` | Office file conversion failed |
  </Accordion>
</AccordionGroup>
