查询文档解析任务结果
curl --request GET \
--url https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/app/doc/recognize/query/task/{task_id} \
--header 'X-API-KEY: <api-key>'const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/app/doc/recognize/query/task/{task_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/app/doc/recognize/query/task/{task_id}"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)HttpResponse<String> response = Unirest.get("https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/app/doc/recognize/query/task/{task_id}")
.header("X-API-KEY", "<api-key>")
.asString();const url = 'https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/app/doc/recognize/query/task/{task_id}';
const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/app/doc/recognize/query/task/{task_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}using RestSharp;
var options = new RestClientOptions("https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/app/doc/recognize/query/task/{task_id}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-API-KEY", "<api-key>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/app/doc/recognize/query/task/{task_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"code": "success",
"message": "",
"data": {
"task_id": "94fe9b74e0e311f091505e345594c618",
"file_url": "",
"status": 4,
"doc_recognize_result": []
}
}{
"code": "<string>",
"message": "<string>",
"tips": "<string>"
}文档解析
查询文档解析任务结果
根据创建任务接口返回的 task_id 查询文档解析状态和结果。
GET
/
open
/
agentic_doc_processor
/
{tenant_name}
/
v1
/
app
/
doc
/
recognize
/
query
/
task
/
{task_id}
查询文档解析任务结果
curl --request GET \
--url https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/app/doc/recognize/query/task/{task_id} \
--header 'X-API-KEY: <api-key>'const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/app/doc/recognize/query/task/{task_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/app/doc/recognize/query/task/{task_id}"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)HttpResponse<String> response = Unirest.get("https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/app/doc/recognize/query/task/{task_id}")
.header("X-API-KEY", "<api-key>")
.asString();const url = 'https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/app/doc/recognize/query/task/{task_id}';
const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/app/doc/recognize/query/task/{task_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}using RestSharp;
var options = new RestClientOptions("https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/app/doc/recognize/query/task/{task_id}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-API-KEY", "<api-key>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://adp.laiye.com/open/agentic_doc_processor/{tenant_name}/v1/app/doc/recognize/query/task/{task_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"code": "success",
"message": "",
"data": {
"task_id": "94fe9b74e0e311f091505e345594c618",
"file_url": "",
"status": 4,
"doc_recognize_result": []
}
}{
"code": "<string>",
"message": "<string>",
"tips": "<string>"
}授权
生产环境的用户 OpenAPI Accessor access_key,在 ADP 平台的「我的 API」中查看。key 被禁用、过期或不属于生产环境时会返回 Accessor not found。
请求头
返回字段名称的语言。默认 zh 返回中文字段名;设置为 en 返回英文字段名。
可用选项:
zh, en ⌘I
