AI MediaKit
参数 | 类型 | 是否必选 | 示例值 | 描述 |
Authorization | String | 是 | Bearer {Your_API_Key} |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
image_url | String | 是 | https://example.com/source.jpg | 待打码的图像 URL。
|
blur_shape | String | 否 | circle | 人脸模糊区域的形状。
|
mosaic_step | Integer | 否 | 12 | 马赛克像素格大小,单位 px,正整数。值越大马赛克颗粒越大、脱敏强度越高。建议范围 [5, 100],默认 12。 |
face_detect_thresh | Number | 否 | 0.9 | 人脸检测置信度阈值,取值范围 (0, 1)。值越高过滤越严格:过低可能误判非人脸区域,过高可能漏检人脸。默认 0.9。 |
output_format | String | 否 | webp | 输出图片格式。可选值:
|
参数 | 类型 | 描述 |
success | Boolean | 任务是否成功。
|
result | Object | 包含图像处理结果的对象,仅在 success 为 true 时返回。详见下文 Result 对象。 |
error | Object | 错误详情对象,仅在 success 为 false 时返回。详见下文 Error 对象。 |
task_id | String | 任务的唯一标识。 |
task_type | String | 任务类型。 |
request_id | String | 本次 API 请求的唯一标识,可用于问题排查。 |
expires_at | Integer | 任务结果的过期时间戳(Unix Time,单位:秒)。仅当任务成功且有结果时返回。 |
queue_id | String | 任务提交的目标队列 ID。 |
参数 | 类型 | 描述 |
image_url | String | 人脸打码后的图片文件下载地址。该地址的有效期为 24 小时,请务必及时保存产物。 |
image_size | Integer | 处理后图片大小,单位字节。 |
image_format | String | 处理后图片格式。 |
image_width | Integer | 处理后图片宽度,单位 px。 |
image_height | Integer | 处理后图片高度,单位 px。 |
face_count | Integer | 检测到并已打码的人脸数量。0 表示未检测到人脸、原图未做处理;大于 0 表示已对对应数量人脸完成打码。 |
face_location | Array |
参数 | 类型 | 描述 |
top_left_x | Integer | 人脸检测框左上角横坐标,单位 px。 |
top_left_y | Integer | 人脸检测框左上角纵坐标,单位 px。 |
bottom_right_x | Integer | 人脸检测框右下角横坐标,单位 px。 |
bottom_right_y | Integer | 人脸检测框右下角纵坐标,单位 px。 |
confidence | Number | 人脸检测置信度,取值范围 (0, 1)。 |
参数 | 类型 | 描述 |
code | String | |
type | String | 错误的宏观类型。例如:BadRequest。 |
message | String | 对错误的详细描述,可用于开发调试。 |