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

# 概览

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

## Base URL

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

## 鉴权

所有接口均通过请求体中的 `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>

## 使用限制

* 文件大小：单文件最大 **200MB**
* 页数限制：单次最多 **300 页**
* 调用频率：Beta 阶段 **QPS 1**（每账号）

## 支持的文件格式

`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/acm-a376ab31/2uC-d2v8dVqolnDO/images/%E6%A0%87%E9%A2%98.png?fit=max&auto=format&n=2uC-d2v8dVqolnDO&q=85&s=dd2ccf2b79ac5643ad0c77ca385816c2" 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/acm-a376ab31/2uC-d2v8dVqolnDO/images/%E6%96%87%E5%AD%97%E6%AE%B5.png?fit=max&auto=format&n=2uC-d2v8dVqolnDO&q=85&s=ec739960f4b425b2af2d69cf4dd4b5a9" 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/acm-a376ab31/2uC-d2v8dVqolnDO/images/%E5%9B%BE%E7%89%87.png?fit=max&auto=format&n=2uC-d2v8dVqolnDO&q=85&s=d8033de5e6c25226de59aa0c7460fd7c" 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/acm-a376ab31/2uC-d2v8dVqolnDO/images/%E5%9B%BE%E4%BE%8B.png?fit=max&auto=format&n=2uC-d2v8dVqolnDO&q=85&s=c71c5e73f6dfb76fcfe144628cec71cb" 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/acm-a376ab31/2uC-d2v8dVqolnDO/images/%E8%A1%A8%E6%A0%BC.png?fit=max&auto=format&n=2uC-d2v8dVqolnDO&q=85&s=394ffa800bfe57049038435e11f5762b" 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/acm-a376ab31/2uC-d2v8dVqolnDO/images/%E8%A1%A8%E4%BE%8B.png?fit=max&auto=format&n=2uC-d2v8dVqolnDO&q=85&s=25408087b17da34cbb1b35c7d3442d2a" 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/acm-a376ab31/2uC-d2v8dVqolnDO/images/%E5%85%AC%E5%BC%8F.png?fit=max&auto=format&n=2uC-d2v8dVqolnDO&q=85&s=af00f21fc025a87e299665657757dac5" 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/acm-a376ab31/2uC-d2v8dVqolnDO/images/%E9%A1%B5%E7%9C%89.png?fit=max&auto=format&n=2uC-d2v8dVqolnDO&q=85&s=dcd60a8f3af679f820c900ba1f11d581" 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/acm-a376ab31/2uC-d2v8dVqolnDO/images/%E9%A1%B5%E8%84%9A.png?fit=max&auto=format&n=2uC-d2v8dVqolnDO&q=85&s=82036fb1e6ff083024ec412dd8df23ef" 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/acm-a376ab31/2uC-d2v8dVqolnDO/images/%E4%BE%A7%E8%BE%B9%E6%A0%8F.png?fit=max&auto=format&n=2uC-d2v8dVqolnDO&q=85&s=85161c8909179c0c53eee78da7030bc4" 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/acm-a376ab31/2uC-d2v8dVqolnDO/images/%E8%84%9A%E6%B3%A8.png?fit=max&auto=format&n=2uC-d2v8dVqolnDO&q=85&s=6753e641d300c3508988559b6292489f" 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/acm-a376ab31/2uC-d2v8dVqolnDO/images/%E7%9B%AE%E5%BD%95.png?fit=max&auto=format&n=2uC-d2v8dVqolnDO&q=85&s=bd8f1694ab36ae7e07fe2398dee2bc0f" 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/acm-a376ab31/2uC-d2v8dVqolnDO/images/%E7%9B%AE%E5%BD%95%E6%9D%A1%E7%9B%AE.png?fit=max&auto=format&n=2uC-d2v8dVqolnDO&q=85&s=d95359ed4a38f77206f2de025587a8dc" 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/acm-a376ab31/2uC-d2v8dVqolnDO/images/%E9%80%89%E9%A1%B9.png?fit=max&auto=format&n=2uC-d2v8dVqolnDO&q=85&s=6b68a035125b456c542a5bdc2fc47a20" 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/acm-a376ab31/2uC-d2v8dVqolnDO/images/%E4%BB%A3%E7%A0%81%E6%AE%B5.png?fit=max&auto=format&n=2uC-d2v8dVqolnDO&q=85&s=152577d652009287c1456d258cc8ded8" 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/acm-a376ab31/2uC-d2v8dVqolnDO/images/%E5%A1%AB%E7%A9%BA%E7%A9%BA%E7%99%BD.png?fit=max&auto=format&n=2uC-d2v8dVqolnDO&q=85&s=f2d27dc4e37c29149a006fe27eb3db0e" 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/acm-a376ab31/2uC-d2v8dVqolnDO/images/%E5%8F%82%E8%80%83%E6%96%87%E7%8C%AE.png?fit=max&auto=format&n=2uC-d2v8dVqolnDO&q=85&s=fff180e36d3cfbed0d9f7918431a0cdd" 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/acm-a376ab31/2uC-d2v8dVqolnDO/images/%E4%BA%8C%E7%BB%B4%E7%A0%81.png?fit=max&auto=format&n=2uC-d2v8dVqolnDO&q=85&s=da13e3c3e08150678d901e5cd152884d" 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/acm-a376ab31/2uC-d2v8dVqolnDO/images/%E5%8D%B0%E7%AB%A0.png?fit=max&auto=format&n=2uC-d2v8dVqolnDO&q=85&s=29d7c000c17fa4ed40fe7ddb637d4490" 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/acm-a376ab31/2uC-d2v8dVqolnDO/images/%E5%8C%96%E5%AD%A6%E7%BB%93%E6%9E%84%E5%BC%8F.png?fit=max&auto=format&n=2uC-d2v8dVqolnDO&q=85&s=d32a55246b9a2c7102981e39400956eb" 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/acm-a376ab31/2uC-d2v8dVqolnDO/images/%E5%8C%96%E5%AD%A6%E6%96%B9%E7%A8%8B%E5%BC%8F.png?fit=max&auto=format&n=2uC-d2v8dVqolnDO&q=85&s=3c44b3ae5c8d9d8c83611eafb33ed435" alt="化学方程式" width="28" data-path="images/化学方程式.png" /><div>化学方程式</div></div>
</div>

## 错误码

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