---
title: "Retry a failed task"
method: POST
path: "/v1/tasks/{id}/retry"
tags: ["Tasks"]
---

# Retry a failed task

`POST /v1/tasks/{id}/retry`

## Request

- Base URL: `https://nanostudiopro.com/api`
- URL: `https://nanostudiopro.com/api/v1/tasks/{id}/retry`
- Auth: HTTP bearer

Flips a `failed` task back to `running` in place — the row's `retries` counter increments, `error` clears, and a new attempt begins. Currently only the row state changes; the underlying executor replay is being added in a follow-up release. For now, treat this as a way to bookkeeping-mark an attempt for a manual re-trigger.

## Path parameters

- `id` string, required

## Response `200`

Task retried.

- Task: Lifecycle row for an async operation (generations, uploads, scans, exports). Returned by `/v1/tasks` so external clients can poll their jobs the same way the in-app UI does.
  - `id` string
  - `action` 'upload' | 'scan' | 'export' | 'generate': High-level grouping of the operation.
  - `kind` string: Specific operation — e.g. `generate.quick`, `generate.restyle`, `generate.video`, `generate.angles`, `upload`, `scan`, `export`.
  - `status` 'queued' | 'running' | 'complete' | 'failed' | 'canceled'
  - `progress` integer: Best-effort 0-100; many endpoints leave it at 0.
  - `error` string, nullable: User-facing error message if `status=failed`.
  - `label` string, nullable
  - `origin` string, nullable: Where the task was triggered from. `API` for external callers, plus values like `Prompter`, `Card menu`, `Pose editor`.
  - `display_meta` object, nullable: Free-form metadata (aspect ratio, project id, thumbnail path) used by the UI placeholder. Safe for external clients to display verbatim.
  - `intent` object, nullable: Endpoint + body the task originated from. Used internally for retries.
  - `retries` integer: How many retry attempts have been made.
  - `max_retries` integer
  - `provider` object, nullable: External-system tracking for async providers (Kling video, future Runway/Pika/etc.). `null` for synchronous providers like Gemini.
    - `key` string
    - `task_id` string, nullable: External system's job id.
    - `status` string, nullable: Provider-specific status string.
    - `updated_at` string, date-time, nullable
  - `generation_id` string, nullable: FK to the resulting Generation, if applicable.
  - `asset_id` string, nullable: FK to the resulting Asset, if applicable.
  - `scan_result_id` string, nullable
  - `parent_task_id` string, nullable: For batched operations — points to the parent Task.
  - `started_at` string, date-time
  - `completed_at` string, date-time, nullable
  - `created_at` string, date-time

## Other responses

- `400`: Task is not in failed status, or max retries reached
- `401`: Missing or invalid token
- `404`: Task not found
- `429`: Rate limit exceeded

---

[API](https://skmtc.dev/nanostudiopro/apis/nano-studio-pro-api.md) · [All operations](https://skmtc.dev/nanostudiopro/apis/nano-studio-pro-api/llms.txt) · [OpenAPI document](https://skmtc.dev/nanostudiopro/apis/nano-studio-pro-api/revisions/b454211e598e?raw)
