> ## 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.

# Cancel run launch

> Stops one still-running launch of a run and the work behind it. Only a launch the platform queued can be cancelled; every other kind finishes inside the request that started it, so there is nothing left to stop. Sessions and evaluations already created are kept.



## OpenAPI

````yaml https://api.galtea.ai/openapi.json post /runs/{id}/launches/{launchId}/cancel
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}/launches/{launchId}/cancel:
    post:
      tags:
        - runs
      summary: Cancel run launch
      description: >-
        Stops one still-running launch of a run and the work behind it. Only a
        launch the platform queued can be cancelled; every other kind finishes
        inside the request that started it, so there is nothing left to stop.
        Sessions and evaluations already created are kept.
      operationId: cancelRunLaunch
      parameters:
        - schema:
            type: string
            description: Run ID
            example: run_123
          required: true
          description: Run ID
          name: id
          in: path
        - schema:
            type: string
            description: Launch ID
            example: runLaunch_123
          required: true
          description: Launch ID
          name: launchId
          in: path
      responses:
        '200':
          description: Launch cancelled successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Run'
        '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'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    Run:
      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
            its last 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
        createdAt:
          type: string
          format: date-time
        finishedAt:
          type: string
          format: date-time
          nullable: true
        deletedAt:
          type: string
          format: date-time
          nullable: true
        launches:
          type: array
          items:
            $ref: '#/components/schemas/RunLaunch'
          description: >-
            The launches the platform performed inside this run, oldest first.
            Single-run reads only.
      required:
        - id
        - productId
        - versionId
        - userId
        - ordinal
        - customId
        - relaunchedFromRunId
        - openedBy
        - status
        - evaluationCount
        - sessionCount
        - finishedAt
        - deletedAt
    Error:
      type: object
      properties:
        error:
          type: string
          example: Error type
        message:
          type: string
          example: Error message description
    RunLaunch:
      type: object
      properties:
        id:
          type: string
          example: runLaunch_123
        runId:
          type: string
          example: run_123
        kind:
          type: string
          enum:
            - GENERATE_INFERENCES
            - EVALUATE_SESSION
            - EVALUATE_SESSION_BATCH
            - REPLAY_METRIC
          example: GENERATE_INFERENCES
          description: The shape of work this launch performed
        jobId:
          type: string
          nullable: true
          description: Queue job that carried this launch, when it was queued
        status:
          type: string
          enum:
            - RUNNING
            - COMPLETED
            - FAILED
            - CANCELLED
          example: COMPLETED
        error:
          type: string
          nullable: true
          description: Why the launch failed, when it did
        request:
          type: object
          additionalProperties:
            nullable: true
          description: The launch request as the platform received it
        resolvedInputs:
          type: object
          additionalProperties:
            nullable: true
          description: >-
            What the request resolved to at dispatch: test cases, sessions and
            metrics. Keys depend on `kind`.
        createdAt:
          type: string
          format: date-time
        finishedAt:
          type: string
          format: date-time
          nullable: true
      required:
        - id
        - runId
        - kind
        - jobId
        - status
        - error
        - request
        - resolvedInputs
        - finishedAt
  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-...`.

````