Appearance
API overview
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 | ListCategory |
| DeleteCategory | Delete Category | Permanently delete the specified category. |
| AddFile | Add File | Import a file stored in the temporary storage space of Alibaba Cloud Model Studio into the application data of Alibaba Cloud Model Studio. |
| ListFile | File List | Obtain the detailed information of one or more documents under a specified category. |
| AddFilesFromAuthorizedOss | Import files from an authorized OSS bucket | Import files from an authorized OSS bucket into Alibaba Cloud Model Studio application data. |
| ApplyFileUploadLease | Request a file upload lease | Request an upload lease to upload a knowledge base file or a file for agent application session interaction. |
| DescribeFile | DescribeFile | Obtains the basic information of a document, including the document name, type, and status. |
| UpdateFileTag | Update File Tag | Update the specified file tag. |
| 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. |
| 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. |
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 | Append and import parsed files into 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. |
| 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 |
|---|---|---|
| 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. |
| 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. |
| GetPromptTemplate | GetPromptTemplate | Obtains a prompt template based on the template ID. |
| ListPromptTemplates | ListPromptTemplates | Obtains a list of prompt templates. |
| UpdatePromptTemplate | UpdatePromptTemplate | Updates a prompt template based on the template ID. |