> ## Documentation Index
> Fetch the complete documentation index at: https://docs.archetypeai.app/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Start with /introduction/getting-started. Use the Direct Query API (POST /query) with the Newton Fusion model (text, image, and video reasoning) or the Newton Omega encoder (time-series embeddings). ATAI_API_ENDPOINT must include the version path: /v0.5 for most APIs, /v0.6 for the Fine-Tuning Service. Pages whose descriptions are marked (Archived) document the legacy Lens runtime — do not use them for new projects.

# Retry Job

> Retry a failed or cancelled job

<Callout icon="clock" color="#3064E3" iconType="solid">
  Requires [version 1.1.0](/release-notes/1.1.x#v1-1-0) or later of the Archetype platform.
</Callout>

<Warning>
  This endpoint is no longer available as of Archetype Platform v1.1.5. Calling it results in a 501 redirect to the [Resume
  Job](/api-reference/batch/jobs/resume-job) endpoint. The Retry Job endpoint will be
  re-implemented in a future release.
</Warning>

## Overview

This endpoint retries a job that is in `FAILED` or `CANCELLED` status. The job is re-queued with
`PENDING` status and its retry count is incremented.

## Request

<ParamField path="id" type="string" required>
  The unique job identifier
</ParamField>

## Response

<ResponseField name="id" type="string">
  The job identifier
</ResponseField>

<ResponseField name="status" type="string">
  Updated job status (`PENDING`)
</ResponseField>

<ResponseField name="retry_count" type="integer">
  Updated retry count
</ResponseField>

<RequestExample>
  ```bash cURL theme={"system"}
  curl -X POST https://api.u1.archetypeai.app/v0.5/batch/jobs/job_2abc3def4ghi5jkl6mno7pqr/retry \
    -H "Authorization: Bearer $ATAI_API_KEY"
  ```

  ```python Python theme={"system"}
  import requests
  import os

  api_key = os.environ.get("ATAI_API_KEY")
  job_id = "job_2abc3def4ghi5jkl6mno7pqr"

  response = requests.post(
      f"https://api.u1.archetypeai.app/v0.5/batch/jobs/{job_id}/retry",
      headers={"Authorization": f"Bearer {api_key}"}
  )

  result = response.json()
  print(f"Job {result['id']} retried — Status: {result['status']}, Retry #{result['retry_count']}")
  ```

  ```javascript JavaScript theme={"system"}
  const jobId = 'job_2abc3def4ghi5jkl6mno7pqr';

  const response = await fetch(`https://api.u1.archetypeai.app/v0.5/batch/jobs/${jobId}/retry`, {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${process.env.ATAI_API_KEY}`
    }
  });

  const result = await response.json();
  console.log(`Job ${result.id} retried — Status: ${result.status}, Retry #${result.retry_count}`);
  ```
</RequestExample>

<ResponseExample>
  ```json 501 - Not Implemented theme={"system"}
  {
    "detail": "Retry is currently disabled. The endpoint is retained (it exists in the API), but returns a clear 501 directing users to `/resume`. A different retry implementation is planned for later."
  }
  ```
</ResponseExample>

<Note>
  Only jobs in `FAILED` or `CANCELLED` status can be retried. Attempting to retry a job in any other state will return a `409 Conflict` error.
</Note>
