Skip to content

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)

APITitleDescription
AddCategoryAdd CategoryCreates a category in a specified workspace to classify and manage files. Each workspace supports a maximum of 500 categories.
ListCategoryCategory ListListCategory
DeleteCategoryDelete CategoryPermanently delete the specified category.
AddFileAdd FileImport a file stored in the temporary storage space of Alibaba Cloud Model Studio into the application data of Alibaba Cloud Model Studio.
ListFileFile ListObtain the detailed information of one or more documents under a specified category.
AddFilesFromAuthorizedOssImport files from an authorized OSS bucketImport files from an authorized OSS bucket into Alibaba Cloud Model Studio application data.
ApplyFileUploadLeaseRequest a file upload leaseRequest an upload lease to upload a knowledge base file or a file for agent application session interaction.
DescribeFileDescribeFileObtains the basic information of a document, including the document name, type, and status.
UpdateFileTagUpdate File TagUpdate the specified file tag.
GetParseSettingsGetParseSettingsQueries the data parsing settings in a specified category.
GetAvailableParserTypesGetAvailableParserTypesLists all supported parser types based on the input file type (file extension).
ChangeParseSettingChangeParseSettingConfigure the parsing method for a specific file type. For example, use LLM parsing for .pdf files, or use Qwen VL parsing for .jpg files.
AddTableAddTableAdds a table for a tabular data connector.
UpdateTableFromAuthorizedOssUpdateTableFromAuthorizedOssUpdate a table in an Alibaba Cloud Model Studio data connector using a file from an authorized OSS bucket.

Knowledge base

APITitleDescription
CreateIndexCreate Knowledge BaseUse 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.
GetIndexJobStatusGetIndexJobStatusQueries the current status of a specified knowledge base creation or add document job.
SubmitIndexJobSubmitIndexJobSubmits a specified CreateIndex job to complete knowledge base creation.
SubmitIndexAddDocumentsJobSubmit a knowledge base append jobAppend and import parsed files into the specified knowledge base.
RetrieveRetrieveRetrieves information from a specified knowledge base.
ListIndexDocumentsQuery the file list under a knowledge baseRetrieve files in a specified knowledge base and their summary information.
ListIndexFileDetailsListIndexFileDetailsRetrieves the details of one or more documents in a specified knowledge base.
DeleteIndexDocumentDeleteIndexDocumentDeletes 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.
DeleteIndexDeleteIndexDeletes a specified knowledge base permanently.
ListChunksQuery the list of shards under an indexChunk
UpdateChunkUpdateChunkModifies the content and title of a specified text chunk in the knowledge base, and sets whether the chunk participates in knowledge base retrieval.
DeleteChunkDeleteChunkDeletes a specified text chunk from a knowledge base. The deleted chunk cannot be retrieved or recalled.
GetIndexMonitorRetrieve knowledge base monitoring dataYou 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

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

Others

APITitleDescription
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.
DeleteFileDelete filePermanently delete a specified file from application data. Deleting data tables via API is not supported. For details, see the API Guide below.
GetPromptTemplateGetPromptTemplateObtains a prompt template based on the template ID.
ListPromptTemplatesListPromptTemplatesObtains a list of prompt templates.
UpdatePromptTemplateUpdatePromptTemplateUpdates a prompt template based on the template ID.

Mirror of Alibaba Cloud Model Studio docs for reference and RAG. Not affiliated with Alibaba Cloud.