Skip to main content
GET
/
paas
/
v4
/
files
/
parser
/
result
/
{taskId}
/
{format_type}
解析结果
curl --request GET \
  --url https://open.bigmodel.cn/api/paas/v4/files/parser/result/{taskId}/{format_type} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://open.bigmodel.cn/api/paas/v4/files/parser/result/{taskId}/{format_type}"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://open.bigmodel.cn/api/paas/v4/files/parser/result/{taskId}/{format_type}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
HttpResponse<String> response = Unirest.get("https://open.bigmodel.cn/api/paas/v4/files/parser/result/{taskId}/{format_type}")
.header("Authorization", "Bearer <token>")
.asString();
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://open.bigmodel.cn/api/paas/v4/files/parser/result/{taskId}/{format_type}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://open.bigmodel.cn/api/paas/v4/files/parser/result/{taskId}/{format_type}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
{
  "status": "succeeded",
  "message": "结果获取成功",
  "task_id": "task_123456789",
  "content": "这是解析后的文本内容...",
  "parsing_result_url": "https://example.com/download/result.zip"
}
{
"error": {
"code": "<string>",
"message": "<string>"
}
}

Authorizations

Authorization
string
header
required

标准的 HTTP Bearer 认证方式,在 API Keys 页面获取密钥。

Path Parameters

taskId
string
required

文件解析任务ID

Example:

"task_123456789"

format_type
enum<string>
required

结果返回格式类型

Available options:
text,
download_link
Example:

"text"

Response

结果获取成功

status
enum<string>
required

任务处理状态

Available options:
processing,
succeeded,
failed
Example:

"succeeded"

message
string
required

结果状态描述

Example:

"结果获取成功"

task_id
string
required

文件解析任务ID

Example:

"task_123456789"

content
string | null

format_type=text时返回的解析文本内容

Example:

"这是解析后的文本内容..."

parsing_result_url
string | null

format_type=download_link时返回的结果下载链接

Example:

"https://example.com/download/result.zip"