OpenAPI Integration
Base URL:https://app.duix.ai/
1. Prerequisites
Generate Signature and Obtain Token
When integrating with the duix-openapi-v2 platform, you must generate access tokens in your own backend.Refer to the token guide for implementation details:
How to Get Token
2. Management Interfaces
All management endpoints require a valid token in the HTTP request header.Interaction Flow

2.1 Get App Real-Time Concurrency
Endpoint:/duix-openapi-v2/sdk/v2/getconcurrentNumberMethod:
GETDescription: Retrieve the real-time concurrency status of an application.
Parameters
| Name | Type | Location | Description |
|---|---|---|---|
| appId | String | Query | Application ID created on the Duix platform |
Response
| Name | Type | Description |
|---|---|---|
| code | String | Response code |
| data | ConcurrentStatus | Concurrency details |
| cropId | String | Corporate ID |
| totalConcurrentNumber | integer | Total concurrent sessions |
| userConcurrentNumber | integer | User-specific concurrent sessions |
| message | String | Response message |
| success | boolean | Request status |
Example Response
Get app real-time sessions
Endpoint
/duix-openapi-v2/sdk/v2/getconcurrentListRequest Method: GET
Description
Retrieve a list of all active (in-call) sessions for an app.
Parameters
| Parameter Name | Type | Pass Method | Parameter Description |
|---|---|---|---|
| appId | String | Query | APPID created on the Duix platform |
Close all sessions for an app
Endpoint
/duix-openapi-v2/sdk/v2/distroyCallSessionsByAppIdRequest Method: GET
Description
Terminate all active sessions for a specific app.
Parameters
| Parameter Name | Type | Pass Method | Parameter Description |
|---|---|---|---|
| appId | String | Query | APPID created on the Duix platform |
Example Response
Close a specific session
Endpoint
/duix-openapi-v2/sdk/v2/sessionStopRequest Method: GET
Parameters
| Parameter Name | Type | Pass Method | Parameter Description |
|---|---|---|---|
| uuid | String | Query | sessionId returned in the start-complete event |
Third-Party Dialog Integration (Non-Streaming)
Integrate your own dialog system with Duix using a webhook-based POST approach.The Duix platform will send user questions to your defined remote URL and expect a structured JSON response.

Example:
Refer to the open-source demo for a simple integration reference.
Request
The Duix platform sends each user question as aPOST request to your remote endpoint using the format below.
Request Parameters
| Field | Type | Description | Required |
|---|---|---|---|
| sid | String | User ID generated during account creation (visible in account info). | Y |
| dh-code | String | Digital human code, unique per digital human (viewable in the avatar overview). | Y |
| dh-question | String | The user’s question text. | Y |
| dh-conversation-id | String | Conversation ID — unique identifier for the session. | Y |
| dh-context | String | Conversation context, formatted as a stringified JSON object. | N |
| dh-context.q.context | String | Previous user question text (context). | N |
| dh-context.a.context | String | Previous digital human answer text (context). | N |
| uuid | String | Request ID used for tracking and troubleshooting. | N |
Example Request
| Field | Type | Required | Description |
|---|---|---|---|
| code | String | Y | Response status code |
| msg | String | N | Optional success or error message |
| data | object | N | Data payload (see below) |
| success | Boolean | Y | Whether the request succeeded |
| Code | Status | Response |
|---|---|---|
| 200 | OK | Successful response |
| 400 | Bad Request | Invalid body or headers |
| 401 | Unauthorized | Invalid authentication token |
| 403 | Forbidden | Authentication failed |
| 500 | Server Error | Service exception |
| Field | Type | Description | Required |
|---|---|---|---|
| conversationId | String | Conversation ID (matches the dh-conversation-id in the request). | Y |
| question | String | The user’s question. | N |
| answer | String | The digital human’s response, as a stringified JSON object. | Y |
| errorMsg | String | Description of any exception or error | N |
Third-Party Dialog Integration (Streaming)
In streaming mode, Duix delivers incremental responses to your remote endpoint in real time as the digital human speaks.This allows you to display or process partial answers before the full response completes.

Example:
Refer to the open-source demo for a simple streaming integration example.
Request
The Duix platform sends each user question to your remote URL via an HTTPPOST request in the following format.
Parameters
| Field | Type | Description | Required |
|---|---|---|---|
| sid | String | User ID generated during user creation (visible in account information). | Y |
| dh-code | String | Digital human code, unique per digital human (viewable in the avatar overview). | Y |
| dh-question | String | The question text sent by the user. | Y |
| dh-conversation-id | String | Unique identifier for the conversation. | Y |
| dh-context | String | Conversation context as a stringified JSON object. | N |
| dh-context.q.context | String | Previous question text in the conversation context. | N |
| dh-context.a.context | String | Previous answer text in the conversation context. | N |
| uuid | String | Request ID for tracking and debugging purposes. | N |
Example Request
Get Conversation Details
Retrieve detailed configuration and metadata for a specific conversation on the Duix platform.Endpoint
/duix-openapi-v2/sdk/getConversationById?conversationId=[conversation_id]
Method
GET
Description
Query conversation details by providing the conversation ID obtained from the Duix platform.Parameters
| Name | Type | Location | Description |
|---|---|---|---|
| conversationId | String | Query | Unique conversation ID generated by the Duix platform |
Response
| Field | Type | Description |
|---|---|---|
| code | String | Response code |
| data | JSON | Main conversation data |
| detailDto | JSON | Conversation resource details (includes model, background, and TTS configuration) |
| detailDto.backgroundDto | JSON | Background resource details |
| detailDto.modelId | String | Model ID |
| detailDto.modelName | String | Model name |
| detailDto.modelIdType | String | Model type (0 = Cloud Digital Human, 1 = Local Digital Human) |
| detailDto.localModelInfo | JSON | Local digital human information |
| detailDto.backgroundDto.backgroundUrl | String | Background image or video URL |
| scriptDtoList | JSON | Predefined dialog scripts |
| scriptDtoList.scriptType | String | Script type (0: Wake-up Word, 1: Opening Line, 2: Waiting Phrase, 3: Unknown Question, 4: Farewell, 5: Interruption, 6: Interruption Sentence, 7: Guiding Phrase) |
| scriptDtoList.scriptContent | String | Script text |
| scriptDtoList.ttsContent | String | Script audio file URL |
| message | String | Text message returned by the API |
| success | Boolean | Request success flag |
Example Response
Create Avatar
Create an AI avatarEndpoint
/duix-openapi-v2/sdk/v2/createAvatar
Method
POST
Description
This endpoint create an AI avatar.Parameters
| Name | Type | Location | Description | Required |
|---|---|---|---|---|
| ttsName | String | Body | TTS name, select the public TTS voice. See at Settings -> Avatar creator -> Select voice | Y |
| conversationId | String | Body | The conversation ID. Value is required when using public AI avatar Get Conversation ID | N |
| coverImage | String | Body | A value is needed if you are using images to customize your AI avatar. Base64 format, example:data:image/png;base64,iVBORw0KGgoAAAANSUhEUgA… | N |
| defaultSpeakingLanguage | String | Body | Default speaking language. default English | N |
| greetings | String | Body | Enter a greeting for your AI avatar’s first words, If not, the system will generate it randomly | N |
| name | String | Body | The name of AI avatar. If not, the system will generate it randomly | N |
| profile | String | Body | Enter a description of personality and preferences you’d love your AI avatar to have.. If not, the system will generate it randomly | N |
Response
| Field | Type | Description |
|---|---|---|
| code | String | Response code. |
| msg | String | Response message. |
| success | Boolean | Indicates whether the request succeeded. |
| data | JSON | Response payload containing avatar details. |
| data.taskId | String | The task ID of create AI avatar. |
Example Response
Query Avatar
Retrieve information about the creation of an AI avatar using its unique taskId.Endpoint
/duix-openapi-v2/sdk/v2/queryAvatar
Method
GET
Description
This endpoint returns metadata and training status for an AI avatar previously created through the API.Parameters
| Name | Type | Location | Description | Required |
|---|---|---|---|---|
| taskId | Integer | Query | Unique task ID returned by the createAvatar API. | Y |
Response
| Field | Type | Description |
|---|---|---|
| code | String | Response code. |
| msg | String | Response message. |
| success | Boolean | Indicates whether the request succeeded. |
| data | JSON | Response payload containing avatar details. |
| data.name | String | Avatar name. |
| data.modelSceneId | String | The avatar model scene ID. |
| data.conversationId | String | Conversation ID associated with this avatar. |
| data.coverImage | String | The avatar cover image |
| data.status | Integer | Avatar training status (0: training, 1: failed, 2: success). |
| data.processingStep | String | Training progress(preparing, processing, after_processing, done) |