Create an image-recognition report task
POST
/ai-pic/sessions/report-tasksRequest URL
text
POST https://open-api.habitaxx.com/v1/ms-ai-fast/ai-pic/sessions/report-tasksRequest headers
http
Authorization: Bearer <ACCESS_TOKEN>
Content-Type: application/jsonRequest body
json
{
"session_id": "<SESSION_ID>",
"img_url": "<UPLOAD_RESPONSE_DATA_URL>"
}Request fields
| Field | Type | Required | Description |
|---|---|---|---|
session_id | string | Yes | Session with completed image recognition. |
img_url | string | Yes | The exact upload url value used by this session. |
Response example
json
{
"code": 200,
"message": "success",
"data": {
"session_id": "<SESSION_ID>",
"report_id": 10001,
"task": {
"task_id": "<TASK_ID>",
"task_type": "ai_pic_report_generate",
"status": "processing",
"progress": 0,
"result_payload_json": null,
"error_code": null,
"started_at": null,
"finished_at": null,
"created_at": "2026-09-14T10:01:00+08:00",
"updated_at": "2026-09-14T10:01:00+08:00"
}
}
}After task creation, use task.task_id with Query an asynchronous task. Call Retrieve the complete report only after the task reaches succeeded.
Task fields
| Field | Type | Description |
|---|---|---|
report_id | integer/null | Image-recognition report ID. |
task.task_id | string | Asynchronous task ID. |
task.task_type | string | Fixed to ai_pic_report_generate. |
task.status | string | pending, processing, retrying, succeeded, failed, or canceled. |
task.progress | integer | Task progress. |
task.result_payload_json | object/null | Public result summary. |
task.error_code | integer/null | Public numeric error code; only set when the task failed. |
task.started_at / finished_at | datetime/null | Start and finish timestamps (UTC, no offset). |
task.created_at / updated_at | datetime/null | Creation and update timestamps (UTC+8, no offset). |
The task object does not return error_key, error_message, retryable or recommended_action; decide retryability from the task-level error code table. A failed task still returns HTTP 200 with code 200 — detect failure from task.status.