SubmitSmarttagJob

Updated at:

Submits a smart tagging job.

Operation description

  • When you call this operation to submit a smart tagging job, you must first configure the analysis type by using a template. For more information, see Add a template.

  • The smart tagging feature is available only in the China (Beijing), China (Shanghai), and China (Hangzhou) regions.

  • This operation is an asynchronous operation. After you submit a job, a job ID is returned. The job is not completed at this time and is queued for asynchronous execution in the background. The final result is sent by using a callback notification. You can also call the Query smart tagging jobs operation to query the job status.

  • The default concurrency of a smart tagging MPS queue is 2. If you require a higher concurrency, submit a ticket to contact Alibaba Cloud technical support for evaluation and configuration.

  • Smart tagging jobs and related results are retained for 180 days and are automatically cleared after this period.

QPS limits

The queries per second (QPS) limit for a single user calling this operation is 100. If the limit is exceeded, API calls are throttled, which may affect your business. Call the operation at a reasonable frequency. For more information, see QPS limits.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

mts:SubmitSmarttagJob

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

PipelineId

string

Yes

The ID of the MPS queue, which is used to differentiate business scenarios and bind message notifications. You can obtain the ID by choosing MPS Console > Global Settings > MPS Queues. You can leave this parameter empty or set it to a space to use the default MPS queue. The default concurrency of the default MPS queue is 10. To increase the concurrency, submit a ticket.

Note

MPS queues can only be created in the background. For related query and update operations, see Update an MPS queue.

2

Title

string

Yes

The title of the video. The title supports Chinese characters, English letters, digits, and hyphens (-). It cannot start with a special character and cannot exceed 256 bytes in length.

example-title-****

Content

string

No

The description of the video content. The description supports Chinese characters, English letters, digits, and hyphens (-). It cannot start with a special character and cannot exceed 1 KB in length.

example content ****

ContentType

string

No

[Deprecated]

application/zip

ContentAddr

string

No

[Deprecated]

http://exampleBucket.oss-cn-shanghai.aliyuncs.com/mps-test/ai-tag.mp4

Params

string

No

The additional request parameters, which are represented as a JSON string. Example: {"needAsrData":true, "needOcrData":false}. Field descriptions:

  • needAsrData: a Boolean value that specifies whether to include the original automatic speech recognition (ASR) result in the analysis result. Default value: false. Valid values: true.

  • needOcrData: a Boolean value that specifies whether to include the original optical character recognition (OCR) result in the analysis result. Default value: false. Valid values: true.

  • needMetaData: a Boolean value that specifies whether to include metadata in the analysis result. Default value: false. Valid values: true.

  • nlpParams: a JSON object that specifies the input parameters of the natural language processing (NLP) operator. Default value: empty (the NLP operator is not used). For more information, see the supplementary description of request parameters.

{"needAsrData":true, "needOcrData":false, "nlpParams":{"sourceLanguage":"cn"}}

NotifyUrl

string

No

The callback URL. Only HTTP and HTTPS URLs are supported.

https://example.com/endpoint/aliyun/ai?id=76401125000***

UserData

string

No

The custom data that is passed through in the callback notification. The data cannot exceed 1 KB in length.

{"key":"value"}

Input

string

No

The URL of the video or image file to be analyzed. Image files in the JPG, JPEG, and PNG formats are supported and verified by file name extension. The input for the smart tagging operation supports OSS URLs, HTTP URLs, and ApsaraVideo VOD media asset URLs.

Note

Make sure that the file name is correct and the bucket where the file is stored is in the same region as the region where the operation is called. Otherwise, the file may not be found or the operation call may fail.

  • OSS URL: oss://[Bucket name]/[File path]. Example: oss://[example-bucket-****]/[object_path-****].

  • HTTP URL: a publicly downloadable URL. Example: http://example-test-****.mp4.

  • ApsaraVideo VOD media asset URL: vod://[MediaId of the VOD media asset]. Example: vod://MediaId.

Examples:

  • oss://mybucket-****/example-****.mp4

  • oss://testbucket-****/videos-****/1-****.mp4

  • http://example-label-****.oss-cn-beijing.aliyuncs.com/example-****.mp4

  • vod://181d739404a3419ba1c22b957ad2****

Note

The region of the OSS bucket must be the same as the region where the API operation is called. Media Processing Service (MPS) does not charge data transfer fees for pulling videos or images from your bucket.

oss://mybucket-****/example-****.mp4

TemplateId

string

No

The ID of the template, which is used to specify the analysis algorithm. Related operations: see Add a template, Query templates, Update a template, and Delete a template.

You can also use public templates:

  • NLP analysis: public-nlp

39f8e0bc005e4f309379701645f4****

Priority

string

No

The priority of the job in its corresponding MPS queue. Valid values: 0 to 9. A value of 0 indicates the highest priority, and a value of 9 indicates the lowest priority. Default value: 5.

5

Description of nlpParams

FeatureNameTypeRequiredDescriptionExample value
nlpParamsobjectYesThis parameter contains all parameters related to NLP processing. It is required when the template analysis type includes NLP. Otherwise, the job fails.{"sourceLanguage":"cn"}
TranscriptionsourceLanguagestringYesThe source language model used for transcription. Valid values: cn (Chinese), en (English), yue (Cantonese), and fspk (free speech of Chinese and English)."cn"
diarizationEnabledbooleanNoSpecifies whether to enable the speaker diarization feature. Default value: false.true
speakerCountintegerNoThe speaker diarization parameter. If this parameter is not set, speaker roles are not distinguished. A value of 0 indicates that the number of speakers is unknown. A value of 2 indicates that there are two speakers.2
SummarizationsummarizationEnabledbooleanNoSpecifies whether to enable the summarization feature. If enabled, results such as full-text summaries and speaker summaries can be generated.true
summarizationTypesstringNoThe expected summary types when the summarization feature is enabled. Valid values: Paragraph (full-text summary), Conversational (speaker summary), and QuestionsAnswering (Q&A summary)."Paragraph,Conversational,QuestionsAnswering"
TranslationtranslationEnabledbooleanNoSpecifies whether to enable the translation feature.true
targetLanguagesstringNoThe target language when the translation feature is enabled. Valid values: cn (Chinese), en (English), and ja (Japanese)."en"
Chapter recognitionautoChaptersEnabledbooleanNoSpecifies whether to enable the chapter overview feature. The result includes chapter titles and chapter summaries.true
Meeting assistancemeetingAssistanceEnabledbooleanNoSpecifies whether to enable the meeting assistance feature. The result includes categories, keywords, key sentences, and to-do items. If meetingAssistanceEnabled is set to true but the algorithm type is not specified by using meetingAssistanceTypes, all types are called and returned by default.true
meetingAssistanceTypesstringNoThe expected feature parameter types when the smart feature is enabled. Valid values: Actions (to-do items) and KeyInformation (key information, which includes keywords and key sentences)."Actions,KeyInformation"

Response elements

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The ID of the request.

7B117AF5-2A16-412C-B127-FA6175ED1AD0

JobId

string

The ID of the smart tagging job. Save this ID for use in subsequent API calls.

39f8e0bc005e4f309379701645f4****

Examples

Success response

JSON format

{
  "RequestId": "7B117AF5-2A16-412C-B127-FA6175ED1AD0",
  "JobId": "39f8e0bc005e4f309379701645f4****"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.