Extract keywords
POST
/ai-doc/keywordsRequest URL
text
POST https://open-api.habitaxx.com/v1/ms-ai-fast/ai-doc/keywordsRequest headers
http
Authorization: Bearer <ACCESS_TOKEN>
Content-Type: application/jsonRequest body
json
{
"session_id": "<SESSION_ID>",
"pet_profile_id": 44,
"content": "The cat vomited three times today and seems less active."
}Request fields
| Field | Type | Required | Description |
|---|---|---|---|
session_id | string | Yes | Session ID, maximum 64 characters. |
content | string | Yes | Current user input. |
pet_profile_id | integer | No | Pet-profile ID; when provided, it must match the session. |
lang | string | No | When provided, it must match the session language. |
Response example
json
{
"code": 200,
"message": "success",
"data": {
"session_id": "<SESSION_ID>",
"data": {
"keyword": "猫咪今日呕吐两次",
"unit": "消化内科"
},
"raw_content": "{\n \"unit\": \"消化内科\",\n \"keyword\": \"猫咪今日呕吐两次\"\n}",
"gateway_request_id": "<REQUEST_ID>"
}
}Response fields
Paths below are relative to the response data; data.xxx refers to a field of the nested inner data object. The inner content comes from the model, so no fields beyond this table are guaranteed.
| Field | Type | Description |
|---|---|---|
session_id | string | Current session ID. |
data.keyword | string | Keyword summary of the chief complaint, at most 15 Chinese characters (e.g. 猫咪今日呕吐两次). When the input is unrelated to pet health the model returns the fixed sentence 是XX。可能与猫狗医疗无关。 |
data.unit | string | Suggested department: the model must pick exactly one of these 24 values — 心脏内科、呼吸内科、消化内科、内分泌内科、肾内科、神经内科、传染内科、普通外科、骨科、神经外科、泌尿外科、皮肤科、眼科、耳鼻喉科、牙科、肿瘤科、行为科、营养科、产科、生殖科、急诊科、运动医学科、预防科、未知病情 (未知病情 when the input is unrelated to pet health). |
raw_content | string/null | Raw model output, usually the same object as JSON text. Troubleshooting only. |
gateway_request_id | string/null | Gateway request ID. |
In practice raw_content is often the same JSON wrapped in a markdown code fence (three backticks plus json); strip that wrapper before parsing.
data is the model's structured output; no fields beyond the table are guaranteed.