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

# Run a run again

> Repeats a run and answers with the new one, which names the run it came from. The kind of the source decides the form: a run the platform launched drives the agent again and scores the new sessions, while a run that scored sessions which already existed scores them again and creates none. A run the client performed carries no kind to read, so its own evaluations name the sessions and metrics to score again; no new session is created, because only that client can produce one. A repetition that scores sessions answers with a "report" of what it scored, skipped and failed; one that drives the agent again reports null there, because that work is queued.



## OpenAPI

````yaml https://api.galtea.ai/openapi.json post /runs/{id}/relaunch
openapi: 3.0.0
info:
  version: 1.0.0
  title: Product Management Service API
  description: API documentation for Product Management Service
  contact:
    name: Galtea AI
servers:
  - url: https://api.galtea.ai
security:
  - bearerAuth: []
tags: []
externalDocs:
  description: Galtea Platform Documentation
  url: https://docs.galtea.ai
paths:
  /runs/{id}/relaunch:
    post:
      tags:
        - runs
      summary: Run a run again
      description: >-
        Repeats a run and answers with the new one, which names the run it came
        from. The kind of the source decides the form: a run the platform
        launched drives the agent again and scores the new sessions, while a run
        that scored sessions which already existed scores them again and creates
        none. A run the client performed carries no kind to read, so its own
        evaluations name the sessions and metrics to score again; no new session
        is created, because only that client can produce one. A repetition that
        scores sessions answers with a "report" of what it scored, skipped and
        failed; one that drives the agent again reports null there, because that
        work is queued.
      operationId: relaunchRun
      parameters:
        - schema:
            type: string
            description: Run ID
            example: run_123
          required: true
          description: Run ID
          name: id
          in: path
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                versionId:
                  type: string
                  minLength: 1
                  example: version_123
                  description: >-
                    Run the repetition against a different version. Only for a
                    run the platform launched itself; a run that scored existing
                    sessions refuses it, because those sessions already name
                    their version.
                useCurrentTestCases:
                  type: boolean
                  example: false
                  description: >-
                    Resolve the original request again instead of repeating the
                    exact rows that ran, so test cases added since are included.
                    On a run that scored existing sessions it also drops the
                    metrics the source recorded, so the repetition scores with
                    each specification's links as they stand today, which can
                    change the metric set and the credit cost. Defaults to
                    false, which keeps the repetition comparable with its
                    source.
      responses:
        '201':
          description: Run launched again successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RelaunchedRun'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    RelaunchedRun:
      type: object
      properties:
        id:
          type: string
          example: run_123
        productId:
          type: string
          example: product_123
        versionId:
          type: string
          nullable: true
          example: version_123
        userId:
          type: string
          nullable: true
          example: user_123
        ordinal:
          type: integer
          example: 42
          description: Per-product launch number, starting at 1 and never reused
        customId:
          type: string
          nullable: true
          example: nightly-regression
          description: Caller-supplied label
        relaunchedFromRunId:
          type: string
          nullable: true
          example: run_122
          description: The run this one repeats, when POST /runs/{id}/relaunch minted it
        openedBy:
          type: string
          enum:
            - LAUNCH
            - CALLER
          example: LAUNCH
          description: >-
            LAUNCH when a launch endpoint opened the run, which then closes when
            that launch ends. CALLER when POST /runs opened it, which only POST
            /runs/{id}/close ends.
        status:
          type: string
          enum:
            - RUNNING
            - COMPLETED
            - FAILED
            - CANCELLED
          example: COMPLETED
        evaluationCount:
          type: integer
          example: 120
          description: Evaluations this run launched
        sessionCount:
          type: integer
          example: 30
          description: Distinct sessions covered by the evaluations of this run
        kind:
          type: string
          nullable: true
          enum:
            - GENERATE_INFERENCES
            - EVALUATE_SESSION
            - EVALUATE_SESSION_BATCH
            - REPLAY_METRIC
            - null
          example: GENERATE_INFERENCES
          description: >-
            The shape of work the platform performed. Null on a run the caller
            opened, and on one several scoring calls filled.
        jobId:
          type: string
          nullable: true
          description: >-
            Queue job the run dispatched, when it queued one. Null on a run the
            caller opened, and on one several scoring calls filled.
        error:
          type: string
          nullable: true
          description: Why the run failed, when it did
        request:
          type: object
          nullable: true
          additionalProperties:
            nullable: true
          description: >-
            The launch request as the platform received it. Null on a run the
            caller opened, and on one several scoring calls filled.
        resolvedInputs:
          type: object
          nullable: true
          additionalProperties:
            nullable: true
          description: >-
            What the request resolved to at dispatch: test cases, sessions and
            metrics. Keys depend on `kind`. Null on a run the caller opened, and
            on one several scoring calls filled.
        createdAt:
          type: string
          format: date-time
        finishedAt:
          type: string
          format: date-time
          nullable: true
        deletedAt:
          type: string
          format: date-time
          nullable: true
        report:
          type: object
          nullable: true
          properties:
            sessionsEvaluated:
              type: integer
              example: 28
              description: Sessions the repetition scored
            sessionsFailed:
              type: integer
              example: 1
              description: Sessions the repetition tried to score and could not
            evaluationsCreated:
              type: integer
              example: 56
            failures:
              type: array
              items:
                type: object
                properties:
                  sessionId:
                    type: string
                  error:
                    type: string
                required:
                  - sessionId
                  - error
              description: One entry per failed session, naming why it failed
            message:
              type: string
              example: >-
                28 sessions evaluated, 56 evaluations created. 2 skipped: 2
                whose specification the run being repeated did not score.
              description: >-
                Human-readable outcome. A skipped session counts toward neither
                total, so this is the only place its cause is named.
          required:
            - sessionsEvaluated
            - sessionsFailed
            - evaluationsCreated
            - failures
            - message
          description: >-
            What the scoring did, for a repetition that scores sessions inside
            the request. Null when the repetition drives the agent again, whose
            work is queued and reports on the new run itself instead.
      required:
        - id
        - productId
        - versionId
        - userId
        - ordinal
        - customId
        - relaunchedFromRunId
        - openedBy
        - status
        - evaluationCount
        - sessionCount
        - kind
        - jobId
        - error
        - request
        - resolvedInputs
        - finishedAt
        - deletedAt
        - report
    Error:
      type: object
      properties:
        error:
          type: string
          example: Error type
        message:
          type: string
          example: Error message description
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key authorization. Pass your API key in the Authorization header as
        a Bearer token. Both new (`gsk_*`) and legacy (`gsk-`) API keys are
        accepted, e.g. `Authorization: Bearer gsk_...` or `Authorization: Bearer
        gsk-...`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.