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
The following examples show the two ways of defining processing. When
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
| Parameter | Type | Required | Description |
|---|---|---|---|
file_url | string | Yes | The URL of the file to parse. |
file_name | string | No | The file name. The protocol also provides file_name_extension; choose one of the two based on how you provide the file information. |
file_name_extension | string | No | The file type. Mutually exclusive with file_name. |
config_id | string | No | The configuration ID, for example config_xxx. When passed together with inline parameters, the inline parameters take precedence. |
processing | object | No | Processing configuration. |
processing.user_prompt | string | No | User-defined prompt. |
processing.doc_processing_config | object | No | Document parsing processing configuration. |
processing.doc_processing_config.page_index | string | No | The page range to parse, for example 1-10. |
processing.doc_processing_config.head_foot | boolean | No | Whether to parse headers and footers. |
processing.doc_processing_config.layout_position | boolean | No | Whether to return coordinates. |
processing.doc_processing_config.image_caption | boolean | No | Whether to generate image descriptions. |
processing.media_processing_config | object | No | Audio/video parsing processing configuration. |
processing.media_processing_config.enable_diarization | boolean | No | Whether to perform speaker diarization. |
processing.media_processing_config.enable_synopsis_parse | boolean | No | Whether to perform synopsis parsing. |
processing.media_processing_config.enable_synopsis_segments | boolean | No | Whether to generate synopsis segments. |
processing.media_processing_config.enable_synopsis_summary | boolean | No | Whether to generate a synopsis summary. |
processing.media_processing_config.frame_extraction | object | No | Frame extraction configuration. |
processing.media_processing_config.frame_extraction.mode | string | No | Frame extraction mode. Valid values: auto, frame_rate |
processing.media_processing_config.frame_extraction.frame_rate | number | No | Frame extraction rate, in the range 0.2–5 |
processing.media_processing_config.frame_extraction.output_image_width | integer | No | Output frame image width. If not specified, the original resolution is used. Value range: [32, 4096] |
processing.media_processing_config.frame_extraction.output_image_height | integer | No | Output frame image height. If not specified, the original resolution is used. Value range: [32, 4096] |
output | object | No | Output configuration. |
output.output_file_format | string[] | No | Array of output format strings. Valid values: markdown |
output.layout_table_format | string | No | Output format of tables in Markdown. Valid values: markdown, html |
output.oss_config | object | No | OSS output configuration. |
output.oss_config.bucket | string | No | Managed OSS bucket name. |
output.oss_config.endpoint | string | No | Managed OSS endpoint. |
output.oss_config.access_key_id | string | No | Managed OSS AccessKey ID. |
output.oss_config.access_key_secret | string | No | Managed OSS AccessKey Secret. |
output.oss_config.security_token | string | No | Managed OSS Security Token. |
Response
| Field | Type | Description |
|---|---|---|
request_id | string | The request ID |
data.biz_id | string | The 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
Audio/video parsing code examples
- Use a saved configuration
- Use inline configuration
Configure