PeerTube Runner Jobs API

Manage runner jobs and runner-side job execution.

Operations 14

POST /api/v1/runners/jobs/request Request a new job #
POST /api/v1/runners/jobs/{jobUUID}/accept Accept job #
POST /api/v1/runners/jobs/{jobUUID}/abort Abort job #
POST /api/v1/runners/jobs/{jobUUID}/update Update job #
POST /api/v1/runners/jobs/{jobUUID}/error Post job error #
POST /api/v1/runners/jobs/{jobUUID}/success Post job success #
POST /api/v1/runners/jobs/{jobUUID}/files/videos/{videoIdOrUUID}/max-quality/audio Download the max-quality audio file for a job video #
POST /api/v1/runners/jobs/{jobUUID}/files/videos/{videoIdOrUUID}/max-quality Download the max-quality video file for a job video #
POST /api/v1/runners/jobs/{jobUUID}/files/videos/{videoIdOrUUID}/thumbnails/max-quality Download the max-quality thumbnail for a job video #
POST /api/v1/runners/jobs/{jobUUID}/files/videos/{videoIdOrUUID}/previews/max-quality Download the max-quality preview for a job video #
POST /api/v1/runners/jobs/{jobUUID}/files/videos/{videoIdOrUUID}/studio/task-files/{filename} Download a video studio task file for a job video #
POST /api/v1/runners/jobs/{jobUUID}/cancel Cancel a job #
DELETE /api/v1/runners/jobs/{jobUUID} Delete a job #
GET /api/v1/runners/jobs List jobs #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/peertube-runner-jobs-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

peertube-runner-jobs-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: PeerTube Runner Jobs API
  version: 8.1.0
  contact:
    name: PeerTube Community
    url: https://joinpeertube.org
  license:
    name: AGPLv3.0
    url: https://github.com/Chocobozzz/PeerTube/blob/master/LICENSE
  x-logo:
    url: https://joinpeertube.org/img/brand.png
    altText: PeerTube Project Homepage
  description: The PeerTube API is built on HTTP(S) and is RESTful.
servers:
- url: https://peertube2.cpy.re
  description: Live Test Server (live data - latest nightly version)
- url: https://peertube3.cpy.re
  description: Live Test Server (live data - latest RC version)
- url: https://peertube.cpy.re
  description: Live Test Server (live data - stable version)
tags:
- name: Runner Jobs
  description: Manage runner jobs and runner-side job execution.
paths:
  /api/v1/runners/jobs/request:
    post:
      summary: Request a new job
      description: API used by PeerTube runners
      tags:
      - Runner Jobs
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                runnerToken:
                  type: string
                jobTypes:
                  type: array
                  description: Filter jobs depending on their types
                  items:
                    type: string
              required:
              - runnerToken
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  availableJobs:
                    type: array
                    items:
                      type: object
                      properties:
                        uuid:
                          $ref: '#/components/schemas/UUIDv4'
                        type:
                          $ref: '#/components/schemas/RunnerJobType'
                        payload:
                          $ref: '#/components/schemas/RunnerJobPayload'
      operationId: postApiV1RunnersJobsRequest
      x-operation-id-source: derived
  /api/v1/runners/jobs/{jobUUID}/accept:
    post:
      summary: Accept job
      description: API used by PeerTube runners
      tags:
      - Runner Jobs
      parameters:
      - $ref: '#/components/parameters/jobUUID'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                runnerToken:
                  type: string
              required:
              - runnerToken
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  job:
                    allOf:
                    - $ref: '#/components/schemas/RunnerJob'
                    - type: object
                      properties:
                        jobToken:
                          type: string
      operationId: postApiV1RunnersJobsByJobUUIDAccept
      x-operation-id-source: derived
  /api/v1/runners/jobs/{jobUUID}/abort:
    post:
      summary: Abort job
      description: API used by PeerTube runners
      tags:
      - Runner Jobs
      parameters:
      - $ref: '#/components/parameters/jobUUID'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                runnerToken:
                  type: string
                jobToken:
                  type: string
                reason:
                  type: string
                  description: Why the runner aborts this job
              required:
              - runnerToken
              - jobToken
              - reason
      responses:
        '204':
          description: successful operation
      operationId: postApiV1RunnersJobsByJobUUIDAbort
      x-operation-id-source: derived
  /api/v1/runners/jobs/{jobUUID}/update:
    post:
      summary: Update job
      description: API used by PeerTube runners
      tags:
      - Runner Jobs
      parameters:
      - $ref: '#/components/parameters/jobUUID'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                runnerToken:
                  type: string
                jobToken:
                  type: string
                progress:
                  type: integer
                  description: Update job progression percentage (optional)
                payload:
                  anyOf:
                  - type: object
                    description: Provide live transcoding chunks update
                    properties:
                      type:
                        type: string
                        enum:
                        - add-chunk
                        - remove-chunk
                      masterPlaylistFile:
                        type: string
                        format: binary
                      resolutionPlaylistFile:
                        type: string
                        format: binary
                      resolutionPlaylistFilename:
                        type: string
                      videoChunkFile:
                        type: string
                        format: binary
                      videoChunkFilename:
                        type: string
              required:
              - runnerToken
              - jobToken
      responses:
        '204':
          description: successful operation
      operationId: postApiV1RunnersJobsByJobUUIDUpdate
      x-operation-id-source: derived
  /api/v1/runners/jobs/{jobUUID}/error:
    post:
      summary: Post job error
      description: API used by PeerTube runners
      tags:
      - Runner Jobs
      parameters:
      - $ref: '#/components/parameters/jobUUID'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                runnerToken:
                  type: string
                jobToken:
                  type: string
                message:
                  type: string
                  description: Why the runner failed to process this job
              required:
              - runnerToken
              - jobToken
              - message
      responses:
        '204':
          description: successful operation
      operationId: postApiV1RunnersJobsByJobUUIDError
      x-operation-id-source: derived
  /api/v1/runners/jobs/{jobUUID}/success:
    post:
      summary: Post job success
      description: API used by PeerTube runners
      tags:
      - Runner Jobs
      parameters:
      - $ref: '#/components/parameters/jobUUID'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                runnerToken:
                  type: string
                jobToken:
                  type: string
                payload:
                  anyOf:
                  - type: object
                    title: VOD web video transcoding
                    properties:
                      videoFile:
                        type: string
                        format: binary
                  - type: object
                    title: VOD HLS transcoding
                    properties:
                      videoFile:
                        type: string
                        format: binary
                      resolutionPlaylistFile:
                        type: string
                        format: binary
                  - type: object
                    title: VOD audio merge transcoding
                    properties:
                      videoFile:
                        type: string
                        format: binary
                  - type: object
                    title: Live RTMP to HLS transcoding
              required:
              - runnerToken
              - jobToken
              - payload
      responses:
        '204':
          description: successful operation
      operationId: postApiV1RunnersJobsByJobUUIDSuccess
      x-operation-id-source: derived
  /api/v1/runners/jobs/{jobUUID}/files/videos/{videoIdOrUUID}/max-quality/audio:
    post:
      summary: Download the max-quality audio file for a job video
      description: API used by PeerTube runners.
      tags:
      - Runner Jobs
      parameters:
      - $ref: '#/components/parameters/jobUUID'
      - $ref: '#/components/parameters/videoIdOrUUID'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                runnerToken:
                  type: string
                jobToken:
                  type: string
              required:
              - runnerToken
              - jobToken
      responses:
        '200':
          description: successful operation
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '403':
          description: the job is not associated with this video
      operationId: postApiV1RunnersJobsByJobUUIDFilesVideosByVideoIdOrUUIDMaxQualityAudio
      x-operation-id-source: derived
  /api/v1/runners/jobs/{jobUUID}/files/videos/{videoIdOrUUID}/max-quality:
    post:
      summary: Download the max-quality video file for a job video
      description: API used by PeerTube runners.
      tags:
      - Runner Jobs
      parameters:
      - $ref: '#/components/parameters/jobUUID'
      - $ref: '#/components/parameters/videoIdOrUUID'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                runnerToken:
                  type: string
                jobToken:
                  type: string
              required:
              - runnerToken
              - jobToken
      responses:
        '200':
          description: successful operation
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '403':
          description: the job is not associated with this video
      operationId: postApiV1RunnersJobsByJobUUIDFilesVideosByVideoIdOrUUIDMaxQuality
      x-operation-id-source: derived
  /api/v1/runners/jobs/{jobUUID}/files/videos/{videoIdOrUUID}/thumbnails/max-quality:
    post:
      summary: Download the max-quality thumbnail for a job video
      description: API used by PeerTube runners.
      tags:
      - Runner Jobs
      parameters:
      - $ref: '#/components/parameters/jobUUID'
      - $ref: '#/components/parameters/videoIdOrUUID'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                runnerToken:
                  type: string
                jobToken:
                  type: string
              required:
              - runnerToken
              - jobToken
      responses:
        '200':
          description: successful operation
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '403':
          description: the job is not associated with this video
      operationId: postApiV1RunnersJobsByJobUUIDFilesVideosByVideoIdOrUUIDThumbnailsMaxQuality
      x-operation-id-source: derived
  /api/v1/runners/jobs/{jobUUID}/files/videos/{videoIdOrUUID}/previews/max-quality:
    post:
      summary: Download the max-quality preview for a job video
      description: API used by PeerTube runners.
      tags:
      - Runner Jobs
      parameters:
      - $ref: '#/components/parameters/jobUUID'
      - $ref: '#/components/parameters/videoIdOrUUID'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                runnerToken:
                  type: string
                jobToken:
                  type: string
              required:
              - runnerToken
              - jobToken
      responses:
        '200':
          description: successful operation
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '403':
          description: the job is not associated with this video
      operationId: postApiV1RunnersJobsByJobUUIDFilesVideosByVideoIdOrUUIDPreviewsMaxQuality
      x-operation-id-source: derived
  /api/v1/runners/jobs/{jobUUID}/files/videos/{videoIdOrUUID}/studio/task-files/{filename}:
    post:
      summary: Download a video studio task file for a job video
      description: API used by PeerTube runners.
      tags:
      - Runner Jobs
      parameters:
      - $ref: '#/components/parameters/jobUUID'
      - $ref: '#/components/parameters/videoIdOrUUID'
      - name: filename
        in: path
        required: true
        description: Name of the task file to download
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                runnerToken:
                  type: string
                jobToken:
                  type: string
              required:
              - runnerToken
              - jobToken
      responses:
        '200':
          description: successful operation
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '400':
          description: the file is not associated with this edition task
        '403':
          description: the job is not associated with this video
      operationId: postApiV1RunnersJobsByJobUUIDFilesVideosByVideoIdOrUUIDStudioTaskFilesByFilename
      x-operation-id-source: derived
  /api/v1/runners/jobs/{jobUUID}/cancel:
    post:
      summary: Cancel a job
      security:
      - OAuth2:
        - admin
      tags:
      - Runner Jobs
      parameters:
      - $ref: '#/components/parameters/jobUUID'
      responses:
        '204':
          description: successful operation
      operationId: postApiV1RunnersJobsByJobUUIDCancel
      x-operation-id-source: derived
  /api/v1/runners/jobs/{jobUUID}:
    delete:
      summary: Delete a job
      description: The endpoint will first cancel the job if needed, and then remove it from the database. Children jobs will also be removed
      security:
      - OAuth2:
        - admin
      tags:
      - Runner Jobs
      parameters:
      - $ref: '#/components/parameters/jobUUID'
      responses:
        '204':
          description: successful operation
      operationId: deleteApiV1RunnersJobsByJobUUID
      x-operation-id-source: derived
  /api/v1/runners/jobs:
    get:
      summary: List jobs
      security:
      - OAuth2:
        - admin
      tags:
      - Runner Jobs
      parameters:
      - $ref: '#/components/parameters/start'
      - $ref: '#/components/parameters/count'
      - $ref: '#/components/parameters/runnerJobSort'
      - $ref: '#/components/parameters/search'
      - name: stateOneOf
        in: query
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/RunnerJobState'
      - name: typeOneOf
        in: query
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/RunnerJobType'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    type: integer
                    example: 1
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/RunnerJobAdmin'
      operationId: getApiV1RunnersJobs
      x-operation-id-source: derived
components:
  schemas:
    RunnerJobPayload:
      anyOf:
      - type: object
        title: VOD web video transcoding
        properties:
          input:
            type: object
            properties:
              videoFileUrl:
                type: string
          output:
            type: object
            properties:
              resolution:
                type: number
              fps:
                type: number
      - type: object
        title: VOD HLS transcoding
        properties:
          input:
            type: object
            properties:
              videoFileUrl:
                type: string
          output:
            type: object
            properties:
              resolution:
                type: number
              fps:
                type: number
      - type: object
        title: VOD audio merge transcoding
        properties:
          input:
            type: object
            properties:
              audioFileUrl:
                type: string
              previewFileUrl:
                type: string
          output:
            type: object
            properties:
              resolution:
                type: number
              fps:
                type: number
    RunnerJobStateConstant:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/RunnerJobState'
        label:
          type: string
          example: Processing
    shortUUID:
      type: string
      description: translation of a uuid v4 with a bigger alphabet to have a shorter uuid
      example: 2y84q2MQUMWPbiEcxNXMgC
    RunnerJob:
      properties:
        uuid:
          $ref: '#/components/schemas/UUIDv4'
        type:
          $ref: '#/components/schemas/RunnerJobType'
        state:
          $ref: '#/components/schemas/RunnerJobStateConstant'
        payload:
          $ref: '#/components/schemas/RunnerJobPayload'
        failures:
          type: integer
          description: Number of times a remote runner failed to process this job. After too many failures, the job in "error" state
        error:
          type:
          - string
          - 'null'
          description: Error message if the job is errored
        progress:
          type: integer
          description: Percentage progress
        priority:
          type: integer
          description: Job priority (less has more priority)
        updatedAt:
          type: string
          format: date-time
        createdAt:
          type: string
          format: date-time
        startedAt:
          type: string
          format: date-time
        finishedAt:
          type: string
          format: date-time
        parent:
          description: If job has a parent job
          type:
          - object
          - 'null'
          properties:
            type:
              $ref: '#/components/schemas/RunnerJobType'
            state:
              $ref: '#/components/schemas/RunnerJobStateConstant'
            uuid:
              $ref: '#/components/schemas/UUIDv4'
        runner:
          description: If job is associated to a runner
          properties:
            id:
              type: number
            name:
              type: string
            description:
              type: string
    RunnerJobAdmin:
      allOf:
      - $ref: '#/components/schemas/RunnerJob'
      - type: object
        properties:
          privatePayload:
            type: object
    UUIDv4:
      type: string
      format: uuid
      example: 9c9de5e8-0a1e-484a-b099-e80766180a6d
      pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
      minLength: 36
      maxLength: 36
    RunnerJobState:
      type: integer
      enum:
      - 1
      - 2
      - 3
      - 4
      - 5
      - 6
      - 7
      - 8
      description: "The runner job state:\n  - `1` Pending\n  - `2` Processing\n  - `3` Completed\n  - `4` Errored\n  - `5` Waiting for a parent job\n  - `6` Cancelled\n  - `7` Parent had an error\n  - `8` Parent has been cancelled\n"
    RunnerJobType:
      type: string
      enum:
      - vod-web-video-transcoding
      - vod-hls-transcoding
      - vod-audio-merge-transcoding
      - live-rtmp-hls-transcoding
    id:
      type: integer
      minimum: 1
      example: 42
  parameters:
    jobUUID:
      name: jobUUID
      in: path
      required: true
      schema:
        $ref: '#/components/schemas/UUIDv4'
    start:
      name: start
      in: query
      required: false
      description: Offset used to paginate results
      schema:
        type: integer
        minimum: 0
    runnerJobSort:
      name: sort
      in: query
      required: false
      description: Sort runner jobs by criteria
      schema:
        type: string
        enum:
        - updatedAt
        - createdAt
        - priority
        - state
        - progress
    search:
      name: search
      in: query
      required: false
      description: Plain text search, applied to various parts of the model depending on endpoint
      schema:
        type: string
    videoIdOrUUID:
      name: videoIdOrUUID
      in: path
      required: true
      description: Video id or UUID
      schema:
        oneOf:
        - $ref: '#/components/schemas/id'
        - $ref: '#/components/schemas/UUIDv4'
        - $ref: '#/components/schemas/shortUUID'
    count:
      name: count
      in: query
      required: false
      description: Number of items to return
      schema:
        type: integer
        default: 15
        maximum: 100
        minimum: 1
  securitySchemes:
    OAuth2:
      description: 'Authenticating via OAuth requires the following steps:

        - Have an activated account

        - [Generate] an access token for that account at `/api/v1/users/token`.

        - Make requests with the *Authorization: Bearer <token\>* header

        - Profit, depending on the role assigned to the account


        Note that the __access token is valid for 1 day__ and is given

        along with a __refresh token valid for 2 weeks__.


        [Generate]: https://docs.joinpeertube.org/api/rest-getting-started

        '
      type: oauth2
      flows:
        password:
          tokenUrl: /api/v1/users/token
          scopes:
            admin: Admin scope
            moderator: Moderator scope
            user: User scope
externalDocs:
  url: https://docs.joinpeertube.org/api-rest-reference.html
x-tagGroups:
- name: Static endpoints
  tags:
  - Static Video Files
- name: Download
  tags:
  - Video Download
- name: Feeds
  tags:
  - Video Feeds
- name: Auth
  tags:
  - Register
  - Session
- name: Accounts
  tags:
  - Accounts
  - Users
  - User Exports
  - User Imports
  - My User
  - My Subscriptions
  - My Notifications
  - My History
- name: Videos
  tags:
  - Video
  - Video Upload
  - Video Imports
  - Video Captions
  - Video Chapters
  - Video Channels
  - Video Comments
  - Video Rates
  - Video Playlists
  - Video Stats
  - Ownership Change
  - Video Mirroring
  - Video Files
  - Video Transcoding
  - Live Videos
  - Channels Sync
  - Video Passwords
  - Video Embed Privacy
- name: Search
  tags:
  - Search
- name: Moderation
  tags:
  - Abuses
  - Video Blocks
  - Account Blocklist
  - Server Blocklist
  - Automatic Tags
  - Watched Words
- name: Instance
  tags:
  - Config
  - Client Config
  - Homepage
  - Instance Follows
  - Instance Redundancy
  - Plugins
  - Stats
  - Logs
  - Job
- name: Remote Jobs
  tags:
  - Runner Registration Token
  - Runner Jobs
  - Runners