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

# API Overview

> Base URL, authentication, endpoint list, and error codes for SoMark Document Intelligence API

## Base URL

| Service | Base URL |
| - | - |
| SoMark Production | `https://somark.ai/api/v1` |

## Authentication

SoMark production requests pass the API key via the `api_key` field in the request body in `sk-***` format.

```bash theme={null}
# multipart/form-data example
-F "api_key=sk-your-api-key"
```

## Endpoints

Use [sync parsing](https://docs.somark.ai/en/api-reference/endpoint/sync.md) when you need the result in the same request, such as interactive workflows, small to medium files, or UI flows that should return immediately. Use async parsing when files are larger, documents take longer to process, or you are building batch jobs or backend pipelines. In that case, submit the [async task](https://docs.somark.ai/en/api-reference/endpoint/async-submit.md) first and then poll the [result query](https://docs.somark.ai/en/api-reference/endpoint/async-check.md) endpoint with `task_id` for a more reliable workflow. You can inspect remaining quota through [Usage Query](https://docs.somark.ai/en/api-reference/endpoint/usage-query.md).

To convert a PDF to Word or PPT, use [PDF to Office sync conversion](https://docs.somark.ai/en/api-reference/endpoint/pdf2office-sync.md), or [submit an async conversion task](https://docs.somark.ai/en/api-reference/endpoint/pdf2office-async-submit.md) and retrieve the download URL through [Async result query](https://docs.somark.ai/en/api-reference/endpoint/pdf2office-async-check.md).

| Endpoint | Method | Path | Description |
| - | - | - | - |
| Sync parsing | POST | `/parse/sync` | Upload a file or submit a file URL and receive results immediately |
| Async parsing | POST | `/parse/async` + `/parse/async_check` | Upload a file or submit a file URL, then poll results using `task_id` |
| PDF to Office (sync) | POST | `/convert/sync` | Upload a PDF and receive a Word or PPT download URL synchronously |
| PDF to Office (async) | POST | `/convert/async` + `/convert/async_check` | Submit a conversion task, then poll its status and download URL using `task_id` |
| Usage Query | POST | `/usage` | Check remaining quota and account information for the current API key |

> [!NOTE]
>
> **Path migration notice**: All parsing endpoint paths have been changed from `/extract/` to `/parse/`. The old paths (`/extract/acc_sync`, `/extract/async`, `/extract/async_check`) will be discontinued on December 31, 2026. Please migrate to the new paths before then.

## Usage Limits

* File source: provide exactly one of `file` and `file_url`; `file_url` must be a public or presigned `http/https` download URL
* File size: maximum **200MB** per file
* Page limit: maximum **300 pages** per request
* PDF to Office: PDF files only, with the same file size and page limits as parsing endpoints
* Rate limit: **QPS 4** per account

## Supported File Formats

`pdf` `png` `jpg` `jpeg` `bmp` `tiff` `jp2` `dib` `ppm` `pgm` `pbm` `gif` `heic` `heif` `webp` `xpm` `tga` `dds` `xbm` `doc` `docx` `ppt` `pptx` `xlsx` `xlsm` `xls`

## Recognized Document Elements

![Title](https://mintcdn.com/soulcode-9c5983db/Ej60brLPNq6nqtN4/images/%E6%A0%87%E9%A2%98.png?fit=max\&auto=format\&n=Ej60brLPNq6nqtN4\&q=85\&s=d65bd8ea3ce62a07f8cb0fa9902322c3)Title![Text block](https://mintcdn.com/soulcode-9c5983db/Ej60brLPNq6nqtN4/images/%E6%96%87%E5%AD%97%E6%AE%B5.png?fit=max\&auto=format\&n=Ej60brLPNq6nqtN4\&q=85\&s=1f73de67c708804e020b3faeb6aabf72)Text block![Figure](https://mintcdn.com/soulcode-9c5983db/Ej60brLPNq6nqtN4/images/%E5%9B%BE%E7%89%87.png?fit=max\&auto=format\&n=Ej60brLPNq6nqtN4\&q=85\&s=a9128b2e633916639c58a426b23fa567)Figure![Figure caption](https://mintcdn.com/soulcode-9c5983db/Ej60brLPNq6nqtN4/images/%E5%9B%BE%E4%BE%8B.png?fit=max\&auto=format\&n=Ej60brLPNq6nqtN4\&q=85\&s=edc155b44b9eb820feaca2fb700cfa48)Figure caption![Table](https://mintcdn.com/soulcode-9c5983db/Ej60brLPNq6nqtN4/images/%E8%A1%A8%E6%A0%BC.png?fit=max\&auto=format\&n=Ej60brLPNq6nqtN4\&q=85\&s=6e27e319f25e0a2576c335d0f05d9431)Table![Table caption](https://mintcdn.com/soulcode-9c5983db/Ej60brLPNq6nqtN4/images/%E8%A1%A8%E4%BE%8B.png?fit=max\&auto=format\&n=Ej60brLPNq6nqtN4\&q=85\&s=5608e354e6bc0d0bd5518df25f62ce93)Table caption![Equation](https://mintcdn.com/soulcode-9c5983db/Ej60brLPNq6nqtN4/images/%E5%85%AC%E5%BC%8F.png?fit=max\&auto=format\&n=Ej60brLPNq6nqtN4\&q=85\&s=d24dd877000fd17f084a05e4f4bae078)Equation![Header](https://mintcdn.com/soulcode-9c5983db/Ej60brLPNq6nqtN4/images/%E9%A1%B5%E7%9C%89.png?fit=max\&auto=format\&n=Ej60brLPNq6nqtN4\&q=85\&s=2527b3fc3f6c489301b71464d58d94eb)Header![Footer](https://mintcdn.com/soulcode-9c5983db/Ej60brLPNq6nqtN4/images/%E9%A1%B5%E8%84%9A.png?fit=max\&auto=format\&n=Ej60brLPNq6nqtN4\&q=85\&s=9d2842e6f26775670fe4c0c5f72da276)Footer![Sidebar](https://mintcdn.com/soulcode-9c5983db/Ej60brLPNq6nqtN4/images/%E4%BE%A7%E8%BE%B9%E6%A0%8F.png?fit=max\&auto=format\&n=Ej60brLPNq6nqtN4\&q=85\&s=d480e9c435541f26808968c25089789f)Sidebar![Footnote](https://mintcdn.com/soulcode-9c5983db/Ej60brLPNq6nqtN4/images/%E8%84%9A%E6%B3%A8.png?fit=max\&auto=format\&n=Ej60brLPNq6nqtN4\&q=85\&s=01aabef7cd12227e2cee878d0e92cd54)Footnote![TOC](https://mintcdn.com/soulcode-9c5983db/Ej60brLPNq6nqtN4/images/%E7%9B%AE%E5%BD%95.png?fit=max\&auto=format\&n=Ej60brLPNq6nqtN4\&q=85\&s=2f25585c3c882364e442dd3cccfe8e34)TOC![TOC entry](https://mintcdn.com/soulcode-9c5983db/Ej60brLPNq6nqtN4/images/%E7%9B%AE%E5%BD%95%E6%9D%A1%E7%9B%AE.png?fit=max\&auto=format\&n=Ej60brLPNq6nqtN4\&q=85\&s=62f6f7fdaa17f52ac37a66b5e412b95f)TOC entry![Choice](https://mintcdn.com/soulcode-9c5983db/Ej60brLPNq6nqtN4/images/%E9%80%89%E9%A1%B9.png?fit=max\&auto=format\&n=Ej60brLPNq6nqtN4\&q=85\&s=2763e8192daf06c093475ce28584fda0)Choice![Code block](https://mintcdn.com/soulcode-9c5983db/Ej60brLPNq6nqtN4/images/%E4%BB%A3%E7%A0%81%E6%AE%B5.png?fit=max\&auto=format\&n=Ej60brLPNq6nqtN4\&q=85\&s=e7518732919406799f1454c1e25f3ad3)Code block![Blank](https://mintcdn.com/soulcode-9c5983db/Ej60brLPNq6nqtN4/images/%E5%A1%AB%E7%A9%BA%E7%A9%BA%E7%99%BD.png?fit=max\&auto=format\&n=Ej60brLPNq6nqtN4\&q=85\&s=fcc0ff7bc607373d6b58383ea7df4b51)Blank![Reference](https://mintcdn.com/soulcode-9c5983db/Ej60brLPNq6nqtN4/images/%E5%8F%82%E8%80%83%E6%96%87%E7%8C%AE.png?fit=max\&auto=format\&n=Ej60brLPNq6nqtN4\&q=85\&s=8485137a7dec6990950fc4cb44d11295)Reference![QR code](https://mintcdn.com/soulcode-9c5983db/Ej60brLPNq6nqtN4/images/%E4%BA%8C%E7%BB%B4%E7%A0%81.png?fit=max\&auto=format\&n=Ej60brLPNq6nqtN4\&q=85\&s=e8aca4d398bdd944d8fcd65c072f7c0a)QR code![Stamp](https://mintcdn.com/soulcode-9c5983db/Ej60brLPNq6nqtN4/images/%E5%8D%B0%E7%AB%A0.png?fit=max\&auto=format\&n=Ej60brLPNq6nqtN4\&q=85\&s=d1588e292e16b1ad8ec9da5691749caf)Stamp![Chemical structure](https://mintcdn.com/soulcode-9c5983db/Ej60brLPNq6nqtN4/images/%E5%8C%96%E5%AD%A6%E7%BB%93%E6%9E%84%E5%BC%8F.png?fit=max\&auto=format\&n=Ej60brLPNq6nqtN4\&q=85\&s=de44671c6e0b2db85a647eab49a1d24e)Chemical structure![Chemical equation](https://mintcdn.com/soulcode-9c5983db/Ej60brLPNq6nqtN4/images/%E5%8C%96%E5%AD%A6%E6%96%B9%E7%A8%8B%E5%BC%8F.png?fit=max\&auto=format\&n=Ej60brLPNq6nqtN4\&q=85\&s=3862b4b97ab9f03a6b7afefc2a565537)Chemical equation

## Error Codes

All endpoints return a unified `code` field. A non-zero value indicates an error. See the full [Error Codes reference](https://docs.somark.ai/en/api-reference/errors.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.