Follow the whole lifecycle
| State | Meaning |
|---|---|
| queued / running | Waiting for capacity or generating. |
| falling_back | An eligible failed item is switching routes. |
| reconciliation_required | The upstream result is unknown; do not resubmit. |
| succeeded | All target items succeeded. |
| partially_succeeded | All items are final, and some succeeded. |
| failed / cancelled | Final failure, or a confirmed cancellation where supported. |
Read individual items
The same parent can contain low-cost and official successes. Never assume the final item’s channel applies to every result. This simplified example omits output URLs, errors, and timestamps.
{
"task_id": "task_example",
"status": "partially_succeeded",
"output_count": 4,
"counts": {
"succeeded": 3,
"failed": 1,
"cancelled": 0,
"pending": 0
},
"billing": {
"initial_reserved_credits": 240,
"charged_credits": 100,
"released_credits": 140,
"remaining_reserved_credits": 0
},
"items": [
{
"index": 0,
"item_id": "item_1",
"status": "succeeded",
"final_channel_type": "third_party",
"charged_credits": 20
},
{
"index": 1,
"item_id": "item_2",
"status": "succeeded",
"final_channel_type": "third_party",
"charged_credits": 20
},
{
"index": 2,
"item_id": "item_3",
"status": "succeeded",
"final_channel_type": "official",
"charged_credits": 60
},
{
"index": 3,
"item_id": "item_4",
"status": "failed",
"final_channel_type": null,
"charged_credits": 0
}
]
}Poll without creating extra work
Query the existing task ID at intervals, honor Retry-After, and add backoff when a task takes longer. Read already completed items while other items are running. Do not hold a new generation request open as a polling mechanism.
Download before the returned expires_at. File expiry does not change the historical success state or automatically refund credits.