/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
- 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
- taskId string required
The task id returned by asynchronous API, which is the task you care about.
Responses
- 200
If the task has not been finished, only the task information is returned. Else return the task output.
- application/json
- Schema
- Example (from schema)
- Success
Schema
- code integer required
data object required
caption stringMaybe
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 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": {
"caption": "string",
"images": [
"string"
],
"taskId": "string",
"queuePosition": 0,
"status": 0
},
"message": "string"
}
Success
{
"code": 200,
"data": {
"taskId": "faa37545-b284-461d-85fc-32468c7af036",
"queuePosition": 0,
"status": 2,
"caption": "a blurry image of a white and blue background with a blurry effect of a blue and white background, Carlos Trillo Name, behance hd, a detailed matte painting, net art"
},
"message": "success"
}
Loading...