Task Status
Track generation progress and retrieve result URLs using the task ID.
Send Authorization: Bearer YOUR_API_KEY. Create a key in API Keys after signing in with a ChatArt account. New keys are stored encrypted and can be revealed in API Keys; authentication uses their hashes. Older hash-only keys cannot be revealed. Deleting a key revokes it immediately. Keys and tasks are isolated by account and application.
Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| task_id | string | Required | Task ID returned by POST /v1/videos or POST /v1/images. Tasks are isolated by account. |
States
| Field | Type | Description |
|---|---|---|
| submitting | pending | Submission has started. |
| processing | pending | Generation is in progress. |
| success | terminal | Result URLs are available. |
| failed | terminal | Generation failed; error describes the failure. |
| submission_unknown | manual reconciliation | Submission may have reached the provider. Check ChatArt history before retrying. |
Result
{
"code": 200,
"message": "success",
"data": {
"task_id": "task_example",
"endpoint": "image",
"model": "gpt-image-2.6-flare",
"status": "success",
"cost": 5,
"unit": "credit",
"create_at": 1794355200,
"image_url": "https://cdn.example.com/result.png",
"image_urls": [
"https://cdn.example.com/result.png"
],
"video_url": "",
"error": ""
}
}Image responses use image_url/image_urls; video responses use video_url. Cost is the reserved API credit amount while processing and the settled amount on completion. Failed tasks refund the reservation; partially successful image batches refund the unused portion. Unknown submissions keep their reservation until reconciled. Poll every few seconds, stop on a terminal state, and back off on server errors. Tasks can only be read by keys belonging to the same account.
Video task response
{
"code": 200,
"message": "success",
"data": {
"task_id": "task_example",
"endpoint": "video",
"model": "kling-4-0",
"status": "success",
"cost": 200,
"unit": "credit",
"create_at": 1794355200,
"image_url": "",
"image_urls": [],
"video_url": "https://cdn.example.com/result.mp4",
"error": ""
}
}Response fields
| Field | Type | Description |
|---|---|---|
| task_id | string | Task identifier returned at creation. |
| endpoint | string | image or video. |
| model | string | Native ChatArt model identifier. |
| status | string | submitting, processing, success, failed or submission_unknown. |
| cost | number | null | Reserved API credits while processing; settled credits when complete. |
| unit | string | credit. |
| create_at | integer | Creation timestamp in Unix seconds. |
| video_url | string | Generated video URL; empty for image tasks. |
| image_url | string | First successful image URL; empty for video tasks. |
| image_urls | string[] | Successful image result URLs; empty for video tasks. |
| error | string | Failure message; empty when no failure is reported. |