Skip to main content

/api/sd/interrogate/async

POST /api/sd/interrogate/async

Interrogate tasks will generate a description for an input image.
Its usage is almost the same as interrogate. The difference between this interface and interrogate is that this interface will return immediately with task information.
After obtaining the task information, you can use the /api/sd/task/status interface to query the task status and get the 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
  • image string required

    The base64-encoded string of your input image

  • model string required

    The model name used to describe the image, avalaible options are clip and deepdanbooru

Responses

Instead of returning the final result, this API returns the taskId and queueing information. You can use /api/sd/task/status to query the latest status of the task or get the final result.

Schema
  • code integer required
  • data object required
  • 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...