360 Secure SkillHub
360 安全技能中心

appearance score

该 Skill 说明如何以 multipart/form-data 把图片上传到 Synerunify 的外观评分接口,读取返回的 code、message 与 data.faces,按人脸从左到右排序并展示取整后的 score;包含 curl 与 Python requests 调用示例及失败时的处理规则。

qiushosens
qiushosens
热度 36.02
最近更新 2026-05-11 17:36:59
分类:数据依赖:第三方 API / 代码执行 / 读写文件应用场景:API 集成 / 数据处理

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add appearance-score
Metadata
name
appearance-score
description
Multi-face appearance / attractiveness scoring: POST multipart image to Synerunify predict API. Apply when the user asks in English (e.g. face attractiveness score, beauty rating, appearance score for a photo) or Chinese (颜值打分、外观评分、给照片人脸打分).

Appearance scoring (predict)

Endpoint

  • Method: POST
  • URL: https://synerunify.com/api/process/appearance/predict
  • Content-Type: multipart/form-data
  • Field: image (required; image file; use a real image MIME such as image/jpeg)
  • Query: Omit; server defaults apply.

Response JSON

Top level:

  • code: 200 means success
  • message: human-readable status text
  • data: present on success; may be incomplete on failure

Inside data:

  • count: number of scored faces
  • size: { "width", "height" } of the original image in pixels
  • faces: array of items with:
    • region: { x1, y1, x2, y2, width, height } in original-image pixels
    • score: float; you may round for display

On errors or no faces, read message; data.faces may be empty.

Examples

curl

curl -sS -X POST "https://synerunify.com/api/process/appearance/predict" \
  -F "image=@/path/to/photo.jpg"

Python

import requests

url = "https://synerunify.com/api/process/appearance/predict"
with open("photo.jpg", "rb") as f:
    r = requests.post(url, files={"image": ("photo.jpg", f, "image/jpeg")}, timeout=120)
r.raise_for_status()
payload = r.json()
if payload.get("code") != 200:
    raise RuntimeError(payload.get("message", "API error"))
faces = payload["data"]["faces"]
scores = [round(f["score"]) for f in sorted(faces, key=lambda x: x["region"]["x1"])]

Agent rules

  1. Upload only via multipart field image; do not append query params; do not switch to JSON/Base64 unless the API docs explicitly say so.
  2. When multiple faces are present, sort by region.x1 (left-to-right) before reporting scores.
  3. On failure, surface message and the HTTP status first.