Skip to main content

Submit a parsing task

Submit a document or audio/video parsing task; returns a biz_id for async queries

Submit a document or audio/video parsing task and get a biz_id in return. Document parsing is an async task: submit the file to obtain a biz_id, then use that ID to call Query the parsing result to get the processing status and result.
Make sure you have obtained an API Key before calling. See Authentication.

Request parameters

ParameterTypeRequiredDescription
file_urlstringYesThe URL of the file to parse.
file_namestringNoThe file name. The protocol also provides file_name_extension; choose one of the two based on how you provide the file information.
file_name_extensionstringNoThe file type. Mutually exclusive with file_name.
config_idstringNoThe configuration ID, for example config_xxx. When passed together with inline parameters, the inline parameters take precedence.
processingobjectNoProcessing configuration.
processing.user_promptstringNoUser-defined prompt.
processing.doc_processing_configobjectNoDocument parsing processing configuration.
processing.doc_processing_config.page_indexstringNoThe page range to parse, for example 1-10.
processing.doc_processing_config.head_footbooleanNoWhether to parse headers and footers.
processing.doc_processing_config.layout_positionbooleanNoWhether to return coordinates.
processing.doc_processing_config.image_captionbooleanNoWhether to generate image descriptions.
processing.media_processing_configobjectNoAudio/video parsing processing configuration.
processing.media_processing_config.enable_diarizationbooleanNoWhether to perform speaker diarization.
processing.media_processing_config.enable_synopsis_parsebooleanNoWhether to perform synopsis parsing.
processing.media_processing_config.enable_synopsis_segmentsbooleanNoWhether to generate synopsis segments.
processing.media_processing_config.enable_synopsis_summarybooleanNoWhether to generate a synopsis summary.
processing.media_processing_config.frame_extractionobjectNoFrame extraction configuration.
processing.media_processing_config.frame_extraction.modestringNoFrame extraction mode. Valid values: auto, frame_rate
processing.media_processing_config.frame_extraction.frame_ratenumberNoFrame extraction rate, in the range 0.2–5
processing.media_processing_config.frame_extraction.output_image_widthintegerNoOutput frame image width. If not specified, the original resolution is used. Value range: [32, 4096]
processing.media_processing_config.frame_extraction.output_image_heightintegerNoOutput frame image height. If not specified, the original resolution is used. Value range: [32, 4096]
outputobjectNoOutput configuration.
output.output_file_formatstring[]NoArray of output format strings. Valid values: markdown
output.layout_table_formatstringNoOutput format of tables in Markdown. Valid values: markdown, html
output.oss_configobjectNoOSS output configuration.
output.oss_config.bucketstringNoManaged OSS bucket name.
output.oss_config.endpointstringNoManaged OSS endpoint.
output.oss_config.access_key_idstringNoManaged OSS AccessKey ID.
output.oss_config.access_key_secretstringNoManaged OSS AccessKey Secret.
output.oss_config.security_tokenstringNoManaged OSS Security Token.

Response

FieldTypeDescription
request_idstringThe request ID
data.biz_idstringThe business task ID, used to call /parse/result

Document parsing code examples

The following examples show the two ways of defining processing. When config_id and processing are both present, processing takes precedence. The URLs, task IDs, and configuration IDs in the examples are desensitized placeholder values.
  • Use a saved configuration
  • Use inline configuration
Configure
curl -X POST 'https://{workspaceId}.cn-beijing.maas.aliyuncs.com/api/v2/apps/parse-x/parse/submit' \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "file_url": "https://example.com/document.pdf",
    "file_name": "document.pdf",
    "config_id": "config_xxx"
}'
{
    "request_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "data": {
        "biz_id": "parseX-2026xxxx-xxxxxxx"
    }
}

Audio/video parsing code examples

  • Use a saved configuration
  • Use inline configuration
Configure
curl -X POST 'https://{workspaceId}.cn-beijing.maas.aliyuncs.com/api/v2/apps/parse-x/parse/submit' \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "file_url": "https://docmind-api-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/static/Wan3.0模型创意视频.mp4",
    "file_name": "test.mp4",
    "config_id": "config_xxx"
}'
{
    "request_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "data": {
        "biz_id": "parseX-Video-2026xxxx-xxxxxxx"
    }
}
After submitting, use Query the parsing result to poll the task status and get the parsing result.
Managed Agent API
Flow Agent API
Sandbox API
RAG API
Long-term Memory
Security API
Framework Integration