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

# Retry Last Failed Alignment Project

> Retry a failed alignment for the authenticated user.

**Query Parameters:**
- `alignment_id` (optional): Retry this specific failed alignment. If
  omitted, the endpoint picks the user's most recently FAILED alignment
  that has not already been retried.

**Request Body (optional):**
- `base_model` (optional): Override the failed alignment's base model when
  starting the retry. If omitted (or the body is omitted entirely), the
  failed row's `base_model` is reused.

The endpoint reuses the failed row's `synthetic_data_id`, `name`, and
`description` to start a new alignment — the same path
`/create-alignment` takes, just with the inputs pulled from the prior
failed row instead of a request body. `base_model` can be overridden via
the request body; otherwise it's reused as well.

Once a retry is created, the original failed row is stamped with
`metadata.retried_by = <new_alignment_id>` so it won't be retried again,
whether picked implicitly or referenced explicitly.

**Returns:**
- `alignment_id`: ID of the newly created alignment task.
- `status`: Always `PROCESSING`.

**Raises:**
- `404`: No failed alignment exists for this user, or the explicit
  `alignment_id` is not owned by the user.
- `400`: The explicit `alignment_id` is not in FAILED state, or the base
  model no longer supports alignment.
- `409`: The failure is not retryable — already retried, failed during
  synthetic data generation, has no `synthetic_data_id` to reuse, or the
  source synthetic data is no longer completed/accessible.



## OpenAPI

````yaml https://api.nugen.in/openapi-public.json post /api/v3/alignment-projects/retry-last-failed
openapi: 3.1.0
info:
  title: Nugen Intelligence API
  description: 'Nugen Intelligence : Powering Specialized Intelligence At Scale'
  version: 25.4.20
servers: []
security: []
paths:
  /api/v3/alignment-projects/retry-last-failed:
    post:
      tags:
        - General
      summary: Retry Last Failed Alignment Project
      description: >-
        Retry a failed alignment for the authenticated user.


        **Query Parameters:**

        - `alignment_id` (optional): Retry this specific failed alignment. If
          omitted, the endpoint picks the user's most recently FAILED alignment
          that has not already been retried.

        **Request Body (optional):**

        - `base_model` (optional): Override the failed alignment's base model
        when
          starting the retry. If omitted (or the body is omitted entirely), the
          failed row's `base_model` is reused.

        The endpoint reuses the failed row's `synthetic_data_id`, `name`, and

        `description` to start a new alignment — the same path

        `/create-alignment` takes, just with the inputs pulled from the prior

        failed row instead of a request body. `base_model` can be overridden via

        the request body; otherwise it's reused as well.


        Once a retry is created, the original failed row is stamped with

        `metadata.retried_by = <new_alignment_id>` so it won't be retried again,

        whether picked implicitly or referenced explicitly.


        **Returns:**

        - `alignment_id`: ID of the newly created alignment task.

        - `status`: Always `PROCESSING`.


        **Raises:**

        - `404`: No failed alignment exists for this user, or the explicit
          `alignment_id` is not owned by the user.
        - `400`: The explicit `alignment_id` is not in FAILED state, or the base
          model no longer supports alignment.
        - `409`: The failure is not retryable — already retried, failed during
          synthetic data generation, has no `synthetic_data_id` to reuse, or the
          source synthetic data is no longer completed/accessible.
      operationId: alignment_projects_retry_last_failed
      parameters:
        - name: alignment_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Alignment Id
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/RetryLastFailedRequest'
                - type: 'null'
              title: Request
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    RetryLastFailedRequest:
      properties:
        alignment_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Alignment Id
        base_model:
          anyOf:
            - type: string
            - type: 'null'
          title: Base Model
      type: object
      title: RetryLastFailedRequest
      description: >-
        Optional request body for /retry-last-failed.


        `alignment_id` targets a specific failed alignment. When omitted, the

        most recently failed (unretried) alignment is used.


        `base_model` overrides the failed alignment's original base model. When

        omitted (or the body is omitted entirely), the failed row's base_model
        is

        reused as before.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````