/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
- Please refer to the Authentication section on how to obtain a private DAN_API_KEY.
Example: Bearer sk-000000000000000000000000000000000000000000000000 - Content-Type string required
application/json is required
Example: application/json - Accept stringExample: application/json
- 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
- 200
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.
- application/json
- Schema
- Example (from schema)
- Success
Schema
- code integer required
data object required
taskId string requiredqueuePosition integer requiredThe length of the queue of pending tasks, when status != 0, queuePosition = 0
status integer required0:pending, 1:processing, 2:success, 3:fail
- message string required
{
"code": 0,
"data": {
"taskId": "string",
"queuePosition": 0,
"status": 0
},
"message": "string"
}
Success
{
"code": 200,
"data": {
"taskId": "00ac7e02-bff0-4741-8798-0cd7821dedf7",
"queuePosition": 0,
"status": 2
},
"message": "success"
}