SubmitSmarttagJob

更新时间:
复制 MD 格式

Submits a smart tag job.

Operation description

  • Before submitting a smart tag job, you must configure the analysis type in a template. For more information, see Add a template.

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

  • This is an asynchronous API. After you submit a job, the system returns a job ID and queues the job for background processing. The final result is returned through a callback. You can also call the Query a smart tag job operation to check the job status.

  • The default concurrency of a smart tag pipeline is 2. If you require a higher concurrency, submit a ticket to contact Alibaba Cloud customer service for evaluation and configuration.

  • The system retains smart tag jobs and their results for 180 days, after which they are automatically deleted.

QPS limit

The QPS limit for this operation is 100 calls per second per user. Exceeding this limit triggers throttling, which can affect your business. Plan your calls accordingly. For more information, see QPS limit.

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

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

PipelineId

string

Yes

The ID of the pipeline. This ID distinguishes between services and binds notifications. You can obtain the pipeline ID from the MPS console by choosing Global Settings > Pipelines. You can leave this parameter empty to use the default pipeline. The default pipeline supports a concurrency of 10. To increase the concurrency, submit a ticket.

Note

Pipelines can be created only on the backend. To query or update a pipeline, see Update a pipeline.

2

Title

string

Yes

The title of the video. The title can contain Chinese characters, letters, digits, and hyphens (-). It must not start with a special character or exceed 256 bytes in length.

example-title-****

Content

string

No

A description of the video content. The description can contain Chinese characters, letters, digits, and hyphens (-). It must not start with a special character or 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

Additional request parameters specified as a JSON string. Example: {"needAsrData":true, "needOcrData":false}. The following fields are supported:

  • needAsrData: Specifies whether to include the raw Automatic Speech Recognition (ASR) result in the analysis output. Default value: false. Optional value: true.

  • needOcrData: Specifies whether to include the raw Optical Character Recognition (OCR) result in the analysis output. Default value: false. Optional value: true.

  • needMetaData: Specifies whether to include metadata in the analysis output. Default value: false. Optional value: true.

  • nlpParams: Specifies the input parameters for the Natural Language Processing (NLP) operator. The default value is an empty object, which means the NLP operator is not used. For more information, see the supplementary information about 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

Custom data that is passed through in the callback. The data must not exceed 1 KB in length.

{"key":"value"}

Input

string

No

The address of the video or image file to be analyzed. Supports JPG, JPEG, and PNG image formats, verified by file extension. The smart tag API supports Object Storage Service (OSS) URLs, HTTP URLs, and Video on Demand (VoD) media asset URLs as input.

Note

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

  • OSS URL: oss://[bucket name]/[file path], for example, oss://[example-bucket-****]/[object_path-****].

  • HTTP URL: A publicly downloadable address, for example, http://example-test-****.mp4.

  • VoD media asset URL: vod://[VoD media asset ID], for 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 OSS bucket must be in the same region where the API is called. MPS does not charge for traffic when pulling videos or images from your bucket.

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

TemplateId

string

No

The ID of the template specifying the analysis algorithm. For more information about template operations, see Add a template, Query templates, Update templates, and Delete templates.

You can also use the public template:

  • public-nlp for NLP analysis

39f8e0bc005e4f309379701645f4****

Priority

string

No

The job priority in its pipeline. A lower value indicates a higher priority. Valid values: 0 to 9. Default value: 5.

5

nlpParams

FeatureParameterTypeRequiredDescriptionExample
nlpParamsobjectYesContains all NLP-related parameters. Required if the analysis type in the template includes NLP; otherwise, the job fails.{"sourceLanguage":"cn"}
TranscriptionsourceLanguagestringYesThe source language model for transcription. Valid values: cn (Chinese), en (English), yue (Cantonese), and fspk (free-form Chinese and English)."cn"
diarizationEnabledbooleanNoSpecifies whether to enable speaker diarization. Default value: false.true
speakerCountintegerNoThe parameter for speaker diarization. If this parameter is not set, speaker roles are not differentiated. Set to 0 to identify an indefinite number of speakers, or 2 to identify two speakers.2
SummarizationsummarizationEnabledbooleanNoSpecifies whether to enable the summarization feature. If you enable this feature, the system can generate results such as a full-text summary and speaker summaries.true
summarizationTypesstringNoIf summarization is enabled, you must specify the desired summary types: 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 languages for translation. This parameter is required if translation is enabled. Valid values: cn (Chinese), en (English), and ja (Japanese)."en"
Chapter recognitionautoChaptersEnabledbooleanNoSpecifies whether to enable chapter recognition. The results include chapter titles and chapter summaries.true
Meeting assistancemeetingAssistanceEnabledbooleanNoSpecifies whether to enable meeting assistance. The results include categories, keywords, key sentences, and action items. If you set meetingAssistanceEnabled to true without specifying meetingAssistanceTypes, the system processes and returns all types by default.true
meetingAssistanceTypesstringNoIf the meeting assistance feature is enabled, you must specify the desired assistance types. Supported types: Actions (action items) and KeyInformation (key information). Key information includes keywords and key content (key sentences)."Actions,KeyInformation"

Response elements

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The request ID.

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

JobId

string

The smart tag job ID. Save this ID for 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.