All Products
Search
Document Center

Energy Expert:SubmitDocExtractionTask

Last Updated:Oct 22, 2025

Extracts key information from a document based on a preset key-value template or prompt template. A successful call returns a task ID. You can then call GetDocExtractionResult to retrieve the extraction results. This operation asynchronously submits a task for a file specified by a URL. To submit a task for a local file, use the SubmitDocExtractionTaskAdvance operation.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

POST /api/v2/aidoc/document/submitDocExtractionTask HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

fileUrl

string

No

Choose one of the following parameters: fileUrl or fileUrlObject.

  • fileUrl: The URL of a single document. The document can have a maximum of 3,000 pages and a size of up to 500 MB.

  • fileUrlObject: The local file to upload. The document can have a maximum of 3,000 pages and a size of up to 500 MB. This parameter is used when you call the SubmitDocExtractionTaskAdvance operation.

Note

The supported document types vary based on the extraction method.

  • Long-text retrieval-augmented generation (RAG): Supports PDF, DOC, DOCX, XLSX, CSV, and TXT files with a maximum of 3,000 pages.

  • Image processing: Supports PDF, JPG, JPEG, PNG, BMP, JPE, TIF, TIFF, WEBP, and HEIC files.

  • Long-text understanding: Supports DOC, DOCX, XLSX, PDF, CSV, and TXT files.

fileUrl:https://example.com/example.pdf fileUrlObject:本地文件生成的FileInputStream

fileName

string

Yes

The file name, including the file extension.

example.pdf

templateId

string

Yes

The unique ID of the extraction template. This ID specifies the content to extract from the document. To obtain a template ID, log on to the template management page and configure a template.

572d24k0c95a

folderId

string

Yes

  • The unique ID of the knowledge base folder. Use this parameter to categorize documents or to limit the scope of documents for online Q&A queries.

  • To obtain a folder ID, log on to the Document Mind console.

xxxxx

extractType

string

Yes

The document extraction type. Supported types include rag and long-text understanding. The default value is rag.

rag

Response elements

Element

Type

Description

Example

object

The response schema.

requestId

string

The request ID.

83A5A7DD-8974-5769-952E-590A97BEA34E

data

object

The returned data.

taskId

string

The task ID.

864773ec-d35b-4c36-8871-52d07fbe806d

Examples

Success response

JSON format

{
  "requestId": "83A5A7DD-8974-5769-952E-590A97BEA34E",
  "data": {
    "taskId": "864773ec-d35b-4c36-8871-52d07fbe806d"
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.