Decide whether an image is needed
POST
/ai-doc/if-need-imageRequest URL
text
POST https://open-api.habitaxx.com/v1/ms-ai-fast/ai-doc/if-need-imageRequest headers
http
Authorization: Bearer <ACCESS_TOKEN>
Content-Type: application/jsonRequest body
json
{
"session_id": "<SESSION_ID>",
"pet_profile_id": 44
}Request fields
| Field | Type | Required | Description |
|---|---|---|---|
session_id | string | Yes | The session_id returned when the session was created. |
pet_profile_id | integer | No | Pet-profile ID; when omitted the profile bound to the session is used. If provided it must match the session. |
lang | string | No | Omit it or send the same language as the session, for example zh-CN. |
Response example
json
{
"code": 200,
"message": "success",
"data": {
"session_id": "<SESSION_ID>",
"data": {
"is_pic": "True",
"pic_explain": "Please upload a clear, evenly lit photo of the affected area."
},
"raw_content": "Raw model output",
"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.is_pic | string | Current public convention: "True" needs an image; "False" does not. |
data.pic_explain | string/null | Instruction to show when an image is needed. |
raw_content | string/null | Raw model output. |
gateway_request_id | string/null | Gateway request ID. |
The backend response model exposes the AI result as an object, so is_pic and pic_explain are current business output conventions rather than fixed Pydantic fields. If is_pic is missing or has another value, do not advance automatically.