cURL 请求
POST /api/v1/image/profilecurl -X POST "https://avatarlookup.com/api/v1/image/profile" \
-H "X-API-Key: sk_your_api_key" \
-F "file=@avatar.jpg"接口约定
以 multipart 形式上传一张图片,字段名 file。鉴权使用你的 API Key。
复制下面的 curl 命令,只需将示例 API Key 替换为你自己的 Key。
POST /api/v1/image/profilecurl -X POST "https://avatarlookup.com/api/v1/image/profile" \
-H "X-API-Key: sk_your_api_key" \
-F "file=@avatar.jpg"200 OK{
"code": 0,
"msg": "ok",
"data": {
"product": "image_profile",
"identifier": "img:7013df96c540904a4b7ba295e9162ab2",
"extra": {
"category": "individual portrait",
"gender": "male",
"age": "39",
"skin_color": "white",
"hair_color": "brown"
}
}
}正确使用结果
每次一张,用名为 file 的 multipart 文件字段提交。支持 JPEG、PNG、WebP、GIF,单张不超过 2 MB。整个过程没有手机号也没有邮箱 —— 结果描述的是这张图,不是某个账号。
category 说明这是一张什么图。宠物、卡通、风景、物品同样能识别、同样计费,但结构上不会有年龄和性别 —— 那是结论,不是失败。
图片直接透传给识别服务,不落盘也不进对象存储。identifier 是按图片内容算出的指纹,同一张图恒定,可以拿它在你那侧做去重。
检测内容
identifier · string — 提交图片的指纹,由图片内容算出。同一张图恒定是同一个值。extra.category · string — What the picture is: individual portrait, group photo, game avatar, cartoon avatar, landscape, pet avatar or object.extra.gender · string — male, female or unknown.extra.age · number — Estimated age, accurate to about 3 years and clamped to 0-80. Empty when no gender was determined — there is no placeholder number.extra.skin_color · string — Descriptive skin tone, for example white, east_asian or hispanic. Treat it as an open set.extra.hair_color · string — Descriptive hair colour, for example black, brown, blond or gray white. Treat it as an open set.适用场景
直接答案
图片画像识别 返回 这张图片自身的属性:图片类型、性别、年龄估计、肤色与发色。用名为 file 的 multipart 文件字段向图片端点提交一张图,并在同一次 API 响应里读取 extra 对象。整个过程不涉及任何标识。
能力边界
产品常见问题
在同一次同步响应中返回这张图片自身的属性:图片类型、性别、年龄估计、肤色与发色。
只要返回了结果就扣费,宠物、卡通、风景图也一样。只有完全无法识别的图片不计费。
JPEG、PNG、WebP、GIF,单张不超过 2 MB。类型按文件内容判定,不看扩展名。
不会。图片直接透传给识别服务,不落盘也不进对象存储,检测记录上只留按图片内容算出的指纹。
相关产品