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

# Stop Job



## OpenAPI

````yaml https://api.dispersed.com/openapi.json put /v1/jobs/{uuid}/cancel
openapi: 3.1.0
info:
  title: Dispersed API
  version: 1.0.0
servers:
  - url: https://api.dispersed.com
security: []
paths:
  /v1/jobs/{uuid}/cancel:
    put:
      tags:
        - Jobs
      summary: Stop Job
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          name: uuid
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CancelJobRequest'
      responses:
        '200':
          description: Job cancelled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    CancelJobRequest:
      type: object
      properties:
        reason:
          type: string
          example: Cancelled by user
    JobResponse:
      type: object
      properties:
        uuid:
          type:
            - string
            - 'null'
        object:
          type: string
          enum:
            - job
        created_at:
          type:
            - string
            - 'null'
          format: date-time
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
        status:
          type: string
          enum:
            - PENDING
            - ASSIGNED
            - RUNNING
            - COMPLETED
            - CANCELLED
            - FAILED
        task:
          type: string
          enum:
            - BATCH
            - PERSISTENT
        started_at:
          type:
            - string
            - 'null'
          format: date-time
        completed_at:
          type:
            - string
            - 'null'
          format: date-time
        title:
          type: string
        description:
          type:
            - string
            - 'null'
        cpu_count:
          type:
            - number
            - 'null'
        gpu_count:
          type:
            - number
            - 'null'
        gpu_name:
          type:
            - string
            - 'null'
        gpu_registry_uuid:
          type:
            - string
            - 'null'
        min_ram_gb:
          type: number
        min_vram_gb:
          type: number
        min_storage_gb:
          type: number
        max_timeout_assign_ms:
          type:
            - number
            - 'null'
        max_timeout_run_ms:
          type:
            - number
            - 'null'
        max_timeout_start_ms:
          type:
            - number
            - 'null'
        max_retry_count:
          type:
            - number
            - 'null'
        max_node_count:
          type:
            - number
            - 'null'
        image_size_bytes:
          type:
            - number
            - 'null'
        allowed_region_codes:
          type: array
          items:
            $ref: '#/components/schemas/RegionCode'
          default: []
        parameters:
          type: object
          properties:
            parameters:
              type: object
              properties:
                allowed_ips:
                  type: array
                  items:
                    type: string
                  description: >-
                    Array of IPs allowed to access the container (if any).
                    Accepts comma-separated string or array. If not specified,
                    the container is accessible from any IP address.
                env:
                  type: object
                  additionalProperties:
                    type: string
                  description: Key-value pairs for container environment variables.
                host:
                  type: string
                  description: >-
                    Custom registry host. If not specified, the default Docker
                    Hub registry is used. Only applicable when using `image`.
                image:
                  type: string
                  minLength: 1
                  description: >-
                    The Docker image to use for the container (e.g., "nginx",
                    "myregistry/myimage"). Mutually exclusive with `imagesrc` -
                    provide one or the other.
                imagesrc:
                  type: string
                  format: uri
                  description: >-
                    Signed HTTPS URL to download a Docker Image Archive (.tar
                    file). Mutually exclusive with `image` - provide one or the
                    other. When using imagesrc, `tag` is not applicable.
                ports:
                  type: array
                  items:
                    type: number
                  description: >-
                    Array of ports to expose from the container (if any). If not
                    specified, no ports are exposed.
                secret:
                  type: string
                  description: >-
                    Secret for private registry authentication (if any).
                    Required if the image is hosted on a private registry. Only
                    applicable when using `image`.
                sshkey:
                  type: string
                  description: >-
                    SSH public key to be added to the container for SSH access
                    (if any). This public key will be passed to the container as
                    `SSH_PUBKEY` environment variable. You must configure your
                    container `~/.ssh/authorized_keys` to allow access.
                tag:
                  type: string
                  description: >-
                    The tag of the Docker image to use. If not specified,
                    defaults to "latest" on creation. Only applicable when using
                    `image`, not `imagesrc`.
                user:
                  type: string
                  description: >-
                    Username for private registry authentication (if any).
                    Required if the image is hosted on a private registry. Only
                    applicable when using `image`.
                volumes:
                  type: array
                  items:
                    type: object
                    properties:
                      image:
                        type: string
                      mount:
                        type: string
                      registry:
                        type: string
                      secret:
                        type: string
                      tag:
                        type: string
                      user:
                        type: string
                  description: >-
                    Array of volume definitions to mount into the container (if
                    any). Each volume can optionally specify an image, mount
                    point, registry, tag, user, and secret for private registry
                    authentication.
            type:
              type: string
              enum:
                - docker
          required:
            - parameters
            - type
        container_access_tokens:
          type: array
          items:
            type: object
            properties:
              label:
                type: string
              token:
                type: string
            required:
              - label
              - token
          default: []
        status_reason:
          type:
            - string
            - 'null'
        source_recipe_uuid:
          type:
            - string
            - 'null'
        timeout_assign_at_ms:
          type:
            - number
            - 'null'
      required:
        - object
        - created_at
        - updated_at
        - status
        - task
        - title
        - cpu_count
        - gpu_count
        - min_ram_gb
        - min_vram_gb
        - min_storage_gb
        - parameters
        - timeout_assign_at_ms
    ErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/Error'
      required:
        - error
    RegionCode:
      type:
        - string
        - 'null'
      enum:
        - ca-central-1
        - ca-west-1
        - mx-central-1
        - sa-east-1
        - us-east-1
        - us-east-2
        - us-west-1
        - us-west-2
        - eu-central-1
        - eu-central-2
        - eu-north-1
        - eu-south-1
        - eu-south-2
        - eu-west-1
        - eu-west-2
        - eu-west-3
        - ap-east-1
        - ap-east-2
        - ap-northeast-1
        - ap-northeast-2
        - ap-northeast-3
        - ap-south-1
        - ap-south-2
        - ap-southeast-1
        - ap-southeast-2
        - ap-southeast-3
        - ap-southeast-4
        - ap-southeast-5
        - ap-southeast-6
        - ap-southeast-7
        - cn-north-1
        - cn-northwest-1
        - af-south-1
        - il-central-1
        - me-central-1
        - me-south-1
        - null
      default: null
      description: Coarse geographic-network region identifier (AWS-style naming).
      example: us-west-2
    Error:
      type: object
      properties:
        code:
          type: string
        details:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
              expected:
                type: string
              input:
                type: string
              keys:
                type: array
                items:
                  type: string
              message:
                type: string
              path:
                type: array
                items:
                  anyOf:
                    - type: string
                    - type: number
            required:
              - message
              - path
          default: []
        message:
          type: string
        status:
          type: number
        timestamp:
          type: string
      required:
        - code
        - message
        - status
        - timestamp

````