curl --request POST \
--url https://api.textin.com/api/v1/xparse/parse/sync \
--header 'Content-Type: multipart/form-data' \
--header 'x-ti-app-id: <api-key>' \
--header 'x-ti-secret-code: <api-key>' \
--form file='@example-file' \
--form 'file_url=<string>' \
--form 'config={
"document": {
"password": "example-pdf-password"
},
"capabilities": {
"include_hierarchy": true,
"include_inline_objects": true,
"include_char_details": true,
"include_image_data": true,
"include_table_structure": true,
"pages": true,
"title_tree": true,
"table_view": "html"
},
"scope": {
"page_range": "1-2"
},
"config": {
"force_engine": "textin",
"engine_params": {
"formula_level": 0,
"image_output_type": "url"
}
}
}'将非结构化文档(image/pdf/word/html/excel/ppt/txt等)解析为 AI 友好的结构化数据(JSON、Markdown),包含丰富的元数据(可追溯、可解释、可验证)
curl --request POST \
--url https://api.textin.com/api/v1/xparse/parse/sync \
--header 'Content-Type: multipart/form-data' \
--header 'x-ti-app-id: <api-key>' \
--header 'x-ti-secret-code: <api-key>' \
--form file='@example-file' \
--form 'file_url=<string>' \
--form 'config={
"document": {
"password": "example-pdf-password"
},
"capabilities": {
"include_hierarchy": true,
"include_inline_objects": true,
"include_char_details": true,
"include_image_data": true,
"include_table_structure": true,
"pages": true,
"title_tree": true,
"table_view": "html"
},
"scope": {
"page_range": "1-2"
},
"config": {
"force_engine": "textin",
"engine_params": {
"formula_level": 0,
"image_output_type": "url"
}
}
}'上传文档文件,与 file_url 二选一
文档 URL,与 file 二选一
解析参数配置
Show child attributes
{
"document": { "password": "example-pdf-password" },
"capabilities": {
"include_hierarchy": true,
"include_inline_objects": true,
"include_char_details": true,
"include_image_data": true,
"include_table_structure": true,
"pages": true,
"title_tree": true,
"table_view": "html"
},
"scope": { "page_range": "1-2" },
"config": {
"force_engine": "textin",
"engine_params": {
"formula_level": 0,
"image_output_type": "url"
}
}
}
解析结果
状态码
200, 40101, 40102, 40103, 40003, 40004, 40007, 40008, 40301, 40302, 40303, 40304, 40305, 40306, 40307, 40422, 40423, 40424, 40425, 40427, 40428, 40429, 50207, 40400, 30203, 500 200
状态信息
"success"
错误定位信息,仅在解析错误时返回
Show child attributes
Show child attributes
此页面对您有帮助吗?