Aibubu
Visit Aibubu ↗
Task management

Get Task

Unified task lookup for image, video, and other async generation jobs.

GET/v1/tasks/{task_id}

This is the recommended default task lookup endpoint.

GET /v1/tasks/{task_id}

Overview

ItemDescription
RouteGET /v1/tasks/{task_id}
AuthAuthorization: Bearer sk_aibubu_xxx
Path parametertask_id
Response200 OK + task object

Why use this endpoint

  • One status checker for both image and video tasks
  • Easier to build a single application-side state machine
  • Works well together with webhook delivery

Authorizations

Authorization: Bearer sk_aibubu_your_api_key

Path Parameters

ParameterTypeRequiredDescription
task_idstringYesTask ID returned by task creation

Response

{
  "task_id": "task_01jxyz...",
  "object": "task",
  "kind": "image",
  "model": "gpt-image-2",
  "status": "succeeded",
  "progress": 100,
  "created_at": 1784779200,
  "completed_at": 1784779260,
  "estimated_credits": 8,
  "credits_charged": 8,
  "result": {
    "data": [
      { "url": "https://cdn.aibubu.cn/generated/image.png" }
    ]
  }
}

Response fields

FieldTypeDescription
task_idstringTask ID
kindstringTask type such as image or video
modelstringActual execution model
statusstringqueued, running, succeeded, failed, canceled, or expired
progressintegerTask progress
created_atintegerCreation timestamp
completed_atintegerCompletion timestamp
estimated_creditsnumberCredits reserved at submission
credits_chargednumberCredits actually charged, omitted until settlement; usage-priced models can differ slightly from the estimate, and failed, canceled, or expired tasks charge 0
resultobjectSuccess payload
errorobjectFailure payload

Terminal states are succeeded, failed, canceled, and expired. completed_at is returned after completion and is normally omitted while running; do not rely on a fixed 0.

Successful results

result.data is the list of generated assets. Every item includes the platform-hosted url; video outputs additionally include thumbnail_url when a usable cover is available.

{
  "kind": "video",
  "status": "succeeded",
  "result": {
    "data": [
      {
        "url": "https://cdn.aibubu.cn/generated/video.mp4",
        "thumbnail_url": "https://cdn.aibubu.cn/generated/cover.png"
      }
    ]
  }
}

Public API responses never expose provider payloads, routing details, or internal usage; billing is limited to estimated_credits and credits_charged above. Use top-level kind to distinguish the output; url is always present and thumbnail_url is returned only for video with an available cover.

url is a signed link valid for about 15 minutes after each fetch; fetch the task again for a fresh link. Download and archive outputs when your business requires long-term retention.

Integration notes

  • Even after receiving a webhook, it is still safer to query the task once more in critical flows
  • Avoid polling too aggressively; use a fixed interval or backoff
  • Treat task lookup as the final source of truth