Skip to main content
GET
cURL
Use this endpoint after you create an image with POST /v1/images/generations and async: true. The create request returns data.task_id, and this endpoint returns the task state plus final image data when the task succeeds.

Poll an image task

1

Create the task

Send POST /v1/images/generations with async: true, then store data.task_id.
2

Poll the task

Call this endpoint with the stored task ID until data.status is success or failure.
3

Read the image data

When data.status is success, read the first item in data.data. Depending on the selected model, the item can include b64_json, url, or revised_prompt.

Status values

  • pending: The task is queued or generating.
  • success: The task finished and data.data contains the generated image data.
  • failure: The task failed. Check data.fail_reason when it is returned.

Authorizations

Authorization
string
header
required

Bearer token authentication. Use your CometAPI key.

Path Parameters

task_id
string
required

Task ID returned in data.task_id by the async create request.

Response

200 - application/json

Current image generation task state.

code
string
required

Request status code. Successful task lookups return success.

Example:

"success"

data
object
required
message
string

Optional status message.

Last modified on July 6, 2026