Overview
This API is used to query the status of an asynchronous image or video generation task. When the task has reached a final state and cached results are available, it returns the upstream result along with the task_id and task_status.
API details
Constraints
- You must have an API Key. For more information, see Manage AI API Keys.
Request path
GET {BASE_URL}/api/v1/tasks/{task_id}
Request header
Name |
Required |
Example value |
Description |
|---|---|---|---|
| Authorization | Yes | Bearer {token} | Authentication information |
| Content-Type | No | application/json | Request body format |
Request parameters
Path
Name |
Type |
Required |
Example value |
Description |
|---|---|---|---|---|
| task_id | string | Yes | None |
Query
None
Body
None
Response
Response parameters
Name |
Type |
Description |
|---|---|---|
| success | boolean | Whether the request was successful |
| code | string | Return code |
| message | string | Response parameters |
| data | object | Business response data |
data
Name |
Type |
Description |
|---|---|---|
| task_id | string | Task ID |
| task_status | string | Task status |
Request example
curl --request GET '{BASE_URL}/api/v1/tasks/{task_id}' \
--header 'Authorization: Bearer {token}' \
--header 'Content-Type: application/json'
Response example
{
"success": true,
"code": "200",
"message": "successful",
"data": {
"task_id": "example-task-id",
"task_status": "SUCCESS"
}
}
