Skip to main content
Application components

API overview

API standards and multilingual preset SDKs

The OpenAPI of this product (bailian/2023-12-29) uses the ROA signature style. We have encapsulated SDKs for common programming languages for developers. Developers can download the SDK to directly call this product's OpenAPI without worrying about technical details. If the existing SDK does not meet your needs, you can use the signature mechanism for self-signing integration. Since the details of self-signing are very complex, it may take around 5 business days. Therefore, we recommend joining our DingTalk service group (147535001692) and conducting signature integration under expert guidance. Before using the API, you need to prepare your identity account and access key (AccessKey) to effectively access the API through client tools (such as SDK and CLI). For details, see Obtain an AccessKey.

Custom signature scenarios

If your business scenario has special requirements and you need to integrate the API through self-signing, we recommend consulting our technical support team first (DingTalk service group: 147535001692) to obtain professional guidance and ensure efficient integration.

Account and security preparation

Alibaba Cloud accounts have full administrative permissions over all resources. Once an AccessKey is compromised, all associated resources will be at risk of unauthorized access. To ensure security, it is recommended to create a RAM user with only API access permissions and configure its AccessKey, while configuring RAM policies based on the principle of least privilege (PoLP). Use the Alibaba Cloud account only in specific scenarios where Alibaba Cloud account permissions are explicitly required.

Data connection (formerly application data)

API

Title

Description

AddCategoryAdd CategoryCreates a category in a specified workspace to classify and manage files. Each workspace supports a maximum of 500 categories.
ListCategoryCategory ListRetrieves the details of one or more categories in a specified workspace.
DeleteCategoryDelete a categoryPermanently deletes a specified category.
ApplyFileUploadLeaseApply for a file upload leaseRequest an upload lease for uploading knowledge base files or files for agent application conversational interactions.
AddFileAdd fileImports a file from the temporary storage of Alibaba Cloud Model Studio into an Alibaba Cloud Model Studio data connection (formerly known as application data).
AddFilesFromAuthorizedOssImport files from an authorized OSS bucketImports files from an authorized OSS bucket into Alibaba Cloud Model Studio application data.
ListFileFile listRetrieves the details of one or more documents in a specified category.
DescribeFileQuery file statusQueries the basic information of a file in application data, including the file name, type, and status.
UpdateFileTagUpdate File TagUpdates the tags for a specified file.
BatchUpdateFileTagBatchUpdateFileTagThis operation updates document tags in a data connection in batches.
DeleteFileDelete filePermanently delete a specified file from application data. Deleting data tables via API is not supported. For details, see the API Guide below.
DeleteFilesDelete files in batchDelete files in batch
GetParseSettingsGetParseSettingsQueries the data parsing settings in a specified category.
GetAvailableParserTypesGetAvailableParserTypesLists all supported parser types based on the input file type (file extension).
ChangeParseSettingModify category parsing settingsConfigures the parsing method for specific file types. For example, specifies large model document parsing for .pdf files or Qwen VL parsing for .jpg files.
AddTableAddTableAdd a table for the table data connector.
UpdateTableFromAuthorizedOssUpdateTableFromAuthorizedOssUpdate a table in an Alibaba Cloud Model Studio data connector using a file from an authorized OSS bucket.
AddConnectorAddConnectorCreates a connector. This API currently supports only file connectors.
GetConnectorGetConnectorRetrieves details about a connector. This operation currently supports only file connectors.
UpdateConnectorUpdateConnectorUpdates a connector.

Knowledge base

API

Title

Description

CreateIndexCreate a knowledge baseCreates a knowledge base, either an unstructured knowledge base based on documents or audio/video, or a structured knowledge base for data queries or image-based Q&A.
GetIndexJobStatusQuery knowledge base job statusQueries the current status of a specified knowledge base creation task or knowledge base document append task.
SubmitIndexJobSubmit a knowledge base creation taskSubmits a specified CreateIndex task to complete knowledge base creation.
SubmitIndexAddDocumentsJobSubmit a knowledge base append jobAdds parsed files to the specified knowledge base.
RetrieveRetrieveRetrieves information from a specified knowledge base.
ListIndexDocumentsQuery files in a knowledge baseRetrieves files and their summary information from a specified knowledge base.
ListIndexFileDetailsQuery file details in a knowledge baseRetrieves the files in a specified knowledge base along with their details.
DeleteIndexDocumentDelete files from a knowledge basePermanently deletes files from a specified knowledge base.
ListIndicesList knowledge basesRetrieves the list of knowledge bases in a specified workspace.
DeleteIndexDelete a knowledge basePermanently deletes a specified knowledge base.
ListChunksQuery chunk list under an indexQueries the list and information of text chunks.
UpdateChunkUpdate a chunkModifies the content and title of a specified text chunk in a knowledge base, and specifies whether the chunk participates in knowledge base retrieval.
DeleteChunkDelete chunksDeletes specified text chunks from a knowledge base. Deleted text chunks cannot be retrieved or recalled.

Prompt engineering

API

Title

Description

CreatePromptTemplateCreate a Prompt TemplateCreate a prompt template.
DeletePromptTemplateDeletePromptTemplateDeletes a prompt template based on the template ID.

Others

API

Title

Description

CreateMemoryCreate a long-term memoryCreates a long-term memory.
GetMemoryRetrieve long-term memoryRetrieves the description of a specified long-term memory.
UpdateMemoryUpdate long-term memoryUpdates the description of a specified long-term memory.
DeleteMemoryDelete long-term memoryPermanently deletes a specified long-term memory.
ListMemoriesList long-term memoriesRetrieves the details of one or more long-term memory entities in a specified workspace.
CreateMemoryNodeCreate a memory nodeCreates a memory node.
GetMemoryNodeRetrieve a memory fragmentRetrieves a memory fragment.
UpdateMemoryNodeUpdate a memory fragmentUpdates a memory fragment.
DeleteMemoryNodeDelete a memory fragmentDeletes a memory fragment.
ListMemoryNodesRetrieve memory node listRetrieves a list of memory nodes.
ApplyTempStorageLeaseApplyTempStorageLeaseThis 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.
AddChunkAdd a chunkAdds chunks to a document search (document), data query (table), or image Q&A (image) knowledge base.
GetPromptTemplateGetPromptTemplateObtains a prompt template based on the template ID.
ListPromptTemplatesListPromptTemplatesObtains a list of prompt templates.
UpdatePromptTemplateUpdatePromptTemplateUpdates a prompt template based on the template ID.