ChatArtAPI Docs

Task Status

Track generation progress and retrieve result URLs using the task ID.

GET/v1/tasks/{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

FieldTypeRequiredDescription
task_idstringRequiredTask ID returned by POST /v1/videos or POST /v1/images. Tasks are isolated by account.

States

FieldTypeDescription
submittingpendingSubmission has started.
processingpendingGeneration is in progress.
successterminalResult URLs are available.
failedterminalGeneration failed; error describes the failure.
submission_unknownmanual reconciliationSubmission may have reached the provider. Check ChatArt history before retrying.

Result

JSON
{
  "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

JSON
{
  "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

FieldTypeDescription
task_idstringTask identifier returned at creation.
endpointstringimage or video.
modelstringNative ChatArt model identifier.
statusstringsubmitting, processing, success, failed or submission_unknown.
costnumber | nullReserved API credits while processing; settled credits when complete.
unitstringcredit.
create_atintegerCreation timestamp in Unix seconds.
video_urlstringGenerated video URL; empty for image tasks.
image_urlstringFirst successful image URL; empty for video tasks.
image_urlsstring[]Successful image result URLs; empty for video tasks.
errorstringFailure message; empty when no failure is reported.
On this page