情绪分析
上传宠物照片,分析其面部表情、肢体语言和情绪状态。
POST
/v1/emotion-analysis图片5 每次调用额度
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
image | string | 是 | Base64 编码的图片数据(JPG/PNG/WEBP,最大 4MB) |
animalType | string | 否 | 分析的动物类型(如:dog、cat、rabbit、hamster) |
language | string | 否 | 响应语言代码(en, zh, es) |
API Playground
语言
请求示例
bash
curl -X POST https://www.poomi.pet/api/v1/emotion-analysis \
-H "Authorization: Bearer pk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"image": "base64_encoded_data",
"animalType": "dog",
"language": "en"
}'响应示例
json200 OK
{
"success": true,
"request_id": "req_xxxxxxxx",
"data": {
"emotion": "anxious",
"assessment": "Multiple concurrent stress signals indicate moderate anxiety. Whale eye shows the pet is monitoring a perceived threat while avoiding confrontation. Lip licking here is a self-soothing displacement behavior, not hunger. The partial tail tuck suggests discomfort but not full panic.",
"confidence": 0.78,
"suggestions": [
"Remove the pet from the stressor or remove the stressor",
"Speak in a calm, low tone — avoid high-pitched reassurance",
"Offer a safe retreat space (crate or quiet room)",
"Let the pet approach on its own terms, don't force interaction"
],
"body_language": [
"whale eye (showing whites of eyes)",
"lip licking",
"ears pinned back",
"lowered body posture"
]
}
}