---
title: "Resume incomplete items in a job"
method: POST
path: "/api/v1/jobs/{id}/resume"
tags: ["Job Management"]
---

# Resume incomplete items in a job

`POST /api/v1/jobs/{id}/resume`

## Request

- Base URL: `https://api.imagestep.dev`
- URL: `https://api.imagestep.dev/api/v1/jobs/{id}/resume`
- Auth: API key in header `Authorization`

Retries what did not finish: a new job over the FAILED and CANCELLED items of a `FAILED` or
`CANCELLED` job, with the original's configuration — the same op, model, prompt and parameters, the
same preset **at the version the original ran**, or the same inline steps and subjects. Only the
incomplete items are retried (a variant set may repeat a few that had completed — deterministic
work, priced like any other run).

- The new job is an ordinary submit: it is priced, checked and charged like one, so it can be refused like one (`402`, `422`).
- A `chain` item restarts on the segment it failed on (`failedStep`), from the image the last segment it finished made; the segments it already paid for are not paid again.
- A source asset deleted since the original ran drops its item from the retry; when none is left the answer is `404 asset_not_found`.
- The new job points back with `parentJobId`, carries `rootJobId` — the first attempt's id, the same on every resume and on the first attempt itself — and advances `attemptNumber` by 1; `GET /api/v1/jobs?rootJobId=` lists every attempt. Only the latest attempt can be resumed, and only a few times (`details.job.maxResumes`).

Whether a resume can help at all is on the job: `retryable: true` means at least one failed item
failed for a reason that may pass.

USE THIS WHEN:
- Retrying only the failed items of a partially-successful job without resubmitting the whole batch

DO NOT USE WHEN:
- Submitting a fresh job → use POST /api/v1/jobs
- Every failed item says `retryable: false` — the same input fails the same way

## Path parameters

- `id` string, required

## Headers

- `Idempotency-Key` string

## Response `201`

The new attempt, created

## Other responses

- `400`: `invalid_state` — the job is not `FAILED` or `CANCELLED`, or it has no FAILED or CANCELLED item to retry
- `402`: `insufficient_credit` — the balance does not cover the retried AI items
- `404`: - `job_not_found` — no such job, or it is not yours - `asset_not_found` on `assetIds` — none of the incomplete items still has its source asset (or, for a chain, the image it would restart from); `details.missing` lists them
- `409`: Conflict — `error.code` is `idempotency_key_reuse` (the key already means a different request) or `request_in_progress` (the first request under this key has not settled yet; retryable).
- `422`: - `job_not_resumable` — `details.reason` is `NOT_LATEST_ATTEMPT` (resume the newest attempt of this `rootJobId` instead), `RESUME_LIMIT_EXCEEDED` (`details.job.maxResumes` reached) or `NOT_RETRYABLE` (every item left to retry failed with `invalid_param` or `unsupported_format`, which a resume meets again; `details.job.errorCode` is the first one's) - `asset_count_exceeded` — the retry would pass the plan's stored-asset ceiling
- `429`: Rate limited — `error.code` is `rate_limited` and `retryable` is true. `Retry-After` says how many seconds to wait.

---

[API](https://skmtc.dev/imagestep/apis/imagestep-api.md) · [All operations](https://skmtc.dev/imagestep/apis/imagestep-api/llms.txt) · [OpenAPI document](https://skmtc.dev/imagestep/apis/imagestep-api/revisions/5e8e922a3085?raw)
