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

# Cancel Job

> Cancel a queued batch job. Already-processing or done jobs cannot be cancelled.



## OpenAPI

````yaml /api/lapathoniia-openapi.json post /batch/jobs/{job_id}/cancel
openapi: 3.1.0
info:
  title: Lapathoniia API
  version: 1.0.0
  description: |-
    Lapathoniia Chat, Batch and User API.

    Base URL: `https://app.lapathoniia.top`

    All endpoints require a Bearer API key except `/health`.
servers:
  - url: https://app.lapathoniia.top
    description: Production
security:
  - bearerAuth: []
paths:
  /batch/jobs/{job_id}/cancel:
    post:
      tags:
        - batch
      summary: Cancel Job
      description: >-
        Cancel a queued batch job. Already-processing or done jobs cannot be
        cancelled.
      operationId: cancel_job_batch_jobs__job_id__cancel_post
      parameters:
        - name: job_id
          in: path
          required: true
          schema:
            type: string
            title: Job Id
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStatusResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    JobStatusResponse:
      properties:
        id:
          type: string
          title: Id
        status:
          type: string
          title: Status
        job_type:
          type: string
          title: Job Type
        model:
          type: string
          title: Model
        input_type:
          type: string
          title: Input Type
        filename:
          anyOf:
            - type: string
            - type: 'null'
          title: Filename
        priority:
          type: integer
          title: Priority
        retry_count:
          type: integer
          title: Retry Count
        max_retries:
          type: integer
          title: Max Retries
        result:
          anyOf:
            - type: object
            - type: 'null'
          title: Result
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
        drive_folder_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Drive Folder Id
        drive_result_file_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Drive Result File Id
        pipeline:
          anyOf:
            - type: string
            - type: 'null'
          title: Pipeline
        pipeline_instruction:
          anyOf:
            - type: string
            - type: 'null'
          title: Pipeline Instruction
        parent_job_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent Job Id
        created_at:
          type: string
          title: Created At
        started_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Started At
        completed_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Completed At
      type: object
      required:
        - id
        - status
        - job_type
        - model
        - input_type
        - filename
        - priority
        - retry_count
        - max_retries
        - result
        - error
        - drive_folder_id
        - drive_result_file_id
        - pipeline
        - pipeline_instruction
        - parent_job_id
        - created_at
        - started_at
        - completed_at
      title: JobStatusResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: sk-...

````