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

# Cancel Training Request

> Cancel a dreambooth training request.

## Request

Send a `POST` request to below endpoint.
Where `{training_id}` is the one returned in the response upon initiating the model training.

```curl curl theme={null}
--request POST 'https://modelslab.com/api/v3/cancle_training/{training_id}' \
```

## Body

```json json theme={null}
{ 
    "key": ""
}
```


## OpenAPI

````yaml POST /cancel_training/{training_id}
openapi: 3.0.3
info:
  title: ModelsLab Training API
  description: >-
    API endpoints for training LoRA models, managing training processes, and
    handling training-related operations.
  version: 3.0.0
  contact:
    name: ModelsLab Support
    url: https://modelslab.com
servers:
  - url: https://modelslab.com/api/v3
    description: V3 API Endpoints
security: []
tags:
  - name: Training
    description: Operations for training LoRA models and managing training processes
  - name: Model Management
    description: Operations for managing trained models
  - name: Utilities
    description: Utility operations for image processing and preparation
paths:
  /cancel_training/{training_id}:
    post:
      tags:
        - Training
      summary: Cancel Training Request
      description: >-
        Cancel a Dreambooth request. Where {training_id} is the one returned in
        the response upon initiating the model training using the create
        training endpoint.
      operationId: cancelTraining
      parameters:
        - name: training_id
          in: path
          required: true
          description: The unique identifier for the training job to cancel
          schema:
            type: string
            example: F5jvdzGnYi
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiKeyRequest'
      responses:
        '200':
          description: Training cancelled successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BasicResponse'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    ApiKeyRequest:
      type: object
      required:
        - key
      properties:
        key:
          type: string
          description: Your API Key used for request authorization
          example: ''
    BasicResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - success
            - error
        messege:
          type: string
          description: Response message
        data:
          type: string
          description: Additional response data
    Error:
      type: object
      properties:
        status:
          type: string
          example: error
        messege:
          type: string
          description: Error description
        code:
          type: integer
          description: Error code
  responses:
    NotFound:
      description: Not found - Training ID does not exist
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'

````