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

# Cancel Training

> Cancel a training job



## OpenAPI

````yaml post /training/cancel
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /training/cancel:
    post:
      tags:
        - training
      summary: Cancel Training
      description: Cancel a training job
      operationId: cancel_training_training_cancel_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CancelTrainingRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    CancelTrainingRequest:
      properties:
        training_id:
          description: ID of the training to cancel.
          title: Training Id
          type: integer
      required:
        - training_id
      title: CancelTrainingRequest
      type: object
    StatusResponse:
      additionalProperties: true
      description: Default response. May contain other fields.
      properties:
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
        status:
          default: ok
          enum:
            - ok
            - error
          title: Status
          type: string
      title: StatusResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object

````