All Products
Search
Document Center

Intelligent Media Services:GetSmartHandleJob

Last Updated:Dec 16, 2024

Queries the information about an intelligent job and the execution results of the job based the job ID. You can call this operation to query only intelligent jobs created within the past year.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ice:GetSmartHandleJob
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
JobIdstringNo

The job ID.

****20b48fb04483915d4f2cd8ac****

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

******11-DB8D-4A9A-875B-275798******
JobIdstring

The job ID.

****20b48fb04483915d4f2cd8ac****
Outputstring

The job results.

{}
JobResultobject

The job results.

MediaIdstring

The ID of the media asset.

****20b48fb04483915d4f2cd8ac****
AiResultstring

The AI analysis result.

Intelligent segmentation or tagging information
Usagestring

The token usage. This parameter is returned only for keyword-based text generation jobs.

{"total_tokens":100}
Statestring

The job state.

Valid values:

  • Finished
  • Failed
  • Executing
  • Created
Finished
UserDatastring

The user-defined data in the JSON format.

{"user":"data"}
SmartJobInfoobject

The information about the intelligent job.

Titlestring

The job title.

Descriptionstring

The job description.

UserIdstring

The user ID.

1974526429******
InputConfigobject

The input configurations.

InputFilestring

The OSS URL or the ID of the material in the media asset library.

OutputConfigobject

The output configurations.

Bucketstring

The OSS bucket.

test-bucket
Objectstring

The OSS object.

test-object
CreateTimestring

The time when the job was created.

2020-12-26T04:11:10Z
ModifiedTimestring

The time when the job was last modified.

2020-12-26T04:11:10Z
JobTypestring

The job type.

ASR

Each type of intelligent job returns results in different formats. The following examples are execution results for various intelligent jobs.

ASR-based intelligent subtitle job

{
  "RequestId": "******2D-443C-5043-B0E4-867070******",
  "JobId": "******042d5e4db6866f6289d1******",
  "State": "Finished",
  "SmartJobInfo": {
    "JobType": "ASR",
    "ModifiedTime": "2022-01-21T06:15:08Z",
    "CreateTime": "2022-01-21T06:15:02Z",
    "Title": "default_title_2022-01-21T06:15:02Z",
    "InputConfig": {
      "JobParameters": "{\"duration\":\"00:30:00\",\"start_time\":\"00:00:00\",\"request_params\":\"&enable_word_level_result=true\"}",
      "InputFile": "oss://your-bucket.oss-cn-shanghai.aliyuncs.com/your-video.mp4"
    }
  },
  "JobResult": {
    "AiResult": "[{\"content\":\"Talking about\",\"from\":0.0,\"to\":0.846},{\"content\":\"he is now incredibly popular\",\"from\":0.846,\"to\":3.386},{\"content\":\"Although ticket prices are high\",\"from\":3.386,\"to\":4.402},{\"content\":\"his shows often sell out instantly\",\"from\":4.402,\"to\":6.265},{\"content\":\"In addition, he frequently appears on various comedy programs, where he judges performances by new comedians\",\"from\":6.265,\"to\":10.33}]"
  }
}

Intelligent audio production job

{
  "RequestId": "******2D-443C-5043-B0E4-867070******",
  "JobId": "******042d5e4db6866f6289d1******",
  "State": "Finished",
  "SmartJobInfo": {
    "Title": "default_title_2022-01-21T06:15:07Z",
    "JobType": "TextToSpeech",
    "CreateTime": "2022-01-21T06:15:07Z",
    "ModifiedTime": "2022-01-21T06:15:07Z",
    "InputConfig": {
      "InputFile": "Talking about Guo Degang, he is now incredibly popular. Although ticket prices are high, his shows often sell out instantly. In addition, he frequently appears on various comedy programs, where he judges performances by new comedians."
    },
    "EditingConfig": "{\"format\":\"MP3\",\"pitch_rate\":0,\"sample_rate\":16000,\"speech_rate\":0,\"voice\":\"Siqi\",\"volume\":50}",
    "OutputConfig": {
      "Bucket": "your-bucket",
      "Object": "your-audio"
    }
  },
  "JobResult": {
    "MediaId": "******bf47c94e82b3b2014361******",
    "AiResult": "[{\"content\":\"Talking about\",\"from\":0.0,\"to\":0.846},{\"content\":\"he is now incredibly popular\",\"from\":0.846,\"to\":3.386},{\"content\":\"Although ticket prices are high\",\"from\":3.386,\"to\":4.402},{\"content\":\"his shows often sell out instantly\",\"from\":4.402,\"to\":6.265},{\"content\":\"In addition, he frequently appears on various comedy programs, where he judges performances by new comedians\",\"from\":6.265,\"to\":10.33}]"
  }
}

Keyword-based text generation job

{
	"RequestId":"******AC-5A01-1116-87A4-BF86F2******",
	"UserData":"{\"NotifyAddress\":\"https://****\"}",
	"JobResult":{
		"AiResult":"[\"Our new cake shop uses pure dairy cream, offering a mellow and silky smooth taste. Every bite is a sweet surprise, making your taste buds dance with freshness and purity. \",\"Explore a new world of desserts at our new cake shop. Our cakes are made with high-quality dairy cream. The flavor is subtly sweet but not overwhelming, with layers of richness. Each cake tells a sweet story of craftsmanship, waiting for you to savor. \",\"For those who appreciate the fine things in life, our new cake shop uses premium dairy cream, free from artificial additives. The pure and fragrant milk flavor is light and airy, with each bite offering a unique celebration of pleasures in life. \"]",
    "Usage": "{\"total_tokens\":200}"
	},
	"State":"Finished",
	"JobId":"******8c784f461db57c99c9d9******",
	"SmartJobInfo":{
		"JobType":"TextGenerate",
		"ModifiedTime":"2024-01-17T08:46:17Z",
		"CreateTime":"2024-01-17T08:46:17Z",
		"Title":"default_title_2024-01-17T08:46:17Z",
		"EditingConfig":"{\"Type\":\"MarketingCopy\",\"GenerateConfig\":\"{\\\"keywords\\\":\\\"New cake shop, dairy cream\\\",\\\"textLength\\\":100,\\\"targetCount\\\":3}\"}"
	}
}

Examples

Sample success responses

JSONformat

{
  "RequestId": "******11-DB8D-4A9A-875B-275798******",
  "JobId": "****20b48fb04483915d4f2cd8ac****",
  "Output": "{}",
  "JobResult": {
    "MediaId": "****20b48fb04483915d4f2cd8ac****",
    "AiResult": "Intelligent segmentation or tagging information\n",
    "Usage": "{\"total_tokens\":100}"
  },
  "State": "Finished",
  "UserData": "{\"user\":\"data\"}",
  "SmartJobInfo": {
    "Title": "",
    "Description": "",
    "UserId": "1974526429******",
    "InputConfig": {
      "InputFile": ""
    },
    "OutputConfig": {
      "Bucket": "test-bucket",
      "Object": "test-object"
    },
    "CreateTime": "2020-12-26T04:11:10Z",
    "ModifiedTime": "2020-12-26T04:11:10Z",
    "JobType": "ASR"
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-02-27The response structure of the API has changedView Change Details
2023-10-07The internal configuration of the API is changed, but the call is not affectedView Change Details
2023-03-01The response structure of the API has changedView Change Details