GetTask - Query the status and result of a general service insight task

Updated at:

Queries the status and result of a general service insight task.

Endpoint

https://dashscope.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation

Request method

POST

Request headers

Authorization: Bearer {api-key} // Replace {api-key} with your actual API key.
Content-Type: application/json

Request parameters

Name

Type

Required

Description

Example

model

string

Yes

The business type. The value is fixed to tingwu-service-insights.

tingwu-service-insights

input

object

Yes

Provide the relevant business parameters.

input.task

string

Yes

The task type. The value is fixed to getTask, which indicates that you want to get the task result.

getTask

input.dataId

string

Yes

The ID of the audio task to query. Obtain this ID from the response parameters of the createTask task.

wkb***

Response parameters

Name

Type

Description

Example/Parsing protocol

code

string

The error code.

message

string

The error message.

request_id

string

The request ID.

f97ee37d-0f9c-9b93-b6bf-bd263a232bf9

usage

object

The usage.

output

object

The business response body.

output.status

string

The task status:

  • 0: Succeeded

  • 1: In progress

  • 2: Failed

0

output.errorCode

string

The error code returned if the task is submitted but fails to execute (when status is 2).

TSC.FileError

output.errorMessage

string

The error message returned if the task is submitted but fails to execute (when status is 2).

"File cannot be read."

output.transcriptionPath

string

The OSS URL of the speech-to-text result. For more information, see Parsing protocol for output.transcriptionPath.

For the parsing protocol of the file content corresponding to the OSS URL, see:

output.generalServiceInsightsPath

string

The OSS URL of the insight result. For more information, see Parsing protocol for output.generalServiceInsightsPath.

output.generalSaleInsightsPath

string

The OSS URL of the analysis result. For more information, see

Parsing protocol for output.generalSaleInsightsPath.

Parsing protocol for output.transcriptionPath

The top-level element is an object. The fields are described as follows:

Name

Type

Description

Example

paragraphs

Array

A list of paragraphs.

paragraphs[i].paragraphId

String

The paragraph ID.

16987422100275*****

paragraphs[i].speakerId

String

The speaker ID.

1

paragraphs[i].words

Array

A list of words.

paragraphs[i].words[i].id

Integer

The word ID.

10

paragraphs[i].words[i].sentenceId

Integer

The sentence ID.

1

paragraphs[i].words[i].start

Integer

The start time in milliseconds.

4970

paragraphs[i].words[i].end

Integer

The end time in milliseconds.

5560

paragraphs[i].words[i].text

String

The word text.

I am

The following is a JSON example:

{
  "paragraphs": [
    {
      "paragraphId": "16987422100275*******",
      "speakerId": "1",
      "words": [
        {
          "id": 10,
          "sentenceId": 1,
          "start": 4970,
          "end": 5560,
          "text": "Hello,"
        },
        {
          "id": 20,
          "sentenceId": 1,
          "start": 5730,
          "end": 6176,
          "text": "I am"
        }
      ]
    }
  ]
}

Parsing protocol for output.generalServiceInsightsPath

The top-level element is an object. The fields are described as follows:

Name

Type

Description

Example value

generalServiceInsights[i].title

string

The name of the service quality inspection result. This corresponds to the serviceInsights.InsightsContents[i].title in the request parameters.

Store arrival greeting - Welcome message

generalServiceInsights[i].matched

boolean

Indicates whether this service quality inspection item is hit.

true

generalServiceInsights[i].remarks

string

The analysis of this inspection item by the large model.

The sales representative started the conversation with a question, showing some greeting intent.

generalServiceInsights[i].score

string

The final score of this insight item:

  • If matched: The score is set to the value specified by the user.

  • If not matched: The score is set to zero.

20

generalServiceInsights[i].matchedSentenceIds

list[]

The sentence IDs in the original conversation that hit this inspection item.

[1, 2, 3]

The following is a JSON example:

"generalServiceInsights": [
    {
        "title": "Store arrival greeting - Welcome message",
        "matched": true,
        "remarks": "The sales representative started the conversation with a question, showing some greeting intent.",
        "matchedSentenceIds": [1, 3, 5]
    },
    {
        "title": "Store departure farewell - Customer information retention",
        "matched": true,
        "remarks": "The sales representative suggested adding on WeChat for future contact.",
        "matchedSentenceIds": [2, 4]
    },
    {
        "title": "Store arrival greeting - Beverage offer",
        "matched": false,
        "remarks": "No information about offering a beverage was mentioned in the conversation.",
        "matchedSentenceIds": []
    }
]

Parsing protocol for output.generalSaleInsightsPath

The top-level element is an object. The fields are described as follows:

Name

Type

Description

Example

missedSum

int

The number of insight items that were not hit.

5

matchedSum

int

The number of insight items that were hit.

10

The following is a JSON example:

"generalSaleInsights": {
  "missedSum": 20,
  "matchedSum": 2
}

Request example

Replace "sk-***" in the Authorization header with your Alibaba Cloud Model Studio API key.

curl --location 'https://dashscope.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation' \
--header 'Authorization: Bearer sk-***' \
--header 'Content-Type: application/json' \
--data '{
  "model": "tingwu-service-insights",
  "input": {
    "dataId": "***",
    "task": "getTask"
  }
}'

Response example

{
    "output": {
        "generalServiceInsightsPath": "https://***.oss-cn-hangzhou.aliyuncs.com/agentic/prepub/CommonDataField/servInspec/1627865205776705/llm-3cx2a3o4n8y45iee/2025/07/11/***?Expires=1752299850&OSSAccessKeyId=YOUR_ACCESS_KEY_ID&Signature=YOUR_SIGNATURE",
        "generalSaleInsightsPath": "https://***.oss-cn-hangzhou.aliyuncs.com/agentic/prepub/CommonDataField/saleInspec/1627865205776705/llm-3cx2a3o4n8y45iee/2025/07/11/***?Expires=1752299850&OSSAccessKeyId=YOUR_ACCESS_KEY_ID&Signature=YOUR_SIGNATURE",
        "status": 0,
        "transcriptionPath": "https://***.oss-cn-hangzhou.aliyuncs.com/agentic/prepub/CommonDataField/transcription/1627865205776705/llm-3cx2a3o4n8y45iee/2025/07/11/***?Expires=1752299850&OSSAccessKeyId=YOUR_ACCESS_KEY_ID&Signature=YOUR_SIGNATURE"
    },
    "usage": {},
    "request_id": "fccef963-ebb4-98f2-9c2b-6bd9f1b9b094"
}