> ## 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.

# Get job details

> Get the job. You can know when the job is finished by checking it's status attribute. Once the job is completed, the previously `null` `output_video` attribute will be populated with the enhanced video metadata.


> **ℹ️ NOTE**: Jobs can sometimes be in `IN_QUEUE` status for a few minutes. This happens when we're spinning up new GPU instances to cover the requests demand.



## OpenAPI

````yaml https://backend.tensorpix.ai/api/schema/ get /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}/:
    get:
      tags:
        - jobs
      summary: Get job details
      description: >-
        Get the job. You can know when the job is finished by checking it's
        status attribute. Once the job is completed, the previously `null`
        `output_video` attribute will be populated with the enhanced video
        metadata.



        > **ℹ️ NOTE**: Jobs can sometimes be in `IN_QUEUE` status for a few
        minutes. This happens when we're spinning up new GPU instances to cover
        the requests demand.
      operationId: jobs_retrieve
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Job'
          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: ''
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitError'
          description: ''
      security:
        - tokenAuth: []
components:
  schemas:
    Job:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        started:
          type: string
          format: date-time
          readOnly: true
          description: Job's start time
        preview:
          type: boolean
          readOnly: true
          description: >-
            Flag which denotes if job is free preview job or not. Free preview
            jobs are not charged but the output video is watermarked and only a
            short video segment is enhanced.
        description:
          type: string
          readOnly: true
          description: Job description
        cost_usd:
          type: string
          format: decimal
          pattern: ^-?\d{0,6}(?:\.\d{0,4})?$
          readOnly: true
          description: Job cost in 🪙 Credits.
        status:
          allOf:
            - $ref: '#/components/schemas/StatusEnum'
          readOnly: true
          description: |-
            Job's status

            * `0` - In Queue
            * `1` - Processing
            * `2` - Finished
            * `-1` - Failed
            * `-2` - Canceled
        eta_s:
          type: number
          format: double
          readOnly: true
          description: >-
            Job's estimated time of arrival in seconds. ETA is only an
            approximation and it can flactuate a lot. ETA is usually more
            accurate when the job is longer and has been running for a while.
        finished:
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
          description: Job's finished time
        processing_progress:
          type: number
          format: double
          readOnly: true
          description: Job's progress ratio in the range [0, 1].
        input_video:
          allOf:
            - $ref: '#/components/schemas/Video'
          readOnly: true
        output_video:
          allOf:
            - $ref: '#/components/schemas/RestoredVideo'
          readOnly: true
        ml_models:
          type: array
          items:
            $ref: '#/components/schemas/MLModelList'
          readOnly: true
        grain:
          type: number
          format: double
          readOnly: true
          description: >-
            Grain amount to add to the enhanced video in range [0, 1]. 0 is
            default.
        codec:
          allOf:
            - $ref: '#/components/schemas/CodecEnum'
          readOnly: true
          description: |-
            Codec used for the Enhanced video.

            * `libx264` - H264
            * `libx265` - HEVC/H265
            * `prores_ks` - Apple ProRes
        output_resolution:
          allOf:
            - $ref: '#/components/schemas/OutputResolutionEnum'
          readOnly: true
        comparison:
          type: boolean
          readOnly: true
          description: >-
            Flag which denotes if the output video will be side by side video of
            the original and enhanced video.
        stabilization_smoothing:
          type: integer
          readOnly: true
          description: >-
            If AI Stabilization filter is enabled, this parameter controls the
            intensity of stabilization. Ignored if AI Stabilization is disabled.
            Use higher values for very shaky videos, and lower strength for less
            shaky videos. Video may be zoomed in if the video is very shaky.
        fps_interpolation_factor:
          type: number
          format: double
          readOnly: true
          description: >-
            Framerate interpolation factor. E.g. 1.5 means the video will have
            1.5x the AI interpolated framerate. 1.0 means the framerate will not
            be changed. **IMPORTANT**: Won't be applied if the FPS BOOST model
            isn't passed in `ml_models.`
        playback_speed:
          type: number
          format: double
          readOnly: true
          description: >-
            Playback speed of the video. 1.0 means the video will play at normal
            speed. 0.5 means the video will play at half speed with AI
            interpolated frames in between. **IMPORTANT**: Won't be applied if
            the SLOW MOTION model isn's passed in `ml_models.`
        sharpen_strength:
          type: number
          format: double
          readOnly: true
          description: >-
            If AI Sharpen filter is enabled, this parameter controls the
            intensity of sharpening. Ignored if AI Sharpen filter is disabled.
        start_frame:
          type:
            - integer
            - 'null'
          readOnly: true
          description: Cuts the video starting from this frame before enhancing it.
        end_frame:
          type:
            - integer
            - 'null'
          readOnly: true
          description: Cuts the video ending on this frame before enhancing it.
      required:
        - codec
        - comparison
        - cost_usd
        - description
        - end_frame
        - eta_s
        - finished
        - fps_interpolation_factor
        - grain
        - id
        - input_video
        - ml_models
        - output_resolution
        - output_video
        - playback_speed
        - preview
        - processing_progress
        - sharpen_strength
        - stabilization_smoothing
        - start_frame
        - started
        - status
    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
    RateLimitError:
      type: object
      properties:
        detail:
          type: string
      required:
        - detail
    StatusEnum:
      enum:
        - 0
        - 1
        - 2
        - -1
        - -2
      type: integer
      description: |-
        * `0` - In Queue
        * `1` - Processing
        * `2` - Finished
        * `-1` - Failed
        * `-2` - Canceled
    Video:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          readOnly: true
          description: Media name
        width:
          type:
            - integer
            - 'null'
          readOnly: true
          description: Width of the video in pixels
        height:
          type:
            - integer
            - 'null'
          readOnly: true
          description: Height of the video in pixels
        created_at:
          type: string
          format: date-time
          readOnly: true
          description: Date when the media was created
        n_frames:
          type:
            - integer
            - 'null'
          readOnly: true
          description: Number of frames in the video
        framerate:
          type:
            - number
            - 'null'
          format: double
          readOnly: true
          description: Video framerate in frames per second
        size:
          type:
            - integer
            - 'null'
          readOnly: true
          description: Size of the video in bytes
        file:
          type:
            - string
            - 'null'
          format: uri
          description: >-
            Pre-signed uploaded video URL. The URL may expire after some time.
            To generate a new URL, call the endpoint again. If the field is
            `null`, it means the video hasn't been completely uploaded to our
            servers yet. The field can also be `null` if the video was enhanced
            using the /jobs/from-url endpoint. In that case the video is not
            stored on our servers and the field is `null`
        owner:
          type: string
          format: email
          title: Email address
          readOnly: true
        thumbnail:
          type:
            - string
            - 'null'
          format: uri
          readOnly: true
          description: >-
            Thumbnail of the video. `null` if the video was enhanced with the
            /jobs/from-url endpoint
        external_url:
          type:
            - string
            - 'null'
          format: uri
          readOnly: true
        bitrate:
          type:
            - integer
            - 'null'
          readOnly: true
          description: Video bitrate in bits per second
        codec_id:
          type:
            - string
            - 'null'
          readOnly: true
        bit_depth:
          type:
            - integer
            - 'null'
          readOnly: true
          description: Bit depth of the video
        chroma_subsampling:
          type:
            - string
            - 'null'
          readOnly: true
        color_space:
          type:
            - string
            - 'null'
          readOnly: true
      required:
        - bit_depth
        - bitrate
        - chroma_subsampling
        - codec_id
        - color_space
        - created_at
        - external_url
        - framerate
        - height
        - id
        - n_frames
        - name
        - owner
        - size
        - thumbnail
        - width
    RestoredVideo:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        job_id:
          type:
            - integer
            - 'null'
          readOnly: true
        preview_videos:
          $ref: '#/components/schemas/PreviewVideosSerialiazer'
        name:
          type: string
          description: Media name
          maxLength: 1024
        created_at:
          type: string
          format: date-time
          readOnly: true
          description: Date when the media was created
        deleted:
          type:
            - string
            - 'null'
          format: date-time
          description: Datetime when the media was deleted. Null if not deleted.
        framerate:
          type:
            - number
            - 'null'
          format: double
          maximum: 1000
          minimum: 0
          description: Video framerate in frames per second
        n_frames:
          type:
            - integer
            - 'null'
          maximum: 2147483647
          minimum: 1
          description: Number of frames in the video
        bitrate:
          type:
            - integer
            - 'null'
          maximum: 9223372036854776000
          minimum: 1
          format: int64
          description: Video bitrate in bits per second
        codec_id:
          type:
            - string
            - 'null'
        bit_depth:
          type:
            - integer
            - 'null'
          maximum: 30
          minimum: 1
          description: Bit depth of the video
        chroma_subsampling:
          type:
            - string
            - 'null'
        color_space:
          type:
            - string
            - 'null'
        size:
          type:
            - integer
            - 'null'
          maximum: 400000000000
          minimum: 100
          format: int64
          description: Size of the video in bytes
        file:
          type:
            - string
            - 'null'
          format: uri
          description: >-
            Pre-signed uploaded video URL. The URL may expire after some time.
            To generate a new URL, call the endpoint again. If the field is
            `null`, it means the video hasn't been completely uploaded to our
            servers yet. The field can also be `null` if the video was enhanced
            using the /jobs/from-url endpoint. In that case the video is not
            stored on our servers and the field is `null`
        thumbnail:
          type:
            - string
            - 'null'
          format: uri
          description: >-
            Thumbnail of the video. `null` if the video was enhanced with the
            /jobs/from-url endpoint
        width:
          type: integer
          maximum: 8192
          minimum: 64
        height:
          type: integer
          maximum: 8192
          minimum: 64
        quality_score:
          type:
            - integer
            - 'null'
          maximum: 5
          minimum: 1
          description: >-
            User rated quality score of the enhanced video. 1 is the worst, 5
            the best. Null if the video is not rated yet.
        owner:
          type: integer
          description: User who owns this media
      required:
        - created_at
        - height
        - id
        - job_id
        - name
        - owner
        - preview_videos
        - width
    MLModelList:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          readOnly: true
          description: Model name
        task:
          allOf:
            - $ref: '#/components/schemas/TaskEnum'
          readOnly: true
          description: |-
            Task (filter) used for video enhancement.

            * `1` - Super Resolution
            * `2` - Film damage
            * `3` - Denoise
            * `4` - Sharpen
            * `5` - VHS Prettify
            * `6` - Dropouts Buster
            * `7` - Auto Color Balance
            * `8` - Decompressor
            * `9` - Deinterlace
            * `10` - FPS Interpolation
            * `11` - Slow Motion
            * `12` - Face Enhance
            * `13` - Stabilization
            * `14` - Audio Denoise
            * `15` - Low Light Enhance
        cost_weight:
          type: number
          format: double
          readOnly: true
          description: >-
            Model's impact on the job cost. The higher the weight, the more the
            job will cost if this model is used.
        upscale_factor:
          type: integer
          readOnly: true
          description: >-
            Video upscale factor. E.g. 2 means the 512x512 px video becomes
            1024x1024 px. Ignored if the Super Resolution model is not present.
        fps_boost_factor:
          type: integer
          readOnly: true
          description: >-
            DEPRECATED. See Job's `fps_interpolation_factor`. How much the video
            framerate will be increased. Ignored if the framerate interpolation
            model is not present.
        priority:
          type: integer
          readOnly: true
          description: >-
            ML model execution priority. Used internally to determine the order
            of models execution. Lower value means earlier execution.
        max_resolution:
          type: integer
          readOnly: true
          description: >-
            Maximum input video resolution the ML model supports (in pixels).
            E.g. 4X upscale models don't support input video resolutions higher
            than 1280x720 px.
      required:
        - cost_weight
        - fps_boost_factor
        - id
        - max_resolution
        - name
        - priority
        - task
        - upscale_factor
    CodecEnum:
      enum:
        - libx264
        - libx265
        - prores_ks
      type: string
      description: |-
        * `libx264` - H264
        * `libx265` - HEVC/H265
        * `prores_ks` - Apple ProRes
    OutputResolutionEnum:
      enum:
        - -1
        - 640
        - 720
        - 854
        - 1280
        - 1920
        - 2048
        - 2560
        - 3840
      type: integer
      description: |-
        * `-1` - No Resize
        * `640` - 360p
        * `720` - SD
        * `854` - HQ
        * `1280` - 720p
        * `1920` - 1080p
        * `2048` - 2K
        * `2560` - QHD
        * `3840` - 4K
    PreviewVideosSerialiazer:
      type: object
      properties:
        before_video:
          type:
            - string
            - 'null'
          format: uri
          readOnly: true
          description: Before video
        after_video:
          type:
            - string
            - 'null'
          format: uri
          readOnly: true
          description: After video
      required:
        - after_video
        - before_video
    TaskEnum:
      enum:
        - 1
        - 2
        - 3
        - 4
        - 5
        - 6
        - 7
        - 8
        - 9
        - 10
        - 11
        - 12
        - 13
        - 14
        - 15
      type: integer
      description: |-
        * `1` - Super Resolution
        * `2` - Film damage
        * `3` - Denoise
        * `4` - Sharpen
        * `5` - VHS Prettify
        * `6` - Dropouts Buster
        * `7` - Auto Color Balance
        * `8` - Decompressor
        * `9` - Deinterlace
        * `10` - FPS Interpolation
        * `11` - Slow Motion
        * `12` - Face Enhance
        * `13` - Stabilization
        * `14` - Audio Denoise
        * `15` - Low Light Enhance
  securitySchemes:
    tokenAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Token-based authentication with required prefix "Token"

````