# Alibaba Cloud Alibaba Cloud Model Studio API

> Alibaba Cloud Alibaba Cloud Model Studio API on Apizie: 56 endpoints (Creates a category in a specified workspace for classifying and managing files. A maximum of 500 categories…, Adds chunks to a document search (document), data query (table), or image Q&A (image) knowledge base, Creates a connector. Currently, this operation supports creating only file-type connectors, Imports a file from the temporary storage space of Alibaba Cloud Model Studio into an Alibaba Cloud Model…, …) returned as clean JSON through one API key. Send your own provider key in the x-upstream-key header. Call it over REST at https://zieapi.vercel.app/v1/cloud:aliyun-bailian/{endpoint} or from Claude, ChatGPT and Cursor through the Apizie MCP server. Free plan: 1,000 requests a month.

- Project key: `cloud:aliyun-bailian`
- Category: Cloud
- Status: byok
- Source: https://api.alibabacloud.com/product/bailian
- Page: https://zieapi.vercel.app/api/cloud/aliyun-bailian
- OpenAPI: https://zieapi.vercel.app/api/cloud/aliyun-bailian/openapi.json

Alibaba Cloud OpenAPI for Alibaba Cloud Model Studio (bailian, version 2023-12-29). Calls are signed with ACS3-HMAC-SHA256 using your AccessKey ID and secret.

## Endpoints

### Creates a category in a specified workspace for classifying and managing files. A maximum of 500 categories…
`POST https://zieapi.vercel.app/v1/cloud:aliyun-bailian/add-category` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| WorkspaceId | string | yes | The workspace ID. The category is created in this workspace. For more information about how to obtain the workspace ID, see… |
| CategoryName | string | yes | The category name. The name must be 1 to 20 characters in length and can contain characters in the Unicode letter category, including… |
| CategoryType | string | yes | The category type. Valid values: UNSTRUCTURED: category |
| ParentCategoryId | string | no | The ID of the parent category. The new category is created under this parent category. If this parameter is left empty, a first-level… |
| ConnectorId | string | no | The instance ID of the data connector (Connector). Obtain this value from the Model Studio console |

### Adds chunks to a document search (document), data query (table), or image Q&A (image) knowledge base
`POST https://zieapi.vercel.app/v1/cloud:aliyun-bailian/add-chunk` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| PipelineId | string | yes | The knowledge base ID |
| WorkspaceId | string | yes | The workspace ID |
| dataId | string | no | The file ID |
| field | string | no | The chunk content to insert, passed as key-value pairs. For document search knowledge bases, use the following fixed key list: content… |

### Creates a connector. Currently, this operation supports creating only file-type connectors
`POST https://zieapi.vercel.app/v1/cloud:aliyun-bailian/add-connector` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| WorkspaceId | string | yes | The ID of the workspace where the knowledge base resides |
| ConnectorName | string | yes | The name of the connector |
| ConnectorType | string | yes | The type of the connector |
| Description | string | yes | The description of the connector |
| FileConnectorConfig | string | no | The configuration parameters for the file connector (JSON-encoded) |

### Imports a file from the temporary storage space of Alibaba Cloud Model Studio into an Alibaba Cloud Model…
`POST https://zieapi.vercel.app/v1/cloud:aliyun-bailian/add-file` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| LeaseId | string | yes | The upload lease ID, which corresponds to the `FileUploadLeaseId` returned by the ApplyFileUploadLease operation |
| Parser | string | yes | The parser type. Valid values: DOCMIND: intelligent document parsing. DOCMIND_DIGITAL: electronic document parsing. DOCMIND_LLM_VERSION:… |
| CategoryId | string | yes | When CategoryType is set to UNSTRUCTURED, specify the category ID to which the uploaded file belongs. This is the `CategoryId` returned by… |
| WorkspaceId | string | yes | The workspace ID. The file is uploaded to this workspace. For information about how to obtain the workspace ID, see… |
| Tags | string | no | The list of tags associated with the file. You can specify up to 100 tags, and the total character length of all tags cannot exceed 700.… |
| CategoryType | string | no | The category type. Optional. Default value: UNSTRUCTURED. Valid values: UNSTRUCTURED: category, used for building knowledge base… |
| OriginalFileUrl | string | no | Adds a URL to the file through this parameter. The system records this link when building a… |
| ParserConfig | string | no | The parser configuration. This parameter is required only when the parser type is set to Qwen VL parsing (JSON-encoded) |

### Imports files from an authorized OSS bucket into Alibaba Cloud Model Studio application data
`POST https://zieapi.vercel.app/v1/cloud:aliyun-bailian/add-files-from-authorized-oss` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| WorkspaceId | string | yes | The workspace ID. Files are imported to this workspace. For more information about how to obtain the ID, see… |
| CategoryId | string | yes | The ID of the destination category for the imported files. This is the CategoryId returned by the AddCategory operation. You can also… |
| CategoryType | string | yes | The category type. This parameter is optional. Default value: UNSTRUCTURED. Valid values: UNSTRUCTURED: category, used for building… |
| OssRegionId | string | yes | The region ID of the OSS bucket. For more information about how to obtain the ID, see https://help.aliyun.com/document_detail/31837.html |
| OssBucketName | string | yes | The name of the OSS bucket. For more information, see https://help.aliyun.com/document_detail/177682.html. Before you import data from OSS… |
| FileDetails | string | yes | The list of files to import. You can upload up to 10 files at a time. You can upload up to 10 files at a time (JSON-encoded) |
| Tags | string | no | The list of tags associated with the file. Default value: empty, which means the file is not associated with any tags. You can specify up… |
| OverWriteFileByOssKey | string | no | Specifies whether to overwrite identical files in the category based on the OssKey. Default value: false, which means identical files are… |

### Adds a table to a tabular data connector
`POST https://zieapi.vercel.app/v1/cloud:aliyun-bailian/add-table` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| WorkspaceId | string | yes | The ID of the workspace to which the file belongs. For information about how to obtain the workspace ID, see… |
| TableName | string | yes | The table name |
| TableDesc | string | no | The table description |
| ConnectorId | string | yes | The connector ID |
| TableColumns | string | yes | The column information of the table (JSON-encoded) |

### Requests an upload lease for uploading a knowledge base file or a file for agent application session…
`POST https://zieapi.vercel.app/v1/cloud:aliyun-bailian/apply-file-upload-lease` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| CategoryId | string | yes | When uploading a file for building a https://help.aliyun.com/document_detail/2807740.html: This parameter specifies the category ID to… |
| FileName | string | yes | When uploading a file for building a https://help.aliyun.com/document_detail/2807740.html: This parameter specifies the name of the file… |
| Md5 | string | yes | The MD5 value of the file to upload. The server validates this parameter (validation is not currently enabled). Specify the correct value |
| SizeInBytes | string | yes | The size of the file to upload, in bytes. The server validates this parameter (validation is not currently enabled). Specify the correct… |
| WorkspaceId | string | yes | The workspace ID to which the uploaded file belongs. For information about how to obtain the workspace ID, see… |
| CategoryType | string | no | The category type. If this parameter is not specified, the default value is UNSTRUCTURED. Valid values: UNSTRUCTURED: category, used for… |
| UseInternalEndpoint | string | no | If you use Alibaba Cloud Model Studio secure storage… |

### This interface is intended for pro-code deployment only; other scenarios are currently not supported. It is…
`POST https://zieapi.vercel.app/v1/cloud:aliyun-bailian/apply-temp-storage-lease` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| FileName | string | yes | The file name, including the file extension |
| SizeInBytes | integer | yes | The size of the file, in bytes |
| WorkspaceId | string | yes | The Model Studio workspace ID |

### Batch updates document tags in a data connection
`POST https://zieapi.vercel.app/v1/cloud:aliyun-bailian/batch-update-file-tag` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| WorkspaceId | string | yes | The workspace ID. On the console homepage (https://bailian.console.aliyun.com/knowledge-base#/home) console homepage… |
| FileInfos | string | yes | The list of documents to update (JSON-encoded) |
| UpdateMode | string | no | The update mode. Valid values: APPEND (append) and OVERWRITE (overwrite) |

### Configures the parsing method for specific file types. For example, specifies large model document parsing…
`POST https://zieapi.vercel.app/v1/cloud:aliyun-bailian/change-parse-setting` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| WorkspaceId | string | yes | The ID of the workspace to which the category belongs. For more information about how to obtain the workspace ID, see… |
| CategoryId | string | yes | The category ID, which is the `CategoryId` returned by the AddCategory operation. You can also obtain it by clicking the ID icon next to… |
| FileType | string | yes | The file type (extension). Valid values: doc docx ppt pptx xls xlsx md txt pdf png jpg jpeg bmp gif html |
| Parser | string | yes | The parser identifier code. Different parsers are applicable to different scenarios. For more information, see "Knowledge Base". Valid… |
| ParserConfig | string | no | The parser configuration. This parameter is required only when the parser is set to Qwen VL parsing (JSON-encoded) |

### Creates two types of knowledge bases: unstructured knowledge bases based on documents or audio and video,…
`POST https://zieapi.vercel.app/v1/cloud:aliyun-bailian/create-index` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| WorkspaceId | string | yes | The workspace ID. The knowledge base is created in this workspace. For more information about how to obtain the ID, refer to… |
| Name | string | yes | The name of the knowledge base. The name must be 1 to 20 characters in length and can contain Chinese characters, English letters, digits,… |
| StructureType | string | yes | The type of the knowledge base. Valid values: unstructured: a knowledge base for document search or audio and video. The default use… |
| EmbeddingModelName | string | no | The embedding model used by the knowledge base. The embedding model is used to transform the original input prompt and knowledge text into… |
| RerankModelName | string | no | The reranking model used by the knowledge base. The reranking model is a scoring system external to the knowledge base. It calculates the… |
| RerankMinScore | number | no | The similarity threshold. Only text chunks with a similarity score greater than this value are recalled. This parameter is used to filter… |
| ChunkSize | integer | no | The chunk size, which is the maximum number of characters in each text chunk. If the text exceeds this length: Intelligent chunking… |
| OverlapSize | integer | no | The chunk overlap size, which indicates the number of overlapping characters between the current text chunk and the previous text chunk.… |
| Separator | string | no | The sentence separator. This parameter takes effect only when chunkMode is set to regex. In other modes, this parameter does not take… |
| SourceType | string | no | This parameter is required in the latest SDK version. Otherwise, an error is reported when you call the SubmitIndexJob operation: Required… |
| DocumentIds | string | no | You can import files synchronously when you create a knowledge base. Here, you can specify the list of files to be imported by passing… |
| CategoryIds | string | no | You can import files synchronously when you create a knowledge base. Here, you can import all files under a specified category by… |
| TableIds | string | no | You can obtain the ID by clicking the ID icon next to the table name on the Tables tab of the Table Connector in Data Connection… |
| SinkType | string | yes | The vector storage type of the knowledge base. For more information, refer to https://help.aliyun.com/document_detail/2807740.html. Valid… |
| SinkInstanceId | string | no | The ID of the AnalyticDB for PostgreSQL instance. This parameter is required only when SinkType is set to ADB. Go to the AnalyticDB for… |
| SinkRegion | string | no | The region where the AnalyticDB for PostgreSQL instance resides. This parameter is required only when SinkType is set to ADB. You can call… |
| Columns | string | no | The structure of the data table, such as column names and types. This parameter is not available. Do not pass this parameter. (JSON-encoded) |
| Description | string | no | The description of the knowledge base. The description must be 0 to 200 characters in length and can contain English and Chinese… |
| metaExtractColumns | string | no | The metadata extraction configuration. Metadata is a series of additional attributes related to the content of unstructured data. These… |
| enableHeaders | string | no | Specifies whether to use the first row of all .xlsx and .xls files as the header and concatenate it to each text chunk to prevent the… |
| chunkMode | string | no | Enables custom chunking and specifies the chunking strategy. For more information, refer to… |
| EnableRewrite | string | no | Specifies whether to enable multi-turn conversation rewriting. Valid values: true: enabled. false: disabled. Default value: true |
| CreateIndexType | string | no | This parameter is not available. Do not pass this parameter |
| pipelineCommercialType | string | no | The https://help.aliyun.com/document_detail/2997110.html of the knowledge base. Valid values: standard: Standard Edition enterprise:… |
| pipelineCommercialCu | integer | no | The number of RCUs for the knowledge base. This parameter is required only when pipelineCommercialType is set to enterprise. Valid values:… |
| pipelineRetrieveRateLimitStrategy | string | no | The throttling handling strategy for the knowledge base dependency link. This parameter is required only when pipelineCommercialType is… |
| datasourceCode | string | no | The datasourceCode |
| table | string | no | The table |
| database | string | no | The database |
| knowledgeType | string | no | The specific knowledge type, which is used to further specify the type of data processed by the knowledge base. This parameter must be… |
| knowledgeScene | string | no | The knowledgeScene |
| connectId | string | no | 连接器标识符 |
| channelType | string | no | 渠道类型 |
| RerankMode | string | no | Specifies the instruction intervention mode of the reranking model to determine its scoring preference. Valid values: qa: question… |
| RerankInstruct | string | no | This parameter is not available. Do not specify this parameter. Provides a natural language instruction to fine-tune the behavior of the… |

### Creates a long-term memory
`POST https://zieapi.vercel.app/v1/cloud:aliyun-bailian/create-memory` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| workspaceId | string | yes | The ID of the workspace to which the long-term memory belongs. For information about how to obtain the workspace ID, see… |
| description | string | no | The description of the long-term memory. The description is empty by default. The value must be 1 to 50 characters in length and can… |

### Creates a memory node
`POST https://zieapi.vercel.app/v1/cloud:aliyun-bailian/create-memory-node` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| workspaceId | string | yes | The ID of the workspace to which the long-term memory belongs. For information about how to obtain the workspace ID, see… |
| memoryId | string | yes | The long-term memory ID, which is the memoryId returned by the CreateMemory operation |
| content | string | yes | The content of the memory node. The content must be 1 to 200 characters in length and can contain letters, digits, underscores (_),… |

### Create a prompt template
`POST https://zieapi.vercel.app/v1/cloud:aliyun-bailian/create-prompt-template` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| workspaceId | string | yes | Workspace ID |
| name | string | yes | Template name |
| content | string | yes | Prompt template content |

### Permanently deletes a specified category
`POST https://zieapi.vercel.app/v1/cloud:aliyun-bailian/delete-category` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| CategoryId | string | yes | The category ID, which is the `CategoryId` returned by the AddCategory operation. You can also obtain it on the Application Data… |
| WorkspaceId | string | yes | The ID of the workspace to which the category belongs. For information about how to obtain the workspace ID, see… |

### Deletes a specified text chunk from a knowledge base. Deleted text chunks cannot be retrieved or recalled
`POST https://zieapi.vercel.app/v1/cloud:aliyun-bailian/delete-chunk` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| PipelineId | string | yes | The knowledge base ID, which is the `Data.Id` returned by the CreateIndex operation |
| WorkspaceId | string | yes | The ID of the workspace to which the knowledge base belongs. For information about how to obtain the ID, see… |
| ChunkIds | string | yes | The list of text chunk IDs to delete. A maximum of 10 text chunk IDs can be passed in a single request (JSON-encoded) |

### Deletes a connector
`POST https://zieapi.vercel.app/v1/cloud:aliyun-bailian/delete-connector` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| ConnectorId | string | yes | The instance ID of the data connector. Obtain this from the Model Studio console |
| WorkspaceId | string | yes | The workspace ID where the knowledge base resides |

### Permanently deletes a specified file from application data. Deleting data tables through the API is not…
`POST https://zieapi.vercel.app/v1/cloud:aliyun-bailian/delete-file` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| FileId | string | yes | The file ID, which is the `FileId` returned by the AddFile operation. The value is 32 to 128 characters in length. You can also obtain the… |
| WorkspaceId | string | yes | The workspace ID to which the file belongs. For information about how to obtain the workspace ID, see… |

### Deletes files in batches
`POST https://zieapi.vercel.app/v1/cloud:aliyun-bailian/delete-files` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| WorkspaceId | string | yes | The workspace ID to which the category belongs. For information about how to obtain the workspace ID, see… |
| FileIds | string | yes | The list of file IDs to delete. A maximum of 20 files can be deleted at a time (JSON-encoded) |

### Permanently deletes a specified knowledge base
`POST https://zieapi.vercel.app/v1/cloud:aliyun-bailian/delete-index` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| IndexId | string | yes | The knowledge base ID, which is the `Data.Id` returned by the CreateIndex operation |
| WorkspaceId | string | yes | The workspace ID of the knowledge base. For information about how to obtain the workspace ID, see… |

### Permanently deletes files from a specified knowledge base
`POST https://zieapi.vercel.app/v1/cloud:aliyun-bailian/delete-index-document` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| WorkspaceId | string | yes | The ID of the workspace to which the knowledge base belongs. For information about how to obtain the workspace ID, see… |
| IndexId | string | yes | The knowledge base ID, which is the `Data.Id` returned by the CreateIndex operation |
| DocumentIds | string | yes | The list of file IDs (JSON-encoded) |

### Permanently deletes a specified long-term memory
`POST https://zieapi.vercel.app/v1/cloud:aliyun-bailian/delete-memory` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| workspaceId | string | yes | The ID of the workspace to which the long-term memory belongs. For information about how to obtain the workspace ID, see… |
| memoryId | string | yes | The ID of the long-term memory, which corresponds to the memoryId returned by the CreateMemory… |

### Deletes a memory fragment
`POST https://zieapi.vercel.app/v1/cloud:aliyun-bailian/delete-memory-node` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| workspaceId | string | yes | The workspace ID |
| memoryId | string | yes | The long-term memory ID |
| memoryNodeId | string | yes | The memory fragment ID |

### Deletes a prompt template based on the template ID
`POST https://zieapi.vercel.app/v1/cloud:aliyun-bailian/delete-prompt-template` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| workspaceId | string | yes | The workspace ID |
| promptTemplateId | string | yes | The template ID |

### Queries the basic information of a file in application data, including the file name, type, and status
`GET https://zieapi.vercel.app/v1/cloud:aliyun-bailian/describe-file` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| WorkspaceId | string | yes | The ID of the workspace to which the file belongs. For more information about how to obtain the ID, see… |
| FileId | string | yes | The ID of the file, which is the `FileId` returned by the AddFile operation. You can also obtain the ID by clicking the ID icon next to… |

### Queries the tipping status of the Alipay wallet bound to an application
`POST https://zieapi.vercel.app/v1/cloud:aliyun-bailian/get-alipay-transfer-status` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| workspace_id | string | no | The Bailian workspace ID |
| code | string | no | The tipping code returned by the Alipay tipping link request |

### Retrieves the Alipay tipping URL for an application
`GET https://zieapi.vercel.app/v1/cloud:aliyun-bailian/get-alipay-url` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| workspace_id | string | no | The ID of the Bailian workspace |
| app_id | string | no | The ID of the Bailian application |

### Retrieves the list of all supported parser types based on the specified file type (file name extension)
`GET https://zieapi.vercel.app/v1/cloud:aliyun-bailian/get-available-parser-types` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| WorkspaceId | string | yes | The ID of the workspace to which the file belongs. For information about how to obtain the workspace ID, see… |
| FileType | string | yes | The file type (extension) for which to retrieve supported parsers. Valid values: doc docx ppt pptx xls xlsx md txt pdf png jpg jpeg bmp… |

### Retrieves details about a connector. This operation currently supports only file connectors
`GET https://zieapi.vercel.app/v1/cloud:aliyun-bailian/get-connector` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| WorkspaceId | string | yes | The ID of the business space. To obtain this ID, see https://help.aliyun.com/document_detail/2587495.html |
| ConnectorName | string | no | The name of the connector to query. An exact match is required |
| ConnectorId | string | no | The ID of the connector. You can find this ID in the Model Studio console… |

### Queries the current status of a specified knowledge base creation task or knowledge base document addition…
`GET https://zieapi.vercel.app/v1/cloud:aliyun-bailian/get-index-job-status` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| WorkspaceId | string | yes | The workspace ID. Make sure that the knowledge base you want to manage is in this workspace. For more information, see… |
| JobId | string | yes | The knowledge base job task ID, which is the Data.Id returned by the SubmitIndexJob or SubmitIndexAddDocumentsJob operation |
| IndexId | string | yes | The knowledge base ID, which is the Data.Id returned by the CreateIndex operation |
| PageNumber | integer | no | Both the SubmitIndexJob and SubmitIndexAddDocumentsJob operations support batch file import. The fields returned by this operation include… |
| pageSize | integer | no | The number of file import tasks to return on each page during paging. Maximum value: unlimited. Default value: 10 |

### You can call the GetIndexMonitor operation to query monitoring data for a specified knowledge base within a…
`GET https://zieapi.vercel.app/v1/cloud:aliyun-bailian/get-index-monitor` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| WorkspaceId | string | yes | The ID of the workspace where the knowledge base is located |
| IndexId | string | yes | The unique ID of the target knowledge base |
| StartTimestamp | integer | yes | The start of the time range to query. This is a UNIX timestamp in seconds |
| EndTimestamp | integer | yes | The end of the time range to query. The end time can be a maximum of 30 days after the start time. This is a UNIX timestamp in seconds |

### Retrieves the description of a specified long-term memory
`GET https://zieapi.vercel.app/v1/cloud:aliyun-bailian/get-memory` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| workspaceId | string | yes | The ID of the workspace to which the long-term memory belongs. For information about how to obtain the workspace ID, see… |
| memoryId | string | yes | The ID of the long-term memory, which corresponds to the memoryId returned by the CreateMemory… |

### Retrieves a memory fragment
`GET https://zieapi.vercel.app/v1/cloud:aliyun-bailian/get-memory-node` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| workspaceId | string | yes | The workspace ID |
| memoryId | string | yes | The long-term memory ID |
| memoryNodeId | string | yes | The memory fragment ID |

### Queries the data parsing settings for a specified category
`GET https://zieapi.vercel.app/v1/cloud:aliyun-bailian/get-parse-settings` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| WorkspaceId | string | yes | The ID of the workspace to which the file belongs. For information about how to obtain the workspace ID, see… |
| CategoryId | string | no | The category ID, which is the `CategoryId` returned by the AddCategory operation. You can also obtain it from the Application Data… |

### Obtains a prompt template based on the template ID
`GET https://zieapi.vercel.app/v1/cloud:aliyun-bailian/get-prompt-template` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| workspaceId | string | yes | The workspace ID |
| promptTemplateId | string | yes | The template ID |

### Retrieves the details of one or more categories in a specified workspace
`POST https://zieapi.vercel.app/v1/cloud:aliyun-bailian/list-category` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| WorkspaceId | string | yes | The workspace ID. For information about how to obtain the workspace ID, see https://help.aliyun.com/document_detail/2587495.html. The… |
| ConnectorId | string | no | The connector ID |
| CategoryType | string | yes | The type of category to query. Valid values: UNSTRUCTURED: category. Querying tables (data tables) by using API operations is not… |
| ParentCategoryId | string | no | The ID of the parent category for the categories to query |
| NextToken | string | no | The pagination token. Set this parameter to the NextToken value returned in the previous API call |
| MaxResults | integer | no | The number of categories per page in a paged query. Maximum value: 200. Valid values: 1 to 200. Default value: If the value is not set or… |
| CategoryName | string | no | Performs an exact match or filter on the category list returned by the operation based on the category name. Default value: empty, which… |

### Queries the list and information of text chunks
`POST https://zieapi.vercel.app/v1/cloud:aliyun-bailian/list-chunks` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| WorkspaceId | string | yes | The workspace ID of the knowledge base. For information about how to obtain the workspace ID, see… |
| Fields | array | no | An array of field names used to filter non-private fields (those not prefixed with an underscore _) in the Metadata field returned by this… |
| FileId | string | no | The file ID, which is the `FileId` returned by the AddFile operation. This field is not required for data query or image Q&A knowledge… |
| Filed | string | no | The file ID field in the legacy Model Studio SDK. The usage and default value are identical to those of the `FileId` field. If you are… |
| IndexId | string | yes | The knowledge base ID, which is the `Data.Id` returned by the CreateIndex operation |
| PageNum | integer | no | The page number to query. Minimum value: 1. Default value: 1 |
| PageSize | integer | no | The number of text chunks to display per page in a paged query. Maximum value: 100. Default value: 10 |

### Retrieves the details of one or more documents in a specified category
`GET https://zieapi.vercel.app/v1/cloud:aliyun-bailian/list-file` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| WorkspaceId | string | yes | The ID of the workspace to which the category belongs. For more information about how to obtain the workspace ID, see… |
| CategoryId | string | yes | The category ID, which is the `CategoryId` returned by the AddCategory operation. You can also obtain it on the Application Data… |
| NextToken | string | no | The pagination token. Set this parameter to the NextToken value returned in the previous API call |
| MaxResults | integer | no | The number of entries per page for a paged query. Valid values: 1 to 200. Default value: If the value is not set or is less than 1, the… |
| FileName | string | no | The file name (without the extension). Only exact match is supported. Fuzzy search is not supported |
| FileIds | string | no | The list of file IDs to query. A maximum of 20 files can be queried in a single request (JSON-encoded) |

### Retrieves the files and their summary information from a specified knowledge base
`GET https://zieapi.vercel.app/v1/cloud:aliyun-bailian/list-index-documents` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| IndexId | string | yes | The knowledge base ID, which is the `Data.Id` returned by the CreateIndex operation |
| DocumentStatus | string | no | Filters the returned file list by file import status. Valid values: INSERT_ERROR: Failed to import to the index. RUNNING: Index building… |
| DocumentName | string | no | Filters the returned file list by file name (excluding the file extension). Default value: empty, which means no filtering by file name |
| EnableNameLike | string | no | Specifies whether to enable fuzzy matching for file names. This parameter is used together with the `DocumentName` parameter. Valid… |
| PageNumber | integer | no | The page number to query. Minimum value: 1. Default value: 1 |
| PageSize | integer | no | The number of files to display per page in a paged query. No maximum limit. Default value: 10 |
| WorkspaceId | string | yes | The workspace ID of the knowledge base. For information about how to obtain the workspace ID, see… |

### Retrieves files and their details from a specified knowledge base
`POST https://zieapi.vercel.app/v1/cloud:aliyun-bailian/list-index-file-details` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| IndexId | string | no | The knowledge base ID, which is the `Data.Id` returned by the CreateIndex operation |
| DocumentStatus | string | no | Filters the returned file list by file import status. Valid values: INSERT_ERROR: Import to index failed. RUNNING: Index building in… |
| DocumentName | string | no | Filters the returned file details list by file name. Default value: empty, which means no filtering by file name |
| PageNumber | integer | no | The page number to query. Minimum value: 1. Default value: 1 |
| PageSize | integer | no | The number of files to display per page in a paging query. Maximum value: 10 |
| WorkspaceId | string | yes | The workspace ID to which the knowledge base belongs. For information about how to obtain the workspace ID, see… |
| EnableNameLike | string | no | Specifies whether to enable fuzzy matching for file names. This parameter is used together with the `DocumentName` parameter. Valid… |

### Retrieves the list of knowledge bases in a specified workspace
`GET https://zieapi.vercel.app/v1/cloud:aliyun-bailian/list-indices` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| IndexName | string | no | The name of the knowledge base. You can use this parameter to search for a knowledge base by name. The name must be 1 to 20 characters in… |
| PageNumber | string | no | The page number. Minimum value: 1. Default value: 1 |
| PageSize | string | no | The number of knowledge bases to display per page in a paging query. No maximum limit. Default value: 10 |
| WorkspaceId | string | yes | The ID of the workspace to which the knowledge base belongs. For information about how to obtain the workspace ID, see… |

### Retrieves the details of one or more long-term memory entities in a specified workspace
`GET https://zieapi.vercel.app/v1/cloud:aliyun-bailian/list-memories` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| workspaceId | string | yes | The ID of the workspace to which the long-term memory entities belong. For information about how to obtain the workspace ID, see… |
| maxResults | integer | no | The number of entries per page in a paged query. Valid values: 1 to 50. Default value: 10 |
| nextToken | string | no | The pagination token. Set this parameter to the NextToken value returned in the previous API call |

### Retrieves a list of memory nodes
`GET https://zieapi.vercel.app/v1/cloud:aliyun-bailian/list-memory-nodes` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| workspaceId | string | yes | The workspace ID |
| memoryId | string | yes | The long-term memory ID |
| maxResults | integer | no | The maximum number of results to return |
| nextToken | string | no | The pagination token returned from a previous request. If specified, the query results are paginated based on the previous request |

### Obtains a list of prompt templates
`GET https://zieapi.vercel.app/v1/cloud:aliyun-bailian/list-prompt-templates` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| workspaceId | string | yes | The workspace ID |
| name | string | no | The keyword that is used to search for templates |
| type | string | no | The type of the template. Valid values: · System · Custom |
| maxResults | integer | no | The maximum number of returned entries |
| nextToken | string | no | The token that determines the start position of the query. Set this parameter to the value of the NextToken parameter that is returned… |

### Retrieves information from a specified knowledge base
`POST https://zieapi.vercel.app/v1/cloud:aliyun-bailian/retrieve` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| Query | string | no | The input text, which is the original input prompt. The length and characters of Query are not limited |
| DenseSimilarityTopK | integer | no | The top K value for AISearch. The system generates a vector for the input text and retrieves the top K text chunks in the knowledge base… |
| EnableReranking | string | no | Specifies whether to enable reranking. For more information, see https://help.aliyun.com/document_detail/2807740.html. Valid values: true:… |
| EnableRewrite | string | no | Specifies whether to enable multi-turn conversation rewriting… |
| Rerank | string | no | The reranking configuration (JSON-encoded) |
| RerankMinScore | number | no | The similarity threshold. This threshold specifies the minimum similarity score allowed for recalled text chunks and is used to filter the… |
| RerankTopN | integer | no | The top N text chunks to return after reranking. Valid values: 1 to 20. Default value: 5 |
| Rewrite | string | no | The multi-turn conversation rewriting configuration (JSON-encoded) |
| SparseSimilarityTopK | integer | no | The top K value for keyword retrieval. The system retrieves chunks from the knowledge base that are an exact match for the keywords in the… |
| WorkspaceId | string | yes | The ID of the workspace to which the knowledge base belongs. For more information about how to obtain the ID, see… |
| IndexId | string | yes | The ID of the knowledge base, which is the Data.Id returned by the CreateIndex operation. Make sure that the corresponding knowledge base… |
| SaveRetrieverHistory | string | no | Specifies whether to save the historical text chunk recall test data. Valid values: true: Save. false: Do not save. Default value: false |
| SearchFilters | string | no | The personalized retrieval conditions, such as tags, configured by using SearchFilter to filter semantic retrieval results and exclude… |
| Images | string | no | The URLs of the images passed in the query (JSON-encoded) |
| QueryHistory | string | no | Multi-turn conversation rewriting (https://help.aliyun.com/model-studio/use-cases/rag-optimization#b7031e2ad6cji) Multi-turn conversation… |
| Extra | string | no | The Extra (JSON-encoded) |

### Appends parsed files to a specified knowledge base
`POST https://zieapi.vercel.app/v1/cloud:aliyun-bailian/submit-index-add-documents-job` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| WorkspaceId | string | yes | The workspace ID to which the knowledge base belongs. For information about how to obtain the workspace ID, see… |
| IndexId | string | yes | The knowledge base ID, which is the `Data.Id` returned by the CreateIndex operation |
| SourceType | string | yes | The data source type. Valid values: DATA_CENTER_CATEGORY: category type. Imports all documents under specified categories in Application… |
| DocumentIds | string | no | The list of file IDs (JSON-encoded) |
| CategoryIds | string | no | The list of category IDs (JSON-encoded) |
| ChunkMode | string | no | Enables custom chunking (applies only to files appended in this request). For more information, see… |
| Separator | string | no | The sentence separator, which takes effect only when `chunkMode` is set to regex (otherwise, it does not take effect even if specified).… |
| ChunkSize | integer | no | The chunk length, which is the maximum number of characters per text chunk (applies only to files appended in this request). When this… |
| OverlapSize | integer | no | The chunk overlap length (applies only to files appended in this request). It indicates the number of overlapping characters between the… |
| EnableHeaders | string | no | Specifies whether to enable header assembly for Excel files. When enabled, the knowledge base treats the first row of all xlsx and xls… |
| Extra | string | no | The Extra (JSON-encoded) |

### Submits a specified CreateIndex task to complete knowledge base creation
`POST https://zieapi.vercel.app/v1/cloud:aliyun-bailian/submit-index-job` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| WorkspaceId | string | yes | The workspace ID to which the knowledge base belongs. For information about how to obtain the workspace ID, see… |
| IndexId | string | yes | The knowledge base ID, which is the `Data.Id` returned by the CreateIndex operation |

### Modifies the content and title of a specified text chunk in a knowledge base, and specifies whether the…
`POST https://zieapi.vercel.app/v1/cloud:aliyun-bailian/update-chunk` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| PipelineId | string | yes | The knowledge base ID, which is the `Data.Id` returned when you call the CreateIndex operation, or retrieved from the knowledge base… |
| DataId | string | yes | The file ID, which is the `FileId` returned by the AddFile operation. You can also obtain it from the application data… |
| ChunkId | string | yes | The ID of the text chunk to modify. You can obtain this value by calling the ListChunks operation. The value is in the Node.Metadata._id… |
| IsDisplayedChunkContent | string | yes | Specifies whether the text chunk participates in knowledge base retrieval. Valid values: true: Participates. false: Does not participate.… |
| content | string | yes | The new content of the text chunk. The content length must be between 10 and 6,000 characters, and must not exceed the maximum segment… |
| WorkspaceId | string | yes | The ID of the workspace to which the knowledge base belongs. For information about how to obtain the workspace ID, see… |
| title | string | no | The new title of the text chunk. The length limit is 0–50 characters. An empty string is allowed. If you pass an empty string, the… |

### Updates a connector
`POST https://zieapi.vercel.app/v1/cloud:aliyun-bailian/update-connector` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| WorkspaceId | string | yes | The ID of the workspace |
| ConnectorId | string | yes | The instance ID of the connector. You can find this ID in the Model Studio console |
| ConnectorName | string | yes | The name of the connector |
| Description | string | yes | A description of the connector |

### Updates the tags of a specified file
`POST https://zieapi.vercel.app/v1/cloud:aliyun-bailian/update-file-tag` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| WorkspaceId | string | yes | The workspace ID to which the file belongs. For information about how to obtain the workspace ID, see… |
| FileId | string | yes | The file ID in the Data Center. You can obtain the file ID by clicking the ID icon next to the file name on the Application Data… |
| Tags | string | yes | The list of tags associated with the file. You can specify up to 100 tags, and the total character length of all tags cannot exceed 700… |

### Updates partial configurations of a specified knowledge base
`POST https://zieapi.vercel.app/v1/cloud:aliyun-bailian/update-index` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| WorkspaceId | string | yes | The workspace ID |
| Id | string | yes | The knowledge base ID |
| Name | string | no | The knowledge base name |
| Description | string | no | The knowledge base description |
| RerankMinScore | string | no | The minimum reranking score. Valid values: 0 to 1 |
| DenseSimilarityTopK | integer | no | The top K value for AISearch. The system generates a vector for the input text and retrieves the K text chunks with the most similar… |
| SparseSimilarityTopK | integer | no | The top K value for keyword retrieval. The system retrieves text chunks in the knowledge base that are an exact match for the keywords of… |
| PipelineCommercialType | string | no | The specification type of the knowledge base. Valid values: standard: Standard Edition. enterprise: Ultimate Edition |
| PipelineCommercialCu | integer | no | The number of RCUs for an Ultimate Edition knowledge base. This parameter is required only when pipelineCommercialType is set to… |

### Updates the description of a specified long-term memory
`POST https://zieapi.vercel.app/v1/cloud:aliyun-bailian/update-memory` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| workspaceId | string | yes | The ID of the workspace to which the long-term memory belongs. For information about how to obtain the workspace ID, see… |
| memoryId | string | yes | The ID of the long-term memory, which corresponds to the memoryId returned by the CreateMemory… |
| description | string | no | The new description. The description must be 1 to 50 characters in length and can contain characters in the letter category of Unicode,… |

### Updates a memory fragment
`POST https://zieapi.vercel.app/v1/cloud:aliyun-bailian/update-memory-node` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| workspaceId | string | yes | The workspace ID |
| memoryId | string | yes | The long-term memory ID |
| memoryNodeId | string | yes | The memory fragment ID |
| content | string | yes | The memory fragment content |

### Updates a prompt template based on the template ID
`POST https://zieapi.vercel.app/v1/cloud:aliyun-bailian/update-prompt-template` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| workspaceId | string | yes | The workspace ID |
| promptTemplateId | string | yes | The template ID |
| name | string | no | The template name |
| content | string | no | The template content |

### Updates a table in a table connector of Alibaba Cloud Model Studio Data Hub using a file from an authorized…
`POST https://zieapi.vercel.app/v1/cloud:aliyun-bailian/update-table-from-authorized-oss` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |
| WorkspaceId | string | yes | The ID of the workspace to which the file belongs. For more information, see https://help.aliyun.com/document_detail/2587495.html |
| TableId | string | yes | The ID of the existing table to update. This operation only updates the specified table and does not create data tables |
| OssBucket | string | yes | The name of the OSS bucket. For more information, see https://help.aliyun.com/document_detail/177682.html. The target bucket must have the… |
| OssRegionId | string | yes | The region ID of the OSS bucket. For more information, see https://help.aliyun.com/document_detail/31837.html |
| OssKey | string | yes | The key of the file to import in the OSS bucket. For more information, see https://help.aliyun.com/document_detail/273129.html |
| UpdateMode | string | yes | The update mode. Valid values: OVERWRITE: overwrites existing data. APPEND: appends data to existing data |

### version
`POST https://zieapi.vercel.app/v1/cloud:aliyun-bailian/version` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://bailian.ap-southeast-1.aliyuncs.com |

## Example
```
curl "https://zieapi.vercel.app/v1/cloud:aliyun-bailian/add-category" \
  -H "x-api-key: $APIZIE_KEY" \
  -H "x-upstream-key: $PROVIDER_KEY"
```

## FAQ

### How do I call the Alibaba Cloud Alibaba Cloud Model Studio API?
Create a free Apizie key, then send POST https://zieapi.vercel.app/v1/cloud:aliyun-bailian/add-category with the header x-api-key. Every endpoint returns { project, data, timestamp }.

### Is the Alibaba Cloud Alibaba Cloud Model Studio API free on Apizie?
Yes. The Free plan includes 1,000 requests a month at 100 requests a minute, no credit card. Alibaba Cloud Alibaba Cloud Model Studio itself also needs your own key from aliyuncs.com.

### Can AI agents use the Alibaba Cloud Alibaba Cloud Model Studio API?
Yes. Add the Apizie MCP server (https://zieapi.vercel.app/mcp) to Claude, ChatGPT, Cursor or VS Code, then ask in plain language. The agent calls run_scraper with project key cloud:aliyun-bailian.

### What is the status of the Alibaba Cloud Alibaba Cloud Model Studio API?
Needs your own provider key (bring your own key)
