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

# Stop the job

> Stops the job if it's processing. The job status becomes cancelled and the job stops
executing.

If the job is currently processing and then cancelled, most of the 🪙 Credits will be refunded.

## Error codes

`409` code if the job has already been canceled.

`500` code if we fail to cancel the job. The job isn't cancelled in this case.



## OpenAPI

````yaml https://backend.tensorpix.ai/api/schema/ delete /api/jobs/{id}/
openapi: 3.1.0
info:
  title: TensorPix OpenAPI Documentation
  version: 1.1.0
  termsOfService: https://tensorpix.ai/terms-conditions
  contact:
    name: TensorPix Dev Team
    email: devs@tensorpix.ai
servers:
  - url: https://backend.tensorpix.ai
security: []
externalDocs:
  url: https://docs.tensorpix.ai
  description: Check out the full TensorPix documentation.
paths:
  /api/jobs/{id}/:
    delete:
      tags:
        - jobs
      summary: Stop the job
      description: >-
        Stops the job if it's processing. The job status becomes cancelled and
        the job stops

        executing.


        If the job is currently processing and then cancelled, most of the 🪙
        Credits will be refunded.


        ## Error codes


        `409` code if the job has already been canceled.


        `500` code if we fail to cancel the job. The job isn't cancelled in this
        case.
      operationId: jobs_destroy
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          required: true
      responses:
        '204':
          description: No response body
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: ''
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericError'
          description: ''
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitError'
          description: ''
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericError'
          description: ''
      security:
        - tokenAuth: []
components:
  schemas:
    ValidationError:
      type: object
      properties:
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
        non_field_errors:
          type: array
          items:
            type: string
      required:
        - errors
        - non_field_errors
    UnauthenticatedError:
      type: object
      properties:
        detail:
          type: string
      required:
        - detail
    ForbiddenError:
      type: object
      properties:
        detail:
          type: string
      required:
        - detail
    NotFoundError:
      type: object
      properties:
        detail:
          type: string
      required:
        - detail
    GenericError:
      type: object
      properties:
        detail:
          type: string
      required:
        - detail
    RateLimitError:
      type: object
      properties:
        detail:
          type: string
      required:
        - detail
  securitySchemes:
    tokenAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Token-based authentication with required prefix "Token"

````