Add an analysis template for a DataQ - Smart Tag Service job.
Operation description
This API adds an analysis template that specifies the algorithms used in a DataQ - Smart Tag Service job. Configure parameters as needed to meet your business requirements.
QPS limit
This API supports up to 100 requests per second per user. Exceeding this limit triggers rate limiting, which may affect your business. Use this API responsibly. For more information, see QPS limits.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
mts:AddSmarttagTemplate |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| TemplateName |
string |
Yes |
Custom template name. The string can contain letters and Chinese characters. Maximum length: 120 characters. |
template-example-**** |
| Industry |
string |
Yes |
Industry of the file to analyze. Default value: common (general industry). Select the appropriate industry so the backend can match the best algorithm combination. Valid values:
|
common |
| Scene |
string |
Yes |
Usage scenario of the file to analyze. Select the appropriate scenario so the backend can match the best algorithm combination. Valid values:
|
search |
| AnalyseTypes |
string |
Yes |
Analysis types. You can select multiple types separated by commas (,). Supported types: Note
Make sure your file contains results for the selected analysis types. Otherwise, queries may return empty results. For example, if you select ocr but the uploaded image contains no text, the query returns no results.
The relationship between analysis types and billing items is as follows: Note
Enabling analysis types through this API incurs charges. For pricing details, see Billing items.
|
ocr |
| FaceCategoryIds |
string |
No |
List of face library IDs to use for recognition. You can select multiple IDs separated by commas (,). You can specify system face library IDs and custom face library IDs. System face library IDs include the following:
|
celebrity |
| FaceCustomParamsConfig |
string |
No |
Parameters for facial recognition algorithms, formatted as a JSON string. Currently supports adjusting face detection and recognition thresholds.
|
{ "faceDetThreshold":0.999, "faceRegThreshold":0.9 } |
| ObjectGroupIds |
string |
No |
List of object library IDs to use for recognition. You can select multiple IDs separated by commas (,). You can specify system object library IDs and custom object library IDs. System object library IDs include the following:
|
general,item,weapon,animal |
| LandmarkGroupIds |
string |
No |
List of landmark library IDs to use for recognition. You can select multiple IDs separated by commas (,). You can specify system landmark library IDs and custom landmark library IDs. System landmark library IDs include the following:
|
common |
| IsDefault |
boolean |
No |
Set as the default template. If set to true, this template is used automatically when transcoding if no template is specified. Valid values: true (yes), false (no). Default: false. Each Alibaba Cloud account can have only one default template. Setting another default template returns an error. |
true |
| LabelType |
string |
No |
Annotation type. Supported types:
|
hmi |
| LabelVersion |
string |
No |
Specify the DataQ - Smart Tag Service version. Default: "1.0".
|
1.0 |
| KnowledgeConfig |
string |
No |
In DataQ - Smart Tag Service 2.0 and 2.0-custom modes, specify the knowledge graph fields to return in tag results. For more information about knowledge graph fields, see Knowledge graph fields in DataQ - Smart Tag Service. If KnowledgeConfig is empty, missing, or not a valid JSON string, the following fields are returned by default:
|
{ "movie":"name,alias,chnl,genre", "music":"songName,artistName", "person":"name,gender" } |
| KeywordConfig |
string |
No |
Keyword tag configuration. type specifies part-of-speech categories. You can select multiple categories separated by commas (,). Supported categories:
Note
If KeywordConfig is missing, invalid (not a JSON string), or lacks a valid type field, all keyword types are returned by default. |
"type": "name,location,organization,other" } |
| LabelCustomCategoryIds |
string |
No |
List of custom tag library IDs to use for recognition. You can select multiple IDs separated by commas (,). |
ab***cd,ef***hi |
| LabelCustomParamsConfig |
string |
No |
Additional parameter settings for custom tag libraries. Currently supports only threshold configuration. {"threshold": xxx} |
{"threshold": 0.4} |
| TemplateConfig |
string |
No |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Response parameters. |
||
| RequestId |
string |
Request ID. |
7B117AF5-2A16-412C-B127-FA6175EDAS3Q |
| TemplateId |
string |
Template ID. Save this ID for future API calls. |
05de22f255284c7a8d2aab535dde**** |
Examples
Success response
JSON format
{
"RequestId": "7B117AF5-2A16-412C-B127-FA6175EDAS3Q",
"TemplateId": "05de22f255284c7a8d2aab535dde****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.