Skip to main content

/api/sd/task/status

POST /api/sd/task/status

This API is used to query task's progress or retrive the task's result.

Header Parameters
  • Authorization string required
    • Bearer DAN_API_KEY.
    • Public anonymous DAN_API_KEY is:
    sk-000000000000000000000000000000000000000000000000
    Example: Bearer sk-000000000000000000000000000000000000000000000000
  • Content-Type string required

    application/json is required

    Example: application/json
  • Accept string
    Example: application/json
Request Body
  • taskId string required

    The task id returned by asynchronous API, which is the task you care about.

Responses

If the task has not been finished, only the task information is returned. Else return the task output.

Schema
  • code integer required
  • data object required
  • caption string

    Maybe undefined. If the task a an interrogate task, This is the input image description.

  • images string[]

    May be undefined. If the task is txt2img/img2img task, this is the generated file list, encoded in base64.

  • taskId string required
  • queuePosition integer required

    The length of the queue of pending tasks, when status != 0, queuePosition = 0

  • status integer required

    0:pending, 1:processing, 2:success, 3:fail

  • message string required
Loading...