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

# Retry run

> Start a new run using the source run input. By default the retry uses the latest automation version; pass `version=original` to pin the same source version as the original run.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/runs/{id}/rerun
openapi: 3.1.0
info:
  title: Eigenpal API
  version: 1.0.0
  description: >-
    Public REST API for inspecting automations, starting and monitoring runs,
    managing files, collecting human reviews, and running evaluations.
  contact:
    name: Eigenpal
    url: https://eigenpal.com
  license:
    name: Apache-2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
  - url: https://api.eigenpal.com
    description: Production (canonical API hostname)
security:
  - bearerAuth: []
tags:
  - name: Metadata
    description: Authenticate and inspect the current API context.
  - name: Automations
    description: >-
      Inspect runnable workflow and agent automations, their versions, triggers,
      and source sync state.
  - name: Runs
    description: >-
      Start, monitor, retry, review, and debug automation runs, including
      artifacts.
  - name: Reviews
    description: >-
      Record human review verdicts, manage corrected outputs, and monitor review
      health.
  - name: Files
    description: Upload reusable files for later run or dataset use.
  - name: Evaluation
    description: >-
      Manage datasets, examples, evaluators, experiment batches, evaluator
      scores, and run promotion workflows.
paths:
  /v1/runs/{id}/rerun:
    post:
      tags:
        - Runs
      summary: Retry run
      description: >-
        Start a new run using the source run input. By default the retry uses
        the latest automation version; pass `version=original` to pin the same
        source version as the original run.
      operationId: runs.rerun
      parameters:
        - in: path
          name: id
          schema:
            type: string
            description: Source run id to retry.
          required: true
          description: Source run id to retry.
        - in: query
          name: version
          schema:
            description: >-
              Version for the new run. `original` pins the source run. Defaults
              to latest.
            type: string
          description: >-
            Version for the new run. `original` pins the source run. Defaults to
            latest.
        - in: query
          name: wait_for_completion
          schema:
            description: Seconds to wait before returning (max 600). Omit for async.
            type: integer
            minimum: 0
            maximum: 600
          description: Seconds to wait before returning (max 600). Omit for async.
      responses:
        '200':
          description: Rerun completed while waiting
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Run'
        '201':
          description: Rerun accepted (async)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunAccepted'
        '202':
          description: Wait expired with a non-terminal status — poll GET /api/v1/runs/:id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunAccepted'
        '400':
          description: Validation error. Request shape did not match the spec.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
        '403':
          description: API key lacks required scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
        '413':
          description: Payload too large. Upload exceeded the per-request size cap.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
        '429':
          description: Rate limit exceeded
          headers:
            Retry-After:
              description: Seconds until the next request may succeed
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
components:
  schemas:
    Run:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - workflow
            - agent
        finished:
          type: boolean
          description: True when the run has reached a terminal status.
        sampleRank:
          type: number
          minimum: 0
          maximum: 1
          description: >-
            Deterministic pseudo-random rank in [0, 1) for this run within the
            tenant. Use with a sample rate threshold to review a stable subset.
        parentExecutionId:
          description: >-
            Parent run id when this run was started by an invoke-workflow step.
            Omitted for top-level runs.
          type: string
        timing:
          $ref: '#/components/schemas/RunTiming'
        source:
          $ref: '#/components/schemas/RunSource'
        trigger:
          $ref: '#/components/schemas/RunTrigger'
        eval:
          $ref: '#/components/schemas/RunEval'
          description: Present only on eval-scoped runs. Omitted otherwise.
        output:
          description: >-
            Completed runs only. Per-automation business result — not a generic
            schema. Absent until the run completes.
          anyOf:
            - type: object
              propertyNames:
                type: string
              additionalProperties: {}
            - type: 'null'
        files:
          description: >-
            Completed runs only. Download with GET
            /api/v1/runs/:id/artifacts/:path. Absent until the run completes.
          type: array
          items:
            $ref: '#/components/schemas/RunArtifact'
        error:
          $ref: '#/components/schemas/RunError'
          description: >-
            Terminal failure message. Present on terminal runs; null when the
            run succeeded. Absent while the run is still in flight.
        input:
          $ref: '#/components/schemas/RunInput'
          description: Present only with `expand=input`.
        usage:
          description: >-
            Present only with `expand=usage`. Null for old runs without
            telemetry.
          anyOf:
            - $ref: '#/components/schemas/RunUsage'
            - type: 'null'
        execution:
          anyOf:
            - $ref: '#/components/schemas/RunExecutionMeta'
            - $ref: '#/components/schemas/RunExecution'
          description: >-
            Slim execution metadata always present (`status`, `schemaValid`,
            `batchId`, `retry`). Pass `expand=execution` to replace with full
            RunExecution (WorkflowRunExecution or AgentRunExecution depending on
            run type).
        debug:
          $ref: '#/components/schemas/RunDebug'
          description: Present only with `expand=debug`.
      required:
        - id
        - type
        - finished
        - sampleRank
        - timing
        - source
        - trigger
        - execution
      additionalProperties: false
      example:
        id: wfx_01HZXEXAMPLE
        type: workflow
        finished: true
        sampleRank: 0.42
        timing:
          createdAt: '2026-01-15T10:00:00.000Z'
          startedAt: '2026-01-15T10:00:01.000Z'
          completedAt: '2026-01-15T10:00:08.000Z'
          durationMs: 7000
          cancelRequestedAt: null
        source:
          id: wf_invoice
          name: Invoice extraction
          version: '3'
          versionId: wfh_3
        trigger:
          type: api
          by: null
        output:
          vendor: Acme
          total: 149.5
        files:
          - name: file_1-invoice.json
            role: output
            path: output/extract/file_1-invoice.json
            stepName: extract
        error: null
        execution:
          status: completed
          schemaValid: true
          batchId: null
          retry:
            number: 0
            previousRunId: null
            nextRun: null
    RunAccepted:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - workflow
            - agent
        finished:
          type: boolean
          const: false
        source:
          $ref: '#/components/schemas/RunSource'
      required:
        - id
        - type
        - finished
      additionalProperties: false
      example:
        id: wfx_01HZXEXAMPLE
        type: workflow
        finished: false
        source:
          id: wf_invoice
          name: Invoice extraction
          version: null
    ApiErrorEnvelope:
      type: object
      properties:
        issues:
          type: array
          items:
            $ref: '#/components/schemas/ApiErrorIssue'
        requestId:
          type: string
          description: Request id echoed via the x-request-id header
        hint:
          description: Suggested fix for known error patterns
          type: string
        docsUrl:
          description: Link to relevant docs
          type: string
      required:
        - issues
        - requestId
      additionalProperties: false
    RunTiming:
      type: object
      properties:
        createdAt:
          type: string
        startedAt:
          anyOf:
            - type: string
            - type: 'null'
        completedAt:
          anyOf:
            - type: string
            - type: 'null'
        durationMs:
          anyOf:
            - type: number
            - type: 'null'
        cancelRequestedAt:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            When the user requested cancel; status may still be `running` until
            the worker stops.
      required:
        - createdAt
        - startedAt
        - completedAt
        - durationMs
        - cancelRequestedAt
      additionalProperties: false
    RunSource:
      type: object
      properties:
        id:
          type: string
          description: Owning workflow id or agent id.
        name:
          anyOf:
            - type: string
            - type: 'null'
        version:
          anyOf:
            - type: string
            - type: 'null'
          description: Workflow version label (workflow runs only).
        versionId:
          description: Captured workflow version id (workflow runs only).
          anyOf:
            - type: string
            - type: 'null'
        slug:
          description: Agent slug (agent runs only).
          anyOf:
            - type: string
            - type: 'null'
        model:
          description: LLM model used (agent runs only).
          anyOf:
            - type: string
            - type: 'null'
        git:
          description: Git provenance (agent runs only).
          anyOf:
            - $ref: '#/components/schemas/RunSourceGit'
            - type: 'null'
        implementationAvailable:
          description: >-
            Whether the live workflow/agent implementation still exists (`GET
            /api/v1/runs/:id` detail only).
          type: boolean
        automationFound:
          description: >-
            Whether the owning automation registry row still exists (`GET
            /api/v1/runs/:id` detail only).
          type: boolean
        currentVersion:
          description: >-
            Current released workflow version label when the source is live
            (`GET /api/v1/runs/:id` detail only).
          anyOf:
            - type: string
            - type: 'null'
      required:
        - id
        - name
        - version
      additionalProperties: false
    RunTrigger:
      type: object
      properties:
        type:
          anyOf:
            - type: string
            - type: 'null'
        by:
          anyOf:
            - type: object
              properties:
                id:
                  type: string
                name:
                  anyOf:
                    - type: string
                    - type: 'null'
                email:
                  type: string
              required:
                - id
                - name
                - email
              additionalProperties: false
            - type: 'null'
        email:
          description: >-
            Inbound email trigger details (agent runs, `expand=input` not
            required).
      required:
        - type
        - by
      additionalProperties: false
    RunEval:
      type: object
      properties:
        example:
          anyOf:
            - type: string
            - type: 'null'
          description: Eval example label (agent example name or workflow example id).
        exampleId:
          description: Workflow eval example folder id (workflow runs only).
          anyOf:
            - type: string
            - type: 'null'
        score:
          anyOf:
            - type: number
            - type: 'null'
        passed:
          anyOf:
            - type: boolean
            - type: 'null'
      required:
        - example
        - score
        - passed
      additionalProperties: false
    RunArtifact:
      type: object
      properties:
        name:
          type: string
        role:
          type: string
          description: >-
            `input`, `output`, `debug`, `report`, or another stable artifact
            role.
        path:
          type: string
          description: Canonical artifact path for GET /api/v1/runs/:id/artifacts/:path.
        stepName:
          description: Workflow step that produced the file, when known.
          type: string
        contentType:
          anyOf:
            - type: string
            - type: 'null'
        size:
          anyOf:
            - type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            - type: 'null'
      required:
        - name
        - role
        - path
      additionalProperties: false
    RunError:
      anyOf:
        - type: string
        - type: 'null'
    RunInput:
      type: object
      properties:
        args:
          description: Input arguments the run was started with.
        files:
          description: Uploaded input files (agent runs only).
          type: array
          items:
            $ref: '#/components/schemas/RunFile'
        metadata:
          description: Caller-supplied run metadata, if any.
      required:
        - args
      additionalProperties: false
    RunUsage:
      type: object
      properties:
        tokens:
          type: object
          properties:
            input:
              anyOf:
                - type: number
                - type: 'null'
            output:
              anyOf:
                - type: number
                - type: 'null'
            cacheRead:
              anyOf:
                - type: number
                - type: 'null'
            cacheWrite:
              anyOf:
                - type: number
                - type: 'null'
          required:
            - input
            - output
            - cacheRead
            - cacheWrite
          additionalProperties: false
        creditsCharged:
          anyOf:
            - type: number
            - type: 'null'
        durationMs:
          anyOf:
            - type: number
            - type: 'null'
        llmCallCount:
          description: LLM call count (workflow runs only).
          type: number
        ocrPagesProcessed:
          description: OCR pages processed (workflow runs only).
          type: number
        agentTurns:
          description: Agent conversation turns (agent runs only).
          anyOf:
            - type: number
            - type: 'null'
      required:
        - tokens
        - creditsCharged
        - durationMs
      additionalProperties: false
    RunExecutionMeta:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/ExecutionStatus'
          description: >-
            Status of this run. `retry.nextRun.status` is a later retry, not
            this run.
        schemaValid:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the completed output matched the workflow or agent output
            schema.
        batchId:
          anyOf:
            - type: string
            - type: 'null'
          description: Experiment batch id when the run is part of a batch.
        retry:
          $ref: '#/components/schemas/RunExecutionRetry'
        review:
          description: Lightweight review state for run list rows.
          anyOf:
            - $ref: '#/components/schemas/RunReviewSummary'
            - type: 'null'
      required:
        - status
        - schemaValid
        - batchId
        - retry
      additionalProperties: false
    RunExecution:
      anyOf:
        - $ref: '#/components/schemas/WorkflowRunExecution'
        - $ref: '#/components/schemas/AgentRunExecution'
    RunDebug:
      type: object
      properties:
        observability:
          description: Execution phase timeline and structured failure.
        traceId:
          description: Workflow trace id for span lookup (workflow runs only).
          anyOf:
            - type: string
            - type: 'null'
      required:
        - observability
      additionalProperties: false
    ApiErrorIssue:
      type: object
      properties:
        field:
          type: string
          description: JSON path of the offending field, or "<root>"
        message:
          type: string
          description: Human-readable error message
        code:
          type: string
          description: >-
            Machine-readable error code (e.g. invalid_value, not_found,
            api_trigger_disabled, manual_trigger_disabled)
        severity:
          type: string
          enum:
            - error
            - warning
          description: Issue severity
      required:
        - field
        - message
        - code
        - severity
      additionalProperties: false
    RunSourceGit:
      type: object
      properties:
        requestedRef:
          anyOf:
            - type: string
            - type: 'null'
        resolvedRef:
          anyOf:
            - type: string
            - type: 'null'
        resolvedTag:
          anyOf:
            - type: string
            - type: 'null'
        commitSha:
          anyOf:
            - type: string
            - type: 'null'
      required:
        - requestedRef
        - resolvedRef
        - resolvedTag
        - commitSha
      additionalProperties: false
    RunFile:
      type: object
      properties:
        name:
          type: string
      required:
        - name
      additionalProperties: false
    ExecutionStatus:
      type: string
      enum:
        - created
        - pending
        - running
        - waiting
        - finalizing
        - completed
        - failed
        - cancelled
        - rejected
    RunExecutionRetry:
      type: object
      properties:
        number:
          type: number
          description: Retry attempt index (0 = original run).
        previousRunId:
          anyOf:
            - type: string
            - type: 'null'
          description: Run id of the prior attempt in the retry chain.
        nextRun:
          anyOf:
            - type: object
              properties:
                id:
                  type: string
                status:
                  type: string
              required:
                - id
                - status
              additionalProperties: false
            - type: 'null'
          description: >-
            Retry run spawned from this run, if any. Present on list and detail
            without `expand`. `status` here is the later retry, not this run.
      required:
        - number
        - previousRunId
        - nextRun
      additionalProperties: false
    RunReviewSummary:
      type: object
      properties:
        verdict:
          anyOf:
            - type: string
              enum:
                - correct
                - incorrect
            - type: 'null'
        status:
          type: string
          enum:
            - open
            - closed
            - wont_fix
        hasNote:
          type: boolean
          description: True when review notes were left.
        correctionCount:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
          description: Number of field/file corrections.
      required:
        - verdict
        - status
        - hasNote
        - correctionCount
      additionalProperties: false
    WorkflowRunExecution:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/ExecutionStatus'
          description: >-
            Status of this run. `retry.nextRun.status` is a later retry, not
            this run.
        schemaValid:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the completed output matched the workflow or agent output
            schema.
        batchId:
          anyOf:
            - type: string
            - type: 'null'
          description: Experiment batch id when the run is part of a batch.
        retry:
          $ref: '#/components/schemas/RunExecutionRetry'
        review:
          anyOf:
            - $ref: '#/components/schemas/RunReview'
            - type: 'null'
        steps:
          type: array
          items: {}
          description: Per-step executions of the workflow run (`expand=execution`).
        childExecutions:
          description: >-
            Child invoke-workflow runs and their steps (`expand=execution`,
            workflow runs only). Omitted when there are no children.
          type: array
          items: {}
        definitionSnapshot:
          description: >-
            Workflow definition snapshot captured when the run was created
            (`expand=execution`).
          anyOf:
            - {}
            - type: 'null'
        expected:
          description: Ground-truth expected output and files.
          type: object
          properties:
            output: {}
            files:
              type: array
              items:
                $ref: '#/components/schemas/RunFile'
          additionalProperties: false
      required:
        - status
        - schemaValid
        - batchId
        - retry
        - steps
      additionalProperties: false
    AgentRunExecution:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/ExecutionStatus'
          description: >-
            Status of this run. `retry.nextRun.status` is a later retry, not
            this run.
        schemaValid:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether the completed output matched the workflow or agent output
            schema.
        batchId:
          anyOf:
            - type: string
            - type: 'null'
          description: Experiment batch id when the run is part of a batch.
        retry:
          $ref: '#/components/schemas/RunExecutionRetry'
        review:
          anyOf:
            - $ref: '#/components/schemas/RunReview'
            - type: 'null'
        files:
          type: object
          properties:
            output:
              type: array
              items:
                $ref: '#/components/schemas/RunFile'
              description: Output artifacts the agent produced.
          required:
            - output
          additionalProperties: false
        expected:
          description: Ground-truth expected output and files.
          type: object
          properties:
            output: {}
            files:
              type: array
              items:
                $ref: '#/components/schemas/RunFile'
          additionalProperties: false
        comparison:
          description: Expected-vs-actual comparison for eval runs (terminal runs only).
      required:
        - status
        - schemaValid
        - batchId
        - retry
        - files
      additionalProperties: false
    RunReview:
      type: object
      properties:
        id:
          type: string
        verdict:
          anyOf:
            - type: string
              enum:
                - correct
                - incorrect
            - type: 'null'
        status:
          type: string
          enum:
            - open
            - closed
            - wont_fix
        note:
          type: string
        correctedOutput:
          anyOf:
            - {}
            - type: 'null'
        reviewedBy:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            User id of the last reviewer. Read-only; set from the authenticated
            user or API key creator.
        reviewedByEmail:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Email of the last reviewer. Read-only; set from the authenticated
            user or API key creator.
        reviewedAt:
          type: string
        closedBy:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            User id recorded when the review was closed. Read-only; set when
            status becomes closed or wont_fix.
        closedByEmail:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Email recorded when the review was closed. Read-only; set when
            status becomes closed or wont_fix.
        closedAt:
          anyOf:
            - type: string
            - type: 'null'
        closedNote:
          anyOf:
            - type: string
            - type: 'null'
        createdAt:
          type: string
        updatedAt:
          type: string
        corrections:
          type: array
          items:
            $ref: '#/components/schemas/RunReviewCorrection'
      required:
        - id
        - verdict
        - status
        - note
        - reviewedBy
        - reviewedByEmail
        - reviewedAt
        - closedBy
        - closedByEmail
        - closedAt
        - closedNote
        - createdAt
        - updatedAt
        - corrections
      additionalProperties: false
    RunReviewCorrection:
      type: object
      properties:
        id:
          type: string
        kind:
          type: string
          enum:
            - field
            - file
        path:
          type: string
          description: >-
            JSON Pointer for field corrections, or canonical artifact path for
            file reviews.
        label:
          anyOf:
            - type: string
            - type: 'null'
        originalValue:
          anyOf:
            - {}
            - type: 'null'
        correctedValue:
          anyOf:
            - {}
            - type: 'null'
        note:
          type: string
        correctedArtifactPath:
          anyOf:
            - type: string
            - type: 'null'
        createdAt:
          type: string
        updatedAt:
          type: string
      required:
        - id
        - kind
        - path
        - label
        - note
        - createdAt
        - updatedAt
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key issued from Settings → API Keys. Pass as `Authorization: Bearer
        <key>`.

````