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

# Pull job output files

> Download job output files. For jobs with live instance access, returns an rsync command for direct file transfer. For completed/failed/canceled jobs, returns presigned S3 URLs for each output file. Supports dry-run mode.



## OpenAPI

````yaml https://engine.tensorpool.dev/openapi.json get /job/pull/{job_id}
openapi: 3.1.0
info:
  title: TensorPool API
  description: >
    TensorPool API


    All API endpoints (except `/healthz`) require authentication using your
    TensorPool API key.


    ### For REST Endpoints


    Include your API key in the `Authorization` header as a Bearer token:


    ```bash

    Authorization: Bearer YOUR_TENSORPOOL_KEY

    ```

    ### For WebSocket Endpoints


    Send your API key as the first message in JSON format:


    ```json

    {"TENSORPOOL_KEY": "YOUR_TENSORPOOL_KEY"}

    ```
  version: 0.1.0
servers: []
security: []
tags:
  - name: job
    description: >-
      GPU job execution and management. Run workloads on ephemeral clusters with
      automatic cleanup.
  - name: cluster
    description: >-
      GPU cluster provisioning and lifecycle management. Create persistent
      compute resources.
  - name: storage
    description: >-
      Shared storage volume management. Persistent storage that can be attached
      to eligible clusters.
  - name: object-storage
    description: S3-compatible object storage management.
  - name: ssh
    description: SSH key management for secure cluster access.
  - name: user
    description: >-
      User account management including balance, billing, and organization
      operations.
  - name: requests
    description: Cloud resource provisioning request tracking and status monitoring.
paths:
  /job/pull/{job_id}:
    get:
      tags:
        - job
      summary: Pull job output files
      description: >-
        Download job output files. For jobs with live instance access, returns
        an rsync command for direct file transfer. For completed/failed/canceled
        jobs, returns presigned S3 URLs for each output file. Supports dry-run
        mode.
      operationId: job_pull_job_pull__job_id__get
      parameters:
        - name: job_id
          in: path
          required: true
          schema:
            type: string
            title: Job Id
        - name: system
          in: query
          required: false
          schema:
            anyOf:
              - enum:
                  - windows
                  - linux
                  - darwin
                type: string
              - type: 'null'
            description: Operating system type for command generation
            title: System
          description: Operating system type for command generation
        - name: private_key_path
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Path to SSH private key file for rsync
            title: Private Key Path
          description: Path to SSH private key file for rsync
        - name: dry_run
          in: query
          required: false
          schema:
            type: boolean
            description: Dry run mode - show files without URLs
            default: false
            title: Dry Run
          description: Dry run mode - show files without URLs
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobPullResponse'
        '400':
          description: >-
            Job in invalid state for pulling files, or missing required
            parameters
        '403':
          description: Access denied - job not owned by user or organization
        '404':
          description: Job not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Failed to generate download mechanism
      security:
        - HTTPBearer: []
components:
  schemas:
    JobPullResponse:
      properties:
        message:
          type: string
          title: Message
          description: Status message or instructions
        download_map:
          anyOf:
            - additionalProperties:
                anyOf:
                  - type: string
                  - type: 'null'
              type: object
            - type: 'null'
          title: Download Map
          description: >-
            Map of file paths to signed download URLs (for completed jobs).
            Values are None for dry-run requests, presigned URLs otherwise.
        command:
          anyOf:
            - type: string
            - type: 'null'
          title: Command
          description: Rsync command to execute (for jobs with live instance access)
        command_show_stdout:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Command Show Stdout
          description: Whether to show command stdout to user
      type: object
      required:
        - message
      title: JobPullResponse
      description: Response model for GET /job/pull/{job_id} endpoint.
    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:
    HTTPBearer:
      type: http
      scheme: bearer

````