Skip to content

Create an image-recognition report task ​

POST/ai-pic/sessions/report-tasks

Request URL ​

text
POST https://open-api.habitaxx.com/v1/ms-ai-fast/ai-pic/sessions/report-tasks

Request headers ​

http
Authorization: Bearer <ACCESS_TOKEN>
Content-Type: application/json

Request body ​

json
{
  "session_id": "<SESSION_ID>",
  "img_url": "<UPLOAD_RESPONSE_DATA_URL>"
}

Request fields ​

FieldTypeRequiredDescription
session_idstringYesSession with completed image recognition.
img_urlstringYesThe 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 ​

FieldTypeDescription
report_idinteger/nullImage-recognition report ID.
task.task_idstringAsynchronous task ID.
task.task_typestringFixed to ai_pic_report_generate.
task.statusstringpending, processing, retrying, succeeded, failed, or canceled.
task.progressintegerTask progress.
task.result_payload_jsonobject/nullPublic result summary.
task.error_codeinteger/nullPublic numeric error code; only set when the task failed.
task.started_at / finished_atdatetime/nullStart and finish timestamps (UTC, no offset).
task.created_at / updated_atdatetime/nullCreation 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.

最近更新

Qijie Open Platform · API Documentation