跳转到主要内容
POST
/
open
/
agentic_doc_processor
/
{tenant_name}
/
v1
/
app
/
doc
/
recognize
文档解析(同步接口)
const options = {
  method: 'POST',
  headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
  body: JSON.stringify({app_id: 'app_abc123', file_url: 'https://example.com/invoice.pdf'})
};

fetch('https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/app/doc/recognize', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "code": "success",
  "message": "",
  "data": {
    "task_id": "94fe9b74e0e311f091505e345594c618",
    "file_url": "",
    "status": 4,
    "doc_recognize_result": []
  }
}

授权

X-API-KEY
string
header
必填

用户接入 OpenAPI 的令牌,在应用 API 中查看。

请求头

accept-language
enum<string>
默认值:zh

返回字段名称的语言。默认 zh 返回中文字段名;设置为 en 返回英文字段名。

可用选项:
zh,
en

路径参数

tenant_name
string
默认值:laiye
必填

租户名称,默认 laiye。

请求体

application/json
app_id
string
必填

应用的唯一标识。

file_base64
string
必填

待处理文件 Base64,与 file_url 二选一。

file_url
string<uri>

待处理文件 URL,与 file_base64 二选一。

响应

文档解析结果。

code

业务码。成功通常为 success 或 200。

message
string

返回信息。

tips
string | null

详细信息,默认为空。

data
object