liangxin
    • Market
    • Image Models
      • Seedream
        • Seedream4.5 - Text to Image
        • Seedream5.0 Lite - Text to Image
      • Z-image
        • Z-Image
      • Google
        • Google - Gemini 2.5 Flash Image Preview
        • Google - Nano Banana Pro
        • Google - Nano Banana Pro Flash
        • Google - imagen4-fast
        • Google - imagen4-ultra
      • Flux-2
        • Flux-2 - Pro Text to Image
    • Get Task Details
      GET

      Get Task Details

      GET
      /api/v1/jobs/recordInfo
      Query task status and retrieve final generation results for any LiangXin Market image task.

      Supported Models#

      This endpoint works with all current image models: z-image, seedream-v4-5, seedream-v5-lite, gemini-2.5-flash-image-preview, nano-banana-pro, nano-banana-pro-flash, imagen4-fast, imagen4-ultra, and flux-2-pro.

      Query Parameter#

      FieldTypeRequiredNotes
      taskIdstringYesThe public taskId returned by POST /api/v1/jobs/createTask.

      Task States#

      StateMeaning
      waitingTask was submitted and is waiting for upstream processing.
      queuingTask is queued locally or upstream.
      generatingUpstream is currently processing the task.
      successTask completed successfully. Parse data.resultJson for resultUrls.
      failTask reached a terminal failure. Read failCode and failMsg.

      Response Fields#

      FieldTypeNotes
      codeintegerHTTP-style business code. Successful queries return 200.
      msgstringsuccess for successful query responses.
      data.taskIdstringPublic task ID.
      data.modelstringOriginal requested model name.
      data.statestringOne of waiting, queuing, generating, success, fail.
      data.paramstringOriginal createTask request serialized as JSON string.
      data.resultJsonstringEmpty until success. On success it is a JSON string such as {\"resultUrls\":[\"https://...\"]}.
      data.failCodestringEmpty unless state is fail.
      data.failMsgstringEmpty unless state is fail.
      data.costTimeintegerMilliseconds between submit and finish; 0 until finished.
      data.completeTimeintegerUnix milliseconds; 0 until finished.
      data.createTimeintegerUnix milliseconds.
      data.updateTimeintegerUnix milliseconds.

      Callback Payload#

      If a createTask request includes callBackUrl, LiangXin posts the same code, msg, and data structure to that URL when the task reaches success or fail. Polling remains recommended as a fallback.

      Best Practices#

      Poll every 2 to 3 seconds at first, then back off gradually. Stop polling after your own business timeout and allow users to retry with the same taskId. Download or persist generated result URLs promptly because upstream/CDN retention is not guaranteed by this endpoint.

      Error Responses#

      400 means taskId is missing. 401 means the API key is missing or invalid. 403 means token/user access is denied. 404 means the task does not exist or does not belong to this API key's user. 500 means the server could not query or serialize the task.

      Request

      Query Params

      Responses

      🟢200200 - Task details success
      application/json
      Body

      🟢200200 - Task still generating
      🟢200200 - Task failed terminal state
      🟠400400 - Missing taskId
      🟠401401 - Invalid API key
      🟠403403 - Access denied
      🟠404404 - Task not found
      🔴500500 - Internal query error
      Request Request Example
      Shell
      JavaScript
      Java
      Swift
      curl --location -g --request GET '/api/v1/jobs/recordInfo?taskId={{taskId}}'
      Response Response Example
      200 - 200 - Task details success
      {
        "code": 200,
        "msg": "success",
        "data": {
          "taskId": "task_z-image_1777600000000",
          "model": "z-image",
          "state": "success",
          "param": "{\"model\":\"z-image\",\"callBackUrl\":\"https://your-domain.com/api/callback\",\"input\":{\"prompt\":\"A cafe terrace\",\"image_size\":\"square_hd\"}}",
          "resultJson": "{\"resultUrls\":[\"https://cdn.example.com/result.png\"]}",
          "failCode": "",
          "failMsg": "",
          "costTime": 18000,
          "completeTime": 1777600000000,
          "createTime": 1777599982000,
          "updateTime": 1777600000000
        }
      }
      Modified at 2026-05-01 06:34:47
      Previous
      Flux-2 - Pro Text to Image
      Built with