API overview

更新时间:
复制 MD 格式

API standard and pre-built SDKs in multi-language

The OpenAPI specification of this product (bailian/2023-12-29) follows the ROA standard. Alibaba Cloud provides pre-built SDKs for popular programming languages to abstract low-level complexities such as request signing. This enables developers to call APIs using language-specific syntax without dealing with HTTP details directly.

Custom signature

If your specific needs, such as a customized signature, are not supported by the SDK, manually sign requests using the signature mechanism. Note that manual signing requires significant effort (usually about 5 business days). For support, join our DingTalk group (ID: 147535001692).

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.

Data connection (formerly Application data)

API

Title

Description

AddCategory Add Category Creates a category in a specified workspace to classify and manage files. Each workspace supports a maximum of 500 categories.
ListCategory Category List Retrieves the details of one or more categories in a specified workspace.
DeleteCategory Delete Category Permanently delete the specified category.
ApplyFileUploadLease Request a file upload lease Request an upload lease to upload a knowledge base file or a file for agent application session interaction.
AddFile Add File Imports a file from the temporary storage space of Alibaba Cloud Model Studio into a data connection (formerly known as application data).
AddFilesFromAuthorizedOss Import files from an authorized OSS bucket Import files from an authorized OSS bucket as application data in Alibaba Cloud Model Studio (Bailian).
ListFile File List Retrieves the details of one or more documents in a specified category.
DescribeFile DescribeFile Obtains the basic information of a document, including the document name, type, and status.
UpdateFileTag Update File Tag Updates the tags for a specified file.
BatchUpdateFileTag BatchUpdateFileTag This operation updates document tags in a data connection in batches.
DeleteFile Delete file Permanently delete a specified file from application data. Deleting data tables via API is not supported. For details, see the API Guide below.
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 Configures the parsing method for a specific file type. For example, you can specify LLM-based document parsing for .pdf files and the Qwen VL Parser for .jpg files.
AddTable AddTable Adds a table for a tabular data connector.
UpdateTableFromAuthorizedOss UpdateTableFromAuthorizedOss Update a table in an Alibaba Cloud Model Studio data connector using a file from an authorized OSS bucket.
AddConnector AddConnector Creates a connector. This API currently supports only file connectors.
GetConnector GetConnector Retrieves details about a connector. This operation currently supports only file connectors.

Knowledge base

API

Title

Description

CreateIndex Create Knowledge Base Use this API to create two types of knowledge bases: unstructured knowledge bases for documents, audio, or video, and structured knowledge bases for data queries or image Q&A.
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 Submit a knowledge base append job Adds parsed files to the specified knowledge base.
Retrieve Retrieve Retrieves information from a specified knowledge base.
ListIndexDocuments Query the file list under a knowledge base Retrieve files in a specified knowledge base and their summary information.
ListIndexFileDetails ListIndexFileDetails Retrieves the details of one or more documents in a specified knowledge base.
UpdateIndex Update Knowledge Base Updates the configuration of 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 查询知识库列表 Obtain the knowledge base list under a specified workspace.
DeleteIndex DeleteIndex Deletes a specified knowledge base permanently.
ListChunks Query the list of shards under an index Chunk
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.
GetIndexMonitor Retrieve knowledge base monitoring data You can call the GetIndexMonitor operation to query monitoring data for a specified knowledge base within a specific time range. This data is crucial for App Performance Analytics, capacity planning, and cost management. The monitoring data includes two main dimensions: storage and retrieval. Storage monitoring retrieves the index storage limit and current usage of the knowledge base. Retrieval monitoring retrieves performance metrics for the query period, such as peak queries per second (QPS), total requests, and average QPS. The metrics are provided as totals and are also broken down by time window. The requests are categorized as successful, failed, and rate-limited.

Prompt engineering

API

Title

Description

CreatePromptTemplate Create Prompt Template Create a prompt template.
DeletePromptTemplate DeletePromptTemplate Deletes a prompt template based on the template ID.

Others

API

Title

Description

Long term memory Long term memory
CreateMemory Create Long-Term Memory Create a long-term memory.
GetMemory Retrieve Long-Term Memory Obtain the description of the specified long-term memory.
UpdateMemory Update Long-Term Memory Update the description of the specified long-term memory.
DeleteMemory Delete Long-Term Memory Permanently delete the specified long-term memory.
ListMemories Retrieve List of Long-Term Memory Objects Obtain the details of one or more long-term memory objects in a specified workspace.
CreateMemoryNode Create a memory segment Create a memory segment.
GetMemoryNode Retrieve a memory segment Retrieve a memory segment.
UpdateMemoryNode Update a memory segment Update a memory segment.
DeleteMemoryNode Delete a memory segment Delete a memory segment.
ListMemoryNodes Retrieve a list of memory segments Retrieve a list of memory segments.
GetAlipayTransferStatus Query Alipay reward status Query the tipping status of the Alipay wallet attached to the application.
GetAlipayUrl Obtain Alipay Tipping URL Obtain the Alipay tipping link for an application.
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.
GetPromptTemplate GetPromptTemplate Obtains a prompt template based on the template ID.
ListPromptTemplates ListPromptTemplates Obtains a list of prompt templates.
UpdateConnector UpdateConnector Updates a connector.
UpdatePromptTemplate UpdatePromptTemplate Updates a prompt template based on the template ID.