# Alibaba Cloud DianJin API

> Alibaba Cloud DianJin API on Apizie: 51 endpoints (Creates a task to summarize documents by year, Creates an outbound call session, Creates a conversation analysis task. After the task is created, you can query the results by conversation…, Creates a multi-document summary task, …) 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-dianjin/{endpoint} or from Claude, ChatGPT and Cursor through the Apizie MCP server. Free plan: 1,000 requests a month.

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

Alibaba Cloud OpenAPI for DianJin (dianjin, version 2024-06-28). Calls are signed with ACS3-HMAC-SHA256 using your AccessKey ID and secret.

## Endpoints

### Creates a task to summarize documents by year
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/create-annual-doc-summary-task` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | The workspace ID |
| anaYears | array | yes | The list of analysis years |
| docInfos | array | yes | The list of document information |
| enableTable | string | no | Specifies whether to enable tables. Default value: true |
| instruction | string | no | The instruction |
| modelId | string | yes | The model ID |

### Creates an outbound call session
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/create-dialog` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | The workspace ID |
| channel | string | yes | The channel |
| enableLibrary | string | no | Specifies whether to enable the intent library |
| metaData | object | no | Other information |
| playCode | string | yes | The playbook code |
| qaLibraryList | array | no | A list of Q\&A library IDs |
| requestId | string | yes | The request ID |
| selfDirected | string | no | Specifies whether to enable autonomous Q\&A |

### Creates a conversation analysis task. After the task is created, you can query the results by conversation…
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/create-dialog-analysis-task` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | The workspace ID |
| analysisNodes | array | no | The list of analysis nodes. If this parameter is left empty, all nodes are analyzed. You can specify one or more nodes |
| conversationList | array | yes | The conversation content. You can specify multiple conversations |
| metaData | object | no | The metadata, which contains business-related attributes consumed during the conversation analysis process. The business system passes… |
| playCode | string | yes | The conversation scenario code, which is associated with the conversation analysis configuration |
| requestId | string | yes | The request ID |

### Creates a multi-document summary task
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/create-docs-summary-task` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | Workspace ID |
| docInfos | array | yes | Document information list |
| enableTable | string | no | Enable table parsing. Default is true |
| instruction | string | no | Instruction |
| modelId | string | yes | Model ID |

### Creates a financial report summary
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/create-fin-report-summary-task` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | Workspace ID |
| docId | string | yes | Document ID |
| enableTable | string | yes | Enable table |
| endPage | integer | no | End page |
| instruction | string | no | Instruction |
| libraryId | string | yes | Document library ID |
| modelId | string | yes | Model ID |
| startPage | integer | no | Start page |
| taskType | string | no | Task type. Optional. Defaults to finance_report. If you set this to custom, provide an instruction |

### Creates a document library. A document library is used to isolate document and index information. If your…
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/create-library` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | The workspace ID |
| description | string | yes | The description of the document library |
| indexSetting | object | no | The index settings of the document library |
| libraryName | string | yes | The name of the document library |

### Creates a PDF document translation task. Submits the translation task and executes the translation process…
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/create-pdf-translate-task` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | The workspace ID |
| docId | string | yes | The document ID |
| knowledge | string | no | The domain knowledge referenced during translation |
| libraryId | string | yes | The document library ID |
| modelId | string | yes | The model ID |
| translateTo | string | no | The target language. Default value: Chinese |

### Constructs document chunks based on business scenarios
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/create-predefined-document` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | The workspace ID |
| chunks | array | no | The document chunks |
| libraryId | string | no | The ID of the document library |
| metadata | object | no | The metadata |
| title | string | no | The title of the document |

### Creates a quality check task
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/create-quality-check-task` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | The workspace ID |
| conversationList | object | yes | The conversation content. If associated with a quality check scenario, pass multiple conversations. Otherwise, pass only one |
| gmtService | string | yes | The business occurrence time. The system uses this to record submission time, make task scheduling priority decisions, and so on |
| metaData | object | no | The metadata. These are properties related to business that rules consume during execution. The business system passes these in real-time… |
| qualityGroup | array | no | The quality check rule group |
| requestId | string | yes | The request ID |
| sceneCode | string | no | The scenario code |
| type | string | yes | Quality check type: |

### A callback event that indicates the completion of a Dashscope asynchronous task
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/dashscope-async-task-finish-event` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| X-Load-Test | string | no | Indicates whether the request is part of a stress test |
| workspaceId | string | yes | Workspace ID |
| body | object | no | Request body parameters |

### Deletes a document. After deletion, the original document cannot be viewed or recalled
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/delete-document` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | The ID of the workspace. This is a path parameter |
| docIds | array | yes | The list of document IDs |
| libraryId | string | yes | The ID of the document library |

### Deletes a document library. Warning: This operation deletes the document library and all associated documents
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/delete-library` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | The workspace ID |
| libraryId | string | yes | The document library ID |

### Implements real-time speech dialog transcription, intent recognition, and script speech synthesis over the…
`GET https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/end-to-end-real-time-dialog` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | The workspace ID |
| asrModelId | string | no | The ID of the automatic speech recognition (ASR) model. Default value: nls-base. Supported models include paraformer-realtime-v2 and… |
| ttsModelId | string | no | The ID of the speech synthesis model. Default value: nls-base. Supported models include cosyvoice-v2 |
| inputFormat | string | no | The input audio format. Valid values: pcm, wav, and mp3 |
| outputFormat | string | no | The output audio format |
| sampleRate | string | no | The sample rate |
| voiceCode | string | no | The voice code. This parameter is only applicable when character-level or sentence-level timestamps are supported |
| volume | integer | no | The volume. Valid values: 0 to 100. Default value: 50 |
| speechRate | integer | no | The speech rate. If ttsModelId is set to nls-base: Valid values: -500 to 500. Default value: 0. If ttsModelId is set to cosyvoice-v2:… |
| pitchRate | integer | no | The pitch rate. If ttsModelId is set to nls-base: Valid values: -500 to 500. Default value: 0. If ttsModelId is set to cosyvoice-v2:… |

### Terminate the job
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/evict-task` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | The workspace ID |
| taskId | string | yes | The task ID |

### Parses question and answer (Q&A) pairs from a document. You can use the UpdateQaLibrary API to update the…
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/gen-doc-qa-result` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | The workspace ID |
| docId | string | yes | The document ID |
| libraryId | string | yes | The document library ID |
| requestId | string | yes | The request ID. This ID uniquely identifies the request. The first request with this ID starts the Q\&A pair parsing. Subsequent requests… |

### Retrieve app configuration
`GET https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/get-app-config` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | Path parameter, workspace ID |

### Retrieves the Q&A results generated by the SubmitChatQuestion API
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/get-chat-question-resp` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | Workspace ID |
| batchId | string | yes | Question batch ID |
| sessionId | string | yes | Session ID |

### Retrieves session analysis results in batches based on a list of session IDs or a time range
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/get-dialog-analysis-result` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | The workspace ID |
| asc | string | no | Specifies whether to sort in ascending order. Default value: true. If set to true, the results are sorted in ascending order by session… |
| endTime | string | no | The end time in the yyyy-MM-dd HH:mm:ss format. If sessionIds is not empty, the session analysis results are queried based on sessionIds |
| sessionIds | array | no | The list of session IDs. This parameter is optional. If useUrl is set to true, an OSS URL is returned. A maximum of 1,000 sessions are… |
| startTime | string | no | The start time in the yyyy-MM-dd HH:mm:ss format. If sessionIds is not empty, the session analysis results are queried based on sessionIds |
| useUrl | string | no | Specifies whether to return an OSS URL in the response. Default value: true. If set to true, an OSS URL is returned, and the URL is valid… |

### Retrieve session details
`GET https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/get-dialog-detail` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | Workspace ID |
| sessionId | string | yes | Session ID |

### Retrieves the records and intent analysis results of real-time conversations
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/get-dialog-log` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | The workspace ID |
| id | string | no | The ID field in the response parameters of the real-time conversation API operation |
| sessionId | string | no | The session ID |

### Retrieve a list of document chunks. You can filter them by query conditions
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/get-document-chunk-list` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | Path parameter, workspace ID |
| chunkIdList | array | no | List of document chunk IDs |
| docId | string | yes | Document ID |
| libraryId | string | yes | Library ID |
| order | string | no | Sorting method |
| orderBy | string | no | Sort field |
| page | integer | no | Page number |
| pageSize | integer | no | Page size |
| searchQuery | string | no | Search query keyword |

### Retrieves a list of documents in a document library, supporting paging and paged query, and filtering by…
`GET https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/get-document-list` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | The workspace ID |
| page | integer | no | The page number |
| pageSize | integer | no | The page size |
| status | string | no | The document status |
| libraryId | string | yes | The document library ID |

### Retrieves the download link for a document. The link expires after 1 hour
`GET https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/get-document-url` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | The workspace ID |
| documentId | string | yes | The document ID |

### This operation retrieves a list of documents. You can filter documents by metadata or use paging
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/get-filter-document-list` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | Workspace ID |
| and | array | no | AND expression to filter documents or document chunks |
| docIdList | array | no | List of document IDs to filter documents or document chunks |
| libraryId | string | yes | Document library ID to filter documents or document chunks |
| or | array | no | OR expression to filter documents or document chunks |
| page | integer | no | Page number for pagination |
| pageSize | integer | no | Number of records per page for pagination |
| status | array | no | List of document statuses to filter documents. Document parsing status codes Status codes: WaitRefresh, InQueue, FetchingData, Embedding,… |

### Retrieves conversation history records based on the business type
`GET https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/get-history-list-by-biz-type` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | The workspace ID |
| page | integer | no | The page number |
| pageSize | integer | no | The page size |
| bizType | string | yes | The business type. Valid values: LlmChat (model Q&A) and LibraryChat (document library Q&A) |
| bizId | string | yes | The unique identifier of the business. If bizType is set to LibraryChat, bizId refers to the document library ID |

### Retrieves the detailed configuration of a document library, including the name, description, and index…
`GET https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/get-library` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | The ID of the workspace |
| libraryId | string | yes | The ID of the document library |

### Retrieves a list of document libraries, including information such as document names, descriptions, and…
`GET https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/get-library-list` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | The workspace ID. This is a path parameter |
| page | integer | no | The page number |
| pageSize | integer | no | The number of entries per page |
| query | string | no | The search keyword. You can search by document library name or description |

### Retrieve document parsing results. You can query the document's parsing status and obtain the parsing results
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/get-parse-result` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | Path parameter, the workspace ID |
| docId | string | yes | The document ID |
| libraryId | string | yes | The document library ID |
| useUrlResult | string | no | Specifies whether to return the result as a URL. If true, the parsing result is in resultUrl, and result is empty. If false, the parsing… |

### Retrieves the quality inspection results
`GET https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/get-quality-check-task-result` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | The workspace ID |
| taskId | string | yes | The task ID |

### Retrieves the task result of a financial report summarization node
`GET https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/get-summary-task-result` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | The workspace ID |
| taskId | string | yes | The task ID |

### Retrieves the result of an asynchronous task
`GET https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/get-task-result` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | The workspace ID |
| taskId | string | yes | The task ID |

### Retrieves the task status
`GET https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/get-task-status` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | The workspace ID |
| taskId | string | yes | The task ID |

### Call a plugin and retrieve its response
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/invoke-plugin` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | Path parameter. The workspace ID |
| params | object | no | Request parameters |
| pluginId | string | no | The plugin ID |

### Preview documents. Retrieve document download links, types, and titles. Use this operation to preview…
`GET https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/preview-document` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | Path parameter, workspace ID |
| documentId | string | yes | Document ID |

### Reindexing reprocesses the specified document by parsing it, splitting it into chunks, and building a new…
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/re-index` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | Path parameter. The ID of the workspace |
| documentId | string | yes | The ID of the document |

### Conducts a real-time conversation. You can use this operation to conduct a real-time conversation after…
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/real-time-dialog` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | The workspace ID |
| analysis | string | no | Specifies whether to enable analysis |
| bizType | string | no | The business type. Default value: mixIntentChat |
| conversationModel | array | yes | The conversation list |
| dialogMemoryTurns | integer | no | The number of conversation history turns to carry |
| metaData | object | no | The metadata used to encapsulate prompts |
| opType | string | no | The operation type. Valid values: common and hierarchical |
| recommend | string | no | The recommended intent |
| scriptContentPlayed | string | no | The part of the previous agent script that has been played |
| sessionId | string | yes | The session ID |
| stream | string | no | Specifies whether to return the response in streaming mode |
| userVad | string | no | Specifies whether the user interrupted |

### Provides real-time dialog assistance after a session is created using CreateDialog. Note: This operation…
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/realtime-dialog-assist` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | Workspace ID |
| analysis | string | no | Whether to analyze |
| bizType | string | yes | Business type. Currently, only dialogAssist is supported |
| conversationModel | array | yes | Dialog list |
| dialogMemoryTurns | integer | no | Number of historical dialog turns included |
| hangUpDialog | string | no | Hang up the session |
| metaData | object | no | metaData |
| requestId | string | yes | Request ID |
| scriptContentPlayed | string | no | Portion of the previous agent utterance already broadcast |
| sessionId | string | yes | Session ID |
| userVad | string | no | Whether the user interrupted |

### Rebuilds an existing task. You cannot rebuild tasks that are queued or currently executing
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/rebuild-task` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | The workspace ID |
| taskIds | array | yes | A list of task IDs |

### Retrieves document chunks from a document library based on text. You can specify the number of retrieved…
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/recall-document` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | The workspace ID |
| filters | array | no | The metadata filter conditions |
| query | string | yes | The query text |
| rearrangement | string | no | Specifies whether to enable parent-child chunk retrieval. Parent-child chunks: During document parsing, a complete semantic chunk, such as… |
| topK | integer | no | The number of document chunks to retrieve |

### Detects intents. This operation supports global and hierarchical intent detection, attitude detection, and…
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/recognize-intention` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | Workspace ID |
| analysis | string | no | Enable analysis |
| bizType | string | yes | Business type |
| conversation | string | yes | Conversation text |
| globalIntentionList | array | no | Global intent list. Required when opType is hierarchical |
| hierarchicalIntentionList | array | no | Hierarchical intent list. Required when opType is hierarchical |
| intentionDomainCode | string | no | Intent library: Local intent library code |
| intentionList | array | no | Intent list. Required when bizType is not attitude |
| opType | string | no | Operation type |
| recommend | string | no | Recommend intent |

### Run an agent. This API supports both streaming and non-streaming responses
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/run-agent` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | Workspace ID |
| botId | string | yes | Agent ID |
| modelId | string | no | Model ID. Optional. If empty, the agent uses the model from its configuration |
| stream | string | no | Enable streaming. Default is true |
| threadId | string | no | Thread ID. Optional. If empty, a new thread starts |
| useDraft | string | no | Use the draft version. Drafts are unpublished versions in the editor. They are unstable. Default is false |
| userContent | string | yes | User input |
| userInputs | object | no | More complex user-defined input parameters |
| versionId | string | no | Version ID to run |

### Generates chat responses. You can select a model for the conversation and choose streaming or non-streaming…
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/run-chat-result-generation` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | Path parameter. The workspace ID |
| inferenceParameters | object | no | Hyperparameters used for inference |
| messages | array | yes | Messages to input into the model |
| modelId | string | yes | The model service type. Get this value from the /api/app/config API endpoint in the llmHelperTypeList field |
| sessionId | string | no | Session ID. Use this to mark a conversation |
| stream | string | no | Streaming mode. Set to true for streaming responses. Set to false for full responses. Default is false |
| tools | array | no | Tool information. Specify a list of tools the model can call. When multiple tools are provided, the model selects one to generate a response |

### Retrieves session analysis results through a streaming API
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/run-dialog-analysis` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | The workspace ID |
| sessionId | string | yes | The session ID |

### Generates a chat response from a document library. You can ask questions in natural language, and the system…
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/run-library-chat-generation` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | The ID of the workspace |
| docIdList | array | no | A list of document IDs |
| enableFollowUp | string | no | Specifies whether to enable multi-turn enhancement |
| enableMultiQuery | string | no | Specifies whether to enable query splitting |
| enableOpenQa | string | no | Specifies whether to enable openQA |
| followUpLlm | string | no | The Large Language Model (LLM) used for multi-turn query enhancement |
| libraryId | string | yes | The ID of the document library |
| llmType | string | yes | The type of the LLM |
| multiQueryLlm | string | no | The LLM used for query splitting |
| query | string | yes | The query entered by the user |
| queryCriteria | object | no | The property filter |
| rerankType | string | no | The type of the sort policy. Valid values: \`linear\` and \`model\`. \`linear\`: rule-based sorting. \`model\`: model-based sorting (LLM) |
| sessionId | string | no | The session ID |
| stream | string | no | Specifies whether to use streaming or non-streaming mode |
| subQueryList | array | no | A list of subqueries |
| textSearchParameter | object | no | Search engine parameters: text search parameters |
| topK | integer | no | The final number of retrieved corpus entries |
| vectorSearchParameter | object | no | Search engine parameters: vector search parameters |
| withDocumentReference | string | no | Specifies whether to return document references |

### Submit a list of questions and retrieve results by calling the `GetChatQuestionResp` API
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/submit-chat-question` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | Workspace ID |
| gmtService | string | yes | Current time |
| liveScriptContent | string | yes | Live channel script |
| openSmallTalk | string | no | Enable small talk. Default is true |
| questionList | array | yes | Question list |
| requestId | string | yes | Request ID |
| sessionId | string | yes | Session ID |

### Updates the title, metadata, and other information of a document
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/update-document` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | The workspace ID |
| docId | string | yes | The document ID |
| libraryId | string | yes | The document library ID |
| meta | object | no | The document metadata |
| title | string | no | The document title |

### Update the text content of a document chunk in a document
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/update-document-chunk` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | Workspace ID |
| chunks | array | yes | List of document chunks |
| libraryId | string | yes | Library ID |

### Updates a document library. You can update the library name, description, and index configuration
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/update-library` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | Workspace ID |
| description | string | no | Document library description |
| indexSetting | object | no | Document library index configuration |
| libraryId | string | yes | Document library ID |
| libraryName | string | no | Document library name |

### Updates a Q&A library. After the update, use the GenDocQaResult API to parse the Q&A pairs
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/update-qa-library` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | The workspace ID |
| parseQaResults | array | yes | A list of parsed Q\&A pair results |
| qaLibraryId | string | no | The ID of the Q\&A library |
| requestId | string | yes | The request ID |

### Upload a document to a document library. The system parses the document, splits it into chunks, and builds…
`POST https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/upload-document` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |
| workspaceId | string | yes | Path parameter. The workspace ID |
| data | string | no | File metadata. You can use this to filter results during retrieval |
| fileName | string | yes | The full file name, including the extension. Supported formats are PDF, DOC, DOCX, Markdown, PPT, and PPTX. File size must not exceed 100… |
| fileUrl | string | yes | The OSS URL of the file. If the file is not publicly readable, include a signature in the URL. If you use the SDK to upload files, upload… |
| libraryId | string | yes | The document library ID |

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | no | Regional endpoint, for example https://dianjin.cn-beijing.aliyuncs.com |

## Example
```
curl "https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/create-annual-doc-summary-task" \
  -H "x-api-key: $APIZIE_KEY" \
  -H "x-upstream-key: $PROVIDER_KEY"
```

## FAQ

### How do I call the Alibaba Cloud DianJin API?
Create a free Apizie key, then send POST https://zieapi.vercel.app/v1/cloud:aliyun-dianjin/create-annual-doc-summary-task with the header x-api-key. Every endpoint returns { project, data, timestamp }.

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

### Can AI agents use the Alibaba Cloud DianJin 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-dianjin.

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