ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
Person - Create a Person 在指定的人物组中创建一个新人物。新创建的人物没有已记录过的脸,您可以调用Person - Add a Person Face API来给他添加人脸。 人物数量有订阅等级限制和人物组级别限制。免费层的订阅每个Person Group限制1,000人,每个订阅共有1,000人。S0层订阅有这些限制:每个Person Group有10,000Persons,总计100M Persons,每个订阅有1M Person Groups。 Http Method Http方法 `POST` Request URL 请求URL `https://api.cognitive.azure.cn/face/v1.0/persongroups/{personGroupId}/persons ` Request parameters Request parameters | 参数名|参数类型 |描述 | | --- | --- | --- | | personGroupId |string | 用来创建人物的指定目标人物组| Request headers | 请求头 |类型 |描述 | | --- | --- | --- | | Content-Type (optional) |string |Media type of the body sent to the API. | | Ocp-Apim-Subscription-Key | string | 提供访问此API的订阅密钥。在您的认知服务帐户中找到. | Request body JSON fields in request body: | Fields | Type | Description | | --- | --- | --- | | name | String | 显示目标人物的名字。最大长度是128 | | userData (可选) | String | 可选,用户提供的附加到一个人物上数据的字段。大小限制是16KB | ~~~ { "name":"Person1", "userData":"User-provided data attached to the person" } ~~~ Response 200 一个成功的调用返回一个新创建的personId | Fields | Type | Description | | --- | --- | --- | | personId | String | 新创建人物的personID | ~~~ { "personId":"25985303-c537-4467-b41d-bdb45cd95ca1" } ~~~ Response 400 Error code and message returned in JSON | Error Code | Error Message Description | | --- | --- | | BadArgument |'name'太长了 | | BadArgument | 'userData'太长了 | | BadArgument | 错误和无法辨认的JSON | ~~~ { "error":{ "code":"BadArgument", "message":"'userData' is too long." } } ~~~ Response 401 | Error Code | Error Message Description | | --- | --- | | Unspecified | 无效的subscription Key 或user/plan 被冻结 | ~~~ { "error":{ "code": "Unspecified", "message": "Access denied due to invalid subscription key. Make sure you are subscribed to an API you are trying to call and provide the right key." } } ~~~ Response 403 人物数量达到订阅级别最大限制或人物组级别最大限制。免费层的订阅每个Person Group限制1,000人,每个订阅共有1,000人。S0层订阅有这些限制:每个Person Group有10,000Persons,总计100M Persons,每个订阅有1M Person Groups。 ~~~ { "error":{ "code":"QuotaExceeded", "message":"Person number reached subscription level limit." } } ~~~ Response 404 Error code and message returned in JSON | Error Code | Error Message Description | | --- | --- | | PersonGroupNotFound | Person group ID无效。有效的格式应该是由数字组成的字符串,英文字母小写,' - ','_',且不超过64个字符 | | PersonGroupNotFound | 找不到person group | ~~~ { "error":{ "code":"PersonGroupNotFound", "message":"Face list 'sample_list' is not found." } } ~~~ Response 409 Error code and message returned in JSON | Error Code | Error Message Description | | --- | --- | | PersonGroupTrainingNotFinished | 该人物组仍在接受培训。训练完成后重试 | | ConcurrentOperationConflict | 资源并发操作冲突 | ~~~ { "error":{ "code":"PersonGroupTrainingNotFinished", "message":"Person group 'sample_group' is under training." } } ~~~ Response 415 不支持的媒体类型错误。只有“application / json”对这个API有效 ~~~ { "error":{ "code":"BadArgument", "message":"Invalid Media Type" } } ~~~ Response 429 ~~~ { "error":{ "statusCode": 429, "message": "Rate limit is exceeded. Try again in 26 seconds." } } ~~~