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

# 概览

> SoMark 文档智能解析 API 基础信息、鉴权方式与接口列表

## Base URL

```
https://somark.cn/api/v1
```

<Note>
  原地址 `https://somark.tech/api/v1` 将继续有效。为了获得最佳性能和未来的功能支持，建议迁移至新地址。
</Note>

## 鉴权

所有接口均通过请求体中的 `api_key` 字段传入 API 密钥，格式为 `sk-***`。

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

## 接口列表

如果你需要在一次请求里直接拿到结果，优先使用[同步解析](/api-reference/endpoint/sync)，适合交互式调用、小到中等文件、需要立刻展示结果的场景。如果文件较大、页数较多、处理时间可能较长，或者你要做批量任务、后台任务编排，优先使用异步解析：先提交[异步任务](/api-reference/endpoint/async-submit)，再通过 [结果查询](/api-reference/endpoint/async-check) 基于 `task_id` 轮询结果，更稳妥，也更容易做重试和队列控制。额度和账号状态可通过[用量查询](/api-reference/endpoint/usage-query)查看。

| 接口   | 方法   | 路径                                    | 说明                             |
| ---- | ---- | ------------------------------------- | ------------------------------ |
| 同步解析 | POST | `/parse/sync`                         | 上传文件或提交文件链接，立即返回解析结果           |
| 异步解析 | POST | `/parse/async` + `/parse/async_check` | 上传文件或提交文件链接，再基于 `task_id` 轮询结果 |
| 用量查询 | POST | `/usage`                              | 查询当前 API 密钥的剩余额度与账号信息          |

<Note>
  **路径迁移提示**：自本版本起，所有解析接口路径从 `/extract/` 变更为 `/parse/`。旧路径（`/extract/acc_sync`、`/extract/async`、`/extract/async_check`）将于 `2026-12-31` 停用，请在此之前迁移至新路径。
</Note>

## 使用限制

* 文件来源：请上传 `file`，或填写 `file_url` 文件下载链接；请勿同时提供两项。`file_url` 需为可直接打开或下载文件的公开链接或有效预签名链接
* 文件大小：单文件最大 **200MB**
* 页数限制：单次最多 **300 页**
* 调用频率：**QPS 4**（每账号）

## 支持的文件格式

`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`

## 可识别的文档元素

<div style={{ display: 'grid', gridTemplateColumns: 'repeat(7, minmax(0, 1fr))', gap: '12px' }}>
  <div style={{ border: '1px solid var(--gray-200)', borderRadius: '12px', padding: '12px', textAlign: 'center', display: 'flex', flexDirection: 'column', alignItems: 'center' }}><img src="https://mintcdn.com/sc-d9e86e75/GqiRzvlW7yPf36pr/images/%E6%A0%87%E9%A2%98.png?fit=max&auto=format&n=GqiRzvlW7yPf36pr&q=85&s=e3e4fc73a7465bf0c6451dc3a0338095" alt="标题" width="28" data-path="images/标题.png" /><div>标题</div></div>
  <div style={{ border: '1px solid var(--gray-200)', borderRadius: '12px', padding: '12px', textAlign: 'center', display: 'flex', flexDirection: 'column', alignItems: 'center' }}><img src="https://mintcdn.com/sc-d9e86e75/GqiRzvlW7yPf36pr/images/%E6%96%87%E5%AD%97%E6%AE%B5.png?fit=max&auto=format&n=GqiRzvlW7yPf36pr&q=85&s=12299c6659cfb8c3b959f3b674448caf" alt="文字段" width="28" data-path="images/文字段.png" /><div>文字段</div></div>
  <div style={{ border: '1px solid var(--gray-200)', borderRadius: '12px', padding: '12px', textAlign: 'center', display: 'flex', flexDirection: 'column', alignItems: 'center' }}><img src="https://mintcdn.com/sc-d9e86e75/GqiRzvlW7yPf36pr/images/%E5%9B%BE%E7%89%87.png?fit=max&auto=format&n=GqiRzvlW7yPf36pr&q=85&s=0855fb1d50ef6f311b821a3a211fad42" alt="图片" width="28" data-path="images/图片.png" /><div>图片</div></div>
  <div style={{ border: '1px solid var(--gray-200)', borderRadius: '12px', padding: '12px', textAlign: 'center', display: 'flex', flexDirection: 'column', alignItems: 'center' }}><img src="https://mintcdn.com/sc-d9e86e75/GqiRzvlW7yPf36pr/images/%E5%9B%BE%E4%BE%8B.png?fit=max&auto=format&n=GqiRzvlW7yPf36pr&q=85&s=1df4efbb7cedfaa28f52bed0a27bb750" alt="图例" width="28" data-path="images/图例.png" /><div>图例</div></div>
  <div style={{ border: '1px solid var(--gray-200)', borderRadius: '12px', padding: '12px', textAlign: 'center', display: 'flex', flexDirection: 'column', alignItems: 'center' }}><img src="https://mintcdn.com/sc-d9e86e75/GqiRzvlW7yPf36pr/images/%E8%A1%A8%E6%A0%BC.png?fit=max&auto=format&n=GqiRzvlW7yPf36pr&q=85&s=d8cf3f723e865ac5e800ac5d607f2ef7" alt="表格" width="28" data-path="images/表格.png" /><div>表格</div></div>
  <div style={{ border: '1px solid var(--gray-200)', borderRadius: '12px', padding: '12px', textAlign: 'center', display: 'flex', flexDirection: 'column', alignItems: 'center' }}><img src="https://mintcdn.com/sc-d9e86e75/GqiRzvlW7yPf36pr/images/%E8%A1%A8%E4%BE%8B.png?fit=max&auto=format&n=GqiRzvlW7yPf36pr&q=85&s=55399e36e6299e2eb3ec14123d06e8b0" alt="表例" width="28" data-path="images/表例.png" /><div>表例</div></div>
  <div style={{ border: '1px solid var(--gray-200)', borderRadius: '12px', padding: '12px', textAlign: 'center', display: 'flex', flexDirection: 'column', alignItems: 'center' }}><img src="https://mintcdn.com/sc-d9e86e75/GqiRzvlW7yPf36pr/images/%E5%85%AC%E5%BC%8F.png?fit=max&auto=format&n=GqiRzvlW7yPf36pr&q=85&s=67f3b05a7dd82641f97f1f6617a87e2a" alt="公式" width="28" data-path="images/公式.png" /><div>公式</div></div>
  <div style={{ border: '1px solid var(--gray-200)', borderRadius: '12px', padding: '12px', textAlign: 'center', display: 'flex', flexDirection: 'column', alignItems: 'center' }}><img src="https://mintcdn.com/sc-d9e86e75/GqiRzvlW7yPf36pr/images/%E9%A1%B5%E7%9C%89.png?fit=max&auto=format&n=GqiRzvlW7yPf36pr&q=85&s=a5b06d360c0dab4375067bd41b5f85ab" alt="页眉" width="28" data-path="images/页眉.png" /><div>页眉</div></div>
  <div style={{ border: '1px solid var(--gray-200)', borderRadius: '12px', padding: '12px', textAlign: 'center', display: 'flex', flexDirection: 'column', alignItems: 'center' }}><img src="https://mintcdn.com/sc-d9e86e75/GqiRzvlW7yPf36pr/images/%E9%A1%B5%E8%84%9A.png?fit=max&auto=format&n=GqiRzvlW7yPf36pr&q=85&s=a9c1f47f6a5012fc4f74e3975eba6c08" alt="页脚" width="28" data-path="images/页脚.png" /><div>页脚</div></div>
  <div style={{ border: '1px solid var(--gray-200)', borderRadius: '12px', padding: '12px', textAlign: 'center', display: 'flex', flexDirection: 'column', alignItems: 'center' }}><img src="https://mintcdn.com/sc-d9e86e75/GqiRzvlW7yPf36pr/images/%E4%BE%A7%E8%BE%B9%E6%A0%8F.png?fit=max&auto=format&n=GqiRzvlW7yPf36pr&q=85&s=b275a97fc233d74422ad64f0b785f895" alt="侧边栏" width="28" data-path="images/侧边栏.png" /><div>侧边栏</div></div>
  <div style={{ border: '1px solid var(--gray-200)', borderRadius: '12px', padding: '12px', textAlign: 'center', display: 'flex', flexDirection: 'column', alignItems: 'center' }}><img src="https://mintcdn.com/sc-d9e86e75/GqiRzvlW7yPf36pr/images/%E8%84%9A%E6%B3%A8.png?fit=max&auto=format&n=GqiRzvlW7yPf36pr&q=85&s=d6432c312a7606eac70b78275434066a" alt="脚注" width="28" data-path="images/脚注.png" /><div>脚注</div></div>
  <div style={{ border: '1px solid var(--gray-200)', borderRadius: '12px', padding: '12px', textAlign: 'center', display: 'flex', flexDirection: 'column', alignItems: 'center' }}><img src="https://mintcdn.com/sc-d9e86e75/GqiRzvlW7yPf36pr/images/%E7%9B%AE%E5%BD%95.png?fit=max&auto=format&n=GqiRzvlW7yPf36pr&q=85&s=bdddd0c059370efacffb2aaa9a0e09aa" alt="目录" width="28" data-path="images/目录.png" /><div>目录</div></div>
  <div style={{ border: '1px solid var(--gray-200)', borderRadius: '12px', padding: '12px', textAlign: 'center', display: 'flex', flexDirection: 'column', alignItems: 'center' }}><img src="https://mintcdn.com/sc-d9e86e75/GqiRzvlW7yPf36pr/images/%E7%9B%AE%E5%BD%95%E6%9D%A1%E7%9B%AE.png?fit=max&auto=format&n=GqiRzvlW7yPf36pr&q=85&s=9ed56458871e3ca1feeeee72470d5409" alt="目录条目" width="28" data-path="images/目录条目.png" /><div>目录条目</div></div>
  <div style={{ border: '1px solid var(--gray-200)', borderRadius: '12px', padding: '12px', textAlign: 'center', display: 'flex', flexDirection: 'column', alignItems: 'center' }}><img src="https://mintcdn.com/sc-d9e86e75/GqiRzvlW7yPf36pr/images/%E9%80%89%E9%A1%B9.png?fit=max&auto=format&n=GqiRzvlW7yPf36pr&q=85&s=edf4fbbadda32e3266c465dcede7f24c" alt="选项" width="28" data-path="images/选项.png" /><div>选项</div></div>
  <div style={{ border: '1px solid var(--gray-200)', borderRadius: '12px', padding: '12px', textAlign: 'center', display: 'flex', flexDirection: 'column', alignItems: 'center' }}><img src="https://mintcdn.com/sc-d9e86e75/GqiRzvlW7yPf36pr/images/%E4%BB%A3%E7%A0%81%E6%AE%B5.png?fit=max&auto=format&n=GqiRzvlW7yPf36pr&q=85&s=64bf2e0b11ef8bd52569f7ee0a9ff959" alt="代码段" width="28" data-path="images/代码段.png" /><div>代码段</div></div>
  <div style={{ border: '1px solid var(--gray-200)', borderRadius: '12px', padding: '12px', textAlign: 'center', display: 'flex', flexDirection: 'column', alignItems: 'center' }}><img src="https://mintcdn.com/sc-d9e86e75/GqiRzvlW7yPf36pr/images/%E5%A1%AB%E7%A9%BA%E7%A9%BA%E7%99%BD.png?fit=max&auto=format&n=GqiRzvlW7yPf36pr&q=85&s=f288a777c1077d4a3a8433b06a2ff021" alt="填空空白" width="28" data-path="images/填空空白.png" /><div>填空空白</div></div>
  <div style={{ border: '1px solid var(--gray-200)', borderRadius: '12px', padding: '12px', textAlign: 'center', display: 'flex', flexDirection: 'column', alignItems: 'center' }}><img src="https://mintcdn.com/sc-d9e86e75/GqiRzvlW7yPf36pr/images/%E5%8F%82%E8%80%83%E6%96%87%E7%8C%AE.png?fit=max&auto=format&n=GqiRzvlW7yPf36pr&q=85&s=000002e0c48dc1f7df9869dd3979e4df" alt="参考文献" width="28" data-path="images/参考文献.png" /><div>参考文献</div></div>
  <div style={{ border: '1px solid var(--gray-200)', borderRadius: '12px', padding: '12px', textAlign: 'center', display: 'flex', flexDirection: 'column', alignItems: 'center' }}><img src="https://mintcdn.com/sc-d9e86e75/GqiRzvlW7yPf36pr/images/%E4%BA%8C%E7%BB%B4%E7%A0%81.png?fit=max&auto=format&n=GqiRzvlW7yPf36pr&q=85&s=1264055d3c4053bdf03be668ee532e75" alt="二维码" width="28" data-path="images/二维码.png" /><div>二维码</div></div>
  <div style={{ border: '1px solid var(--gray-200)', borderRadius: '12px', padding: '12px', textAlign: 'center', display: 'flex', flexDirection: 'column', alignItems: 'center' }}><img src="https://mintcdn.com/sc-d9e86e75/GqiRzvlW7yPf36pr/images/%E5%8D%B0%E7%AB%A0.png?fit=max&auto=format&n=GqiRzvlW7yPf36pr&q=85&s=74981c5e8a7e0511c54100e7a9a5a1b2" alt="印章" width="28" data-path="images/印章.png" /><div>印章</div></div>
  <div style={{ border: '1px solid var(--gray-200)', borderRadius: '12px', padding: '12px', textAlign: 'center', display: 'flex', flexDirection: 'column', alignItems: 'center' }}><img src="https://mintcdn.com/sc-d9e86e75/GqiRzvlW7yPf36pr/images/%E5%8C%96%E5%AD%A6%E7%BB%93%E6%9E%84%E5%BC%8F.png?fit=max&auto=format&n=GqiRzvlW7yPf36pr&q=85&s=7a822a52b2bfd50fa8f3943559b4cdb7" alt="化学结构式" width="28" data-path="images/化学结构式.png" /><div>化学结构式</div></div>
  <div style={{ border: '1px solid var(--gray-200)', borderRadius: '12px', padding: '12px', textAlign: 'center', display: 'flex', flexDirection: 'column', alignItems: 'center' }}><img src="https://mintcdn.com/sc-d9e86e75/GqiRzvlW7yPf36pr/images/%E5%8C%96%E5%AD%A6%E6%96%B9%E7%A8%8B%E5%BC%8F.png?fit=max&auto=format&n=GqiRzvlW7yPf36pr&q=85&s=63fd0b8e80f48077dc5ef1d21739ceeb" alt="化学方程式" width="28" data-path="images/化学方程式.png" /><div>化学方程式</div></div>
</div>

## 错误码

所有接口返回统一的 `code` 字段，非 `0` 时表示出错。完整错误码列表见[错误码参考](/api-reference/errors)。
