创建模板
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | CreateTemplate | 系统规定参数。取值:CreateTemplate。 |
Content | String | 是 | {“industry”:2,”useScene”:1,”dimensionality”:{“image”:true,”text”:true,”audio”:true},”labels”:{“videoClassification”:true,”shows”:true,”role”:true,”objectRecognition”:true,”tvstation”:true,”organization”:true,”action”:true,”landmark”:true,”scene”:true,”personRecognition”:{“userFaceLibrary”: [{“id”: 521, “name”: “xxxx人物库”}],”publicFaceLibrary”:[{“id”:-3,”name”:”faceDatabase.famousPerson”},{“id”:-1,”name”:”faceDatabase.politician”},{“id”:-2,”name”:”faceDatabase.sensitivePerson”}]}},”words”:[]} | 模板内容 dimensionality: 对应管控台的图像(image),文字(text),语音(audio), 开启text会启用OCR算法,开启audio会启用ASR算法,开启text或audio会启用NLP算法。 Industry: 对应管控台的的新闻(1),短视频(2),泛娱乐(3),教育(4), 体育(5),电商(6),其他(7) useScene: 通用场景(1), 审核场景(2) 分析类型:
|
IsDefault | Boolean | 是 | true | 是否默认模板(true 是 false 否) |
TemplateName | String | 是 | test | 模板名称 |
Type | Integer | 是 | 1 | 模板类型(1.LABEL) |
RegionId | String | 否 | cn-beijing | 区域 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
RequestId | String | 85BCA38F-63DF-4CED-ADD3-75A3A55BBBD1 | 请求id |
TemplateId | String | 172 | 模板id |
示例
请求示例
http(s)://[Endpoint]/?Action=CreateTemplate&Content=331&IsDefault=true&TemplateName=fr&Type=1&<公共请求参数>
正常返回示例
XML
格式
<RequestId>85BCA38F-63DF-4CED-ADD3-75A3A55BBBD1</RequestId><TemplateId>172</TemplateId>
JSON
格式
{“RequestId”:”85BCA38F-63DF-4CED-ADD3-75A3A55BBBD1”,”TemplateId”:”172”}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
200 | OK | Success | 成功 |
500 | InternalError | An error occurred while processing your request. | 内部错误 |
404 | InvalidApiNotFound | The specified API operation does not exist. Please check the URL and method. | API不存在,请检查url和method |
400 | InvalidParameter | The specified parameter %s is invalid. | 参数非法,请检查参数%s |
400 | InvalidTimeStamp | The specified TimeStamp is invalid. Please check parameter %s. | 时间格式非法,请检查参数%s |
400 | MissingParameter | You must specify the parameter %s. | 缺少必要参数,请检查参数%s是否正确 |
404 | ResourceNotFound | The requested resource does not exist. Please check the parameter %s. | 请求资源不存在,请检查参数%s是否正确 |
500 | ServiceUnavailable | An error occurred while processing your request. | 内部服务不可用 |
500 | UnknownError | An error occurred while processing your request. | 未知错误 |
401 | Unauthorized | You are not authorized to perform the operation. | 该用户没有权限 |
406 | ServiceNotSelected | The service is not activated. | 未开启此服务 |
401 | ServiceNotOpened | You have not purchased the service. | 未购买此服务 |
401 | BalanceNotEnough | The account balance is insufficient and you cannot perform the request. | 余额不足,无法操作此请求 |
406 | FaceImageCountLimit | The maximum number of face images is exceeded. | 人脸数量达到限制 |
406 | ApplicationCountLimit | The maximum number of applications is exceeded. | 应用数量达到限制 |
406 | FileUploadCountLimit | The maximum number of file upload is exceeded. | 上传文件数量达到限制 |
406 | FileContentInvalid | The specified file content is invalid. | 文件内容格式不正确 |
406 | ExistParameter | The specified parameter %s exists. | 参数%s已存在 |
406 | ExistTemplateRelationship | The associated template already exists. | 存在关联模板 |
400 | InvalidParameterLengthLimit | The maximum length of %s is exceeded. | 字段%s最大长度限制 |
访问错误中心查看更多错误码。
</article>
</main>
在文档使用中是否遇到以下问题
更多建议
匿名提交