API standard and pre-built SDKs in multi-language
This product (bailian/2023-12-29) OpenAPI adopts an ROA-style signature mechanism. For implementation details, please refer to the Signature Mechanism documentation.To streamline development, we provide official SDKs for major programming languages. Using the SDK allows you to call APIs directly without worrying about low-level details such as request signatures, significantly lowering the barrier to entry and reducing integration complexity.
Custom signature
If your use case requires direct API integration with custom signatures, consult our technical support team first. Join our DingTalk support group (147535001692) to receive expert guidance.
Before you begin
An Alibaba Cloud account has full administrative privileges. A compromised AccessKey pair exposes all associated resources to unauthorized access, posing a significant security risk. To call APIs securely, create a Resource Access Management (RAM) user with API access only, configure its AccessKey pairs, and implement the principle of least privilege (PoLP) through RAM policies. Use the Alibaba Cloud account only when its permissions are explicitly required for specific scenarios.
Application data
| API | Title | Description |
|---|---|---|
| AddFile | AddFile | Imports an unstructured document stored in the temporary storage space to Data Management. You cannot use the API to import structured documents. Use the console instead. |
| ApplyFileUploadLease | ApplyFileUploadLease | Applies for a document upload lease to upload a document. You cannot use the API to upload structured documents. Use the console instead. |
| DescribeFile | DescribeFile | Obtains the basic information of a document, including the document name, type, and status. |
| GetParseSettings | GetParseSettings | Queries the data parsing settings in a specified category. |
| GetAvailableParserTypes | GetAvailableParserTypes | Lists all supported parser types based on the input file type (file extension). |
| ChangeParseSetting | ChangeParseSetting | Configure the parsing method for a specific file type. For example, use LLM parsing for .pdf files, or use Qwen VL parsing for .jpg files. |
Knowledge base
| API | Title | Description |
|---|---|---|
| CreateIndex | CreateIndex | Create a knowledge base of the document search type. |
| GetIndexJobStatus | GetIndexJobStatus | Queries the current status of a specified knowledge base creation or add document job. |
| SubmitIndexJob | SubmitIndexJob | Submits a specified CreateIndex job to complete knowledge base creation. |
| SubmitIndexAddDocumentsJob | SubmitIndexAddDocumentsJob | Adds parsed documents to an unstructured knowledge base. You cannot use the API to add knowledge to structured knowledge bases, see the Usage notes section of this topic. |
| Retrieve | Retrieve | Queries information from a specified knowledge base. |
| ListIndexDocuments | ListIndexDocuments | Queries the details of one or more documents in a specified knowledge base. |
| DeleteIndexDocument | DeleteIndexDocument | Deletes one or more documents from a specified unstructured knowledge base permanently. You cannot use the API to delete structured documents, see the Usage notes section of this topic. |
| ListIndices | ListIndices | Lists the details about the next or multiple knowledge bases in a specified workspace. |
| DeleteIndex | DeleteIndex | Deletes a specified knowledge base permanently. |
| ListChunks | ListChunks | For unstructured knowledge base, obtains the details of all chunks of a specified document; for structured knowledge base, obtains the details of all chunks. |
| UpdateChunk | UpdateChunk | Modifies the content and title of a specified text chunk in the knowledge base, and sets whether the chunk participates in knowledge base retrieval. |
| DeleteChunk | DeleteChunk | Deletes a specified text chunk from a knowledge base. The deleted chunk cannot be retrieved or recalled. |
Prompt engineering
| API | Title | Description |
|---|---|---|
| GetPromptTemplate | GetPromptTemplate | Obtains a prompt template based on the template ID. |
| UpdatePromptTemplate | UpdatePromptTemplate | Updates a prompt template based on the template ID. |
| DeletePromptTemplate | DeletePromptTemplate | Deletes a prompt template based on the template ID. |
| ListPromptTemplates | ListPromptTemplates | Obtains a list of prompt templates. |
| ListPromptTemplates | ListPromptTemplates |
Others
| API | Title | Description |
|---|---|---|
| ApplyTempStorageLease | ApplyTempStorageLease | This interface is intended for pro-code deployment only; other scenarios are currently not supported. It is used to apply for a temporary file upload lease. After obtaining the lease, you must upload the file manually. |