Panda Video Library API

# Library A **library** is the root organization container in Panda — it owns videos, defines the qualities they will be encoded at, controls which playback resolutions reach end-users, and holds the per-account security settings (referer policy, anti-download). Most users have **one library**, automatically created on signup. Sub-accounts can have additional libraries linked to the parent. ## Concepts | Term | Description | |---|---| | `library_id` | UUID v4 — primary identifier of a library | | `video_library_id` / `pullzone_id` | Numeric IDs that map the library to Bunny CDN infrastructure | | `encoding` | Resolutions the transcoding pipeline will generate (write-once per video) | | `playback` | Resolutions exposed to the player (subset of `encoding` expected) | | `keep_original_files` | If `true`, the uploaded master is preserved in storage | | `compression_mode` | `size` / `balanced` / `quality` — encoder preset trade-off | | `block_none_refer` | If `true`, the CDN rejects requests without an allowed referer | | `block_download` | Library-wide anti-download flag (HLS-only delivery) | ## Endpoints in this section | Method | Path | Page | |---|---|---| | GET | `/library` | Get user library | | GET | `/library/{library_id}` | Get library details or referrers | | PUT | `/library/{library_id}` | Update qualities and processing settings (Video Qualities) | ## Business rules - Quality changes are **not retroactive** — `encoding` / `playback` updates affect new videos only. - `playback` should be a subset of `encoding`. The API does not reject violations; misconfigured combinations produce unavailable streams. - `block_none_refer` is **not** updatable through `PUT /library/{library_id}`. Use `POST /library/{library_id}?action=referValidation` instead. - Mutations sync to Bunny CDN asynchronously and invalidate memcache (`getLibraryById_*`, `getVerifyIfHasLibraryId_*`). ## Related sections - **Referrer Management** — manage the allowed-domain whitelist and the global refer policy. - **Block Download** — toggle the library-wide download blocker.

GitHub OpenAPI

Operations 10

GET /library Get user library #
GET /library/{library_id} Get library details or referrers #
PUT /library/{library_id} Videos Qualities #
GET /library/{library_id}/hls-encryption Get HLS encryption status #
PUT /library/{library_id}/hls-encryption Update HLS encryption status #
GET /library/{library_id}?action=folder_refer List folder referrers #
POST /library/{library_id}?action=folder_refer Add a folder referrer #
DELETE /library/{library_id}?action=folder_refer Remove a folder referrer #
GET /library/{library_id}?action=folder_refer_inherited List inherited folder referrers #
GET /library/{library_id}?action=refer_all List all referrers (consolidated) #

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/pandavideo-com:pandavideo-com-library-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

pandavideo-com-library-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Pandavideo Com Library API
  version: 1.0.0
  description: 'Operations tagged Library across 2 of this provider''s published API definitions: pandavideo-com-panda-ms-library-api-openapi.yml, pandavideo-com-panda-security-center-api-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api-v2.pandavideo.com
  description: Production server
- url: https://api-v2-staging.pandavideo.com
  description: Staging server
- url: http://localhost:10000
  description: Local development server
- url: https://api-v2.pandavideo.com.br
tags:
- name: Library
  description: '# Library


    A **library** is the root organization container in Panda — it owns videos, defines the qualities they will be encoded at, controls which playback resolutions reach end-users, and holds the per-account security settings (referer policy, anti-download).


    Most users have **one library**, automatically created on signup. Sub-accounts can have additional libraries linked to the parent.


    ## Concepts


    | Term | Description |

    |---|---|

    | `library_id` | UUID v4 — primary identifier of a library |

    | `video_library_id` / `pullzone_id` | Numeric IDs that map the library to Bunny CDN infrastructure |

    | `encoding` | Resolutions the transcoding pipeline will generate (write-once per video) |

    | `playback` | Resolutions exposed to the player (subset of `encoding` expected) |

    | `keep_original_files` | If `true`, the uploaded master is preserved in storage |

    | `compression_mode` | `size` / `balanced` / `quality` — encoder preset trade-off |

    | `block_none_refer` | If `true`, the CDN rejects requests without an allowed referer |

    | `block_download` | Library-wide anti-download flag (HLS-only delivery) |


    ## Endpoints in this section


    | Method | Path | Page |

    |---|---|---|

    | GET | `/library` | Get user library |

    | GET | `/library/{library_id}` | Get library details or referrers |

    | PUT | `/library/{library_id}` | Update qualities and processing settings (Video Qualities) |


    ## Business rules


    - Quality changes are **not retroactive** — `encoding` / `playback` updates affect new videos only.

    - `playback` should be a subset of `encoding`. The API does not reject violations; misconfigured combinations produce unavailable streams.

    - `block_none_refer` is **not** updatable through `PUT /library/{library_id}`. Use `POST /library/{library_id}?action=referValidation` instead.

    - Mutations sync to Bunny CDN asynchronously and invalidate memcache (`getLibraryById_*`, `getVerifyIfHasLibraryId_*`).


    ## Related sections


    - **Referrer Management** — manage the allowed-domain whitelist and the global refer policy.

    - **Block Download** — toggle the library-wide download blocker.'
paths:
  /library:
    get:
      summary: Get user library
      operationId: get-user-library
      description: Returns the library settings of the authenticated account — id (library_id), name, default encoding/playback qualities, referrer-protection flags, and allowed referers list.
      tags:
      - Library
      security:
      - PandaAuth: []
      responses:
        '200':
          description: Library information retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/LibraryDetails'
                  message:
                    type: string
                    example: Success
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '500':
          $ref: '#/components/responses/InternalServerError'
    servers:
    - url: https://api-v2.pandavideo.com
      description: Production server
    - url: https://api-v2-staging.pandavideo.com
      description: Staging server
    - url: http://localhost:10000
      description: Local development server
  /library/{library_id}:
    get:
      summary: Get library details or referrers
      operationId: get-allowed-referer
      description: A single path that behaves in two distinct ways depending on whether the ?action=refer query parameter is present.
      tags:
      - Library
      security:
      - PandaAuth: []
      parameters:
      - name: library_id
        in: path
        required: true
        description: Unique identifier of the library
        schema:
          type: string
          format: uuid
      - name: action
        in: query
        required: false
        description: Omit to get library details, or set to read referrers
        schema:
          type: string
          enum:
          - refer
          - folder_refer
          - folder_refer_inherited
          - refer_all
      - name: folder_id
        in: query
        required: false
        description: Folder UUID — required when `action` is `folder_refer` or `folder_refer_inherited`
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Library details or referrers retrieved successfully
          content:
            application/json:
              schema:
                oneOf:
                - type: object
                  properties:
                    data:
                      $ref: '#/components/schemas/LibraryDetails'
                    message:
                      type: string
                      example: Success
                - type: object
                  description: Referrers for `action=refer`, `folder_refer` or `folder_refer_inherited`
                  properties:
                    refers:
                      type: array
                      items:
                        $ref: '#/components/schemas/Referrer'
                - type: object
                  description: Consolidated referrers for `action=refer_all` (one entry per hostname)
                  properties:
                    refers:
                      type: array
                      items:
                        $ref: '#/components/schemas/ConsolidatedReferrer'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '404':
          $ref: '#/components/responses/NotFoundError'
    put:
      summary: Videos Qualities
      operationId: quality
      description: Atualiza as configurações de qualidade e processamento de vídeo de uma library. Use este endpoint para definir quais resoluções estão disponíveis para playback, quais resoluções o pipeline de encod...
      tags:
      - Library
      security:
      - PandaAuth: []
      parameters:
      - name: library_id
        in: path
        required: true
        description: Unique identifier of the library
        schema:
          type: string
          format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateLibraryRequest'
            examples:
              updateLibrarySettings:
                summary: Update library settings
                value:
                  playback:
                  - 360p
                  - 480p
                  - 720p
                  - 1080p
                  encoding:
                  - 360p
                  - 480p
                  - 720p
                  - 1080p
                  - 1440p
                  keep_original_files: true
                  compression_mode: balanced
      responses:
        '200':
          description: Library updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/LibraryDetails'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '500':
          $ref: '#/components/responses/InternalServerError'
    servers:
    - url: https://api-v2.pandavideo.com
      description: Production server
    - url: https://api-v2-staging.pandavideo.com
      description: Staging server
    - url: http://localhost:10000
      description: Local development server
  /library/{library_id}/hls-encryption:
    get:
      operationId: get-hls-encryption
      summary: Get HLS encryption status
      description: Returns whether new uploads in this library are encrypted.
      parameters:
      - $ref: '#/components/parameters/LibraryId'
      responses:
        '200':
          description: Current status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusFlag'
      tags:
      - Library
      security:
      - apiKey: []
    put:
      operationId: put-hls-encryption
      summary: Update HLS encryption status
      description: Enables or disables HLS encryption for new uploads in this library.
      parameters:
      - $ref: '#/components/parameters/LibraryId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - status
              properties:
                status:
                  type: boolean
      responses:
        '200':
          description: Updated status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusFlag'
        '400':
          description: status must be a boolean
      tags:
      - Library
      security:
      - apiKey: []
    servers:
    - url: https://api-v2.pandavideo.com.br
  /library/{library_id}?action=folder_refer:
    get:
      operationId: get-folder-refer
      summary: List folder referrers
      description: Lists the domains registered directly on a folder.
      parameters:
      - $ref: '#/components/parameters/LibraryId'
      - name: folder_id
        in: query
        required: true
        description: Folder to inspect
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Referrers of the folder
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReferList'
      x-internal: false
      tags:
      - Library
      security:
      - apiKey: []
    post:
      operationId: post-folder-refer
      summary: Add a folder referrer
      description: Registers an allowed domain on a specific folder.
      parameters:
      - $ref: '#/components/parameters/LibraryId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - folder_id
              - hostname
              - type
              properties:
                folder_id:
                  type: string
                  format: uuid
                hostname:
                  type: string
                type:
                  type: string
                  enum:
                  - ALLOW
                  - BLOCK
      responses:
        '200':
          description: Referrer created
          content:
            application/json:
              schema:
                type: object
                properties:
                  refer:
                    $ref: '#/components/schemas/ReferItem'
        '400':
          description: Domain already exists in this folder
        '404':
          description: Folder was not found
      x-internal: false
      tags:
      - Library
      security:
      - apiKey: []
    delete:
      operationId: delete-folder-refer
      summary: Remove a folder referrer
      description: Removes one or more domains from a folder. Accepts a single refer_id or an array.
      parameters:
      - $ref: '#/components/parameters/LibraryId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                refer_id:
                  type: string
                  format: uuid
      responses:
        '200':
          description: Removal queued
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '400':
          description: Cannot delete a library-level refer through folder endpoint
      x-internal: false
      tags:
      - Library
      security:
      - apiKey: []
    servers:
    - url: https://api-v2.pandavideo.com.br
  /library/{library_id}?action=folder_refer_inherited:
    get:
      operationId: get-folder-refer-inherited
      summary: List inherited folder referrers
      description: Lists the domains a folder inherits from its parent folders.
      parameters:
      - $ref: '#/components/parameters/LibraryId'
      - name: folder_id
        in: query
        required: true
        description: Folder to inspect
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Inherited referrers
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReferList'
      x-internal: false
      tags:
      - Library
      security:
      - apiKey: []
    servers:
    - url: https://api-v2.pandavideo.com.br
  /library/{library_id}?action=refer_all:
    get:
      operationId: get-refer-all
      summary: List all referrers (consolidated)
      description: Consolidated view of every referrer of the library, grouped by hostname, including the folders each one applies to.
      parameters:
      - $ref: '#/components/parameters/LibraryId'
      responses:
        '200':
          description: Consolidated referrer list
          content:
            application/json:
              schema:
                type: object
                properties:
                  refers:
                    type: array
                    items:
                      type: object
                      properties:
                        hostname:
                          type: string
                        type:
                          type: string
                          enum:
                          - ALLOW
                          - BLOCK
                        status:
                          type: string
                        scope:
                          type: string
                          enum:
                          - library
                          - folder
                        library_refer_id:
                          type:
                          - string
                          - 'null'
                          format: uuid
                        folders:
                          type: array
                          items:
                            type: object
                            properties:
                              folder_id:
                                type: string
                                format: uuid
                              name:
                                type: string
                              refer_id:
                                type: string
                                format: uuid
                              status:
                                type: string
                        type_inconsistency:
                          type: boolean
                        created_at:
                          type: string
      x-internal: false
      tags:
      - Library
      security:
      - apiKey: []
    servers:
    - url: https://api-v2.pandavideo.com.br
components:
  responses:
    BadRequestError:
      description: Bad request - Invalid input parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            errCode: BadRequest
            errMsg: 'must be equal to one of the allowed values: ALLOW,BLOCK.'
    NotFoundError:
      description: Not found - Resource does not exist
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            errCode: NotFound
            errMsg: Library not found
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            errCode: InternalServerError
            errMsg: Error retrieving library information
    UnauthorizedError:
      description: Unauthorized - Invalid or missing authentication (returned by the API Gateway authorizer, not by the service)
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                example: Unauthorized
  schemas:
    LibraryDetails:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique library identifier
          example: 123e4567-e89b-12d3-a456-426614174000
        user_id:
          type: string
          format: uuid
          description: Owner user ID
          example: 2481ef9b-5642-4fcd-b9aa-094e98b5cf0a
        name:
          type: string
          description: Library name
          example: My Video Library
        video_library_id:
          type: integer
          description: Bunny video library ID
          example: 12345
        pullzone_name:
          type: string
          description: CDN pullzone name
          example: my-pullzone
        pullzone_id:
          type: integer
          description: CDN pullzone ID
          example: 67890
        api_key:
          type: string
          description: API key for video library
          example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
        video_library_pullzone_id:
          type: integer
          description: Video library pullzone ID
          example: 54321
        parallel_upload_limit:
          type: integer
          description: Maximum number of parallel uploads allowed
          minimum: 1
          maximum: 10
          example: 5
        playback:
          type: array
          description: Available playback quality resolutions
          items:
            type: string
            enum:
            - 240p
            - 360p
            - 480p
            - 720p
            - 1080p
            - 1440p
            - 2160p
          example:
          - 360p
          - 480p
          - 720p
          - 1080p
        encoding:
          type: array
          description: Encoding quality resolutions for video conversion
          items:
            type: string
            enum:
            - 240p
            - 360p
            - 480p
            - 720p
            - 1080p
            - 1440p
            - 2160p
          example:
          - 360p
          - 480p
          - 720p
          - 1080p
        keep_original_files:
          type: boolean
          description: Whether to keep original uploaded video files
          example: true
        block_none_refer:
          type: boolean
          description: Whether to block requests without referrer
          example: true
        drm:
          type:
          - object
          - 'null'
          description: DRM configuration (optional)
          additionalProperties: true
          example: null
        created:
          type: string
          format: date-time
          description: Library creation timestamp
          example: '2024-01-15T10:30:00.000Z'
    ErrorResponse:
      type: object
      description: Standard error envelope returned by the service for any non-2xx response.
      properties:
        errCode:
          type: string
          description: Error category
          enum:
          - BadRequest
          - NotFound
          - Forbidden
          - MethodNotAllowed
          - InternalServerError
          example: BadRequest
        errMsg:
          type: string
          description: Human-readable error message
          example: Refer already exists
    UpdateLibraryRequest:
      type: object
      description: 'Request body for updating library settings. The validator is strict (`additionalProperties: false`) and accepts only the fields below. To toggle the referer policy use `POST /library/{library_id}?action=referValidation`.'
      additionalProperties: false
      properties:
        playback:
          type: array
          description: Available playback quality resolutions
          items:
            type: string
            enum:
            - 240p
            - 360p
            - 480p
            - 720p
            - 1080p
            - 1440p
            - 2160p
          example:
          - 360p
          - 480p
          - 720p
          - 1080p
        encoding:
          type: array
          description: Encoding quality resolutions for video conversion
          items:
            type: string
            enum:
            - 240p
            - 360p
            - 480p
            - 720p
            - 1080p
            - 1440p
            - 2160p
          example:
          - 360p
          - 480p
          - 720p
          - 1080p
        keep_original_files:
          type: boolean
          description: Whether to keep original uploaded video files
          example: true
        compression_mode:
          type: string
          description: Compression profile (smaller file vs. higher quality)
          enum:
          - size
          - balanced
          - quality
          example: balanced
    Referrer:
      type: object
      description: Domain referrer restriction
      properties:
        id:
          type: string
          format: uuid
          description: Unique referrer identifier
          example: 789e4567-e89b-12d3-a456-426614174999
        type:
          type: string
          description: Referrer type
          enum:
          - ALLOW
          - BLOCK
          example: ALLOW
        url:
          type: string
          description: Domain URL
          example: example.com
        status:
          type: string
          description: Current status of the referrer
          enum:
          - active
          - inactive
          - pending
          - deleting
          - turning_inactive
          example: active
        origin:
          type: object
          description: Scope this referrer applies to. Only present in `folder_refer` and `folder_refer_inherited` responses.
          properties:
            type:
              type: string
              enum:
              - library
              - folder
              example: folder
            id:
              type: string
              format: uuid
              example: 22222222-2222-4222-8222-222222222222
    ConsolidatedReferrer:
      type: object
      description: 'A single hostname consolidated across the library and folder scopes,

        returned by `GET /library/{library_id}?action=refer_all`.

        '
      properties:
        hostname:
          type: string
          description: The domain hostname (lowercased, trimmed)
          example: '*.cliente.com'
        type:
          type: string
          enum:
          - ALLOW
          - BLOCK
          example: ALLOW
        status:
          type: string
          description: Aggregated status across all scopes for this hostname; `mixed` when the rows differ.
          enum:
          - active
          - inactive
          - pending
          - deleting
          - turning_inactive
          - mixed
          example: active
        scope:
          type: string
          description: 'Where this hostname applies:

            - `library` — only at library level

            - `folder` — only in folders

            - `mixed` — both library level and folders

            '
          enum:
          - library
          - folder
          - mixed
          example: mixed
        library_refer_id:
          type:
          - string
          - 'null'
          format: uuid
          description: ID of the library-level referrer row (`folder_id=null`), or `null` when the hostname is not set at library level.
          example: 789e4567-e89b-12d3-a456-426614174999
        folders:
          type: array
          description: Folder-level rows for this hostname (empty when the hostname is only at library level).
          items:
            type: object
            properties:
              folder_id:
                type: string
                format: uuid
                example: 22222222-2222-4222-8222-222222222222
              name:
                type:
                - string
                - 'null'
                description: Folder name, or `null` if it could not be resolved.
                example: Cursos
              refer_id:
                type: string
                format: uuid
                example: 999e4567-e89b-12d3-a456-426614174000
              status:
                type: string
                enum:
                - active
                - inactive
                - pending
                - deleting
                - turning_inactive
                example: active
        type_inconsistency:
          type: boolean
          description: True when rows of the same hostname have divergent `type` values (historical inconsistency).
          example: false
        created_at:
          type: string
          format: date-time
          description: Timestamp of the most recent referrer row in the group.
          example: '2024-01-15T10:30:00.000Z'
    StatusFlag:
      type: object
      properties:
        status:
          type: boolean
    ReferItem:
      type: object
      properties:
        id:
          type: string
          format: uuid
        url:
          type: string
        type:
          type: string
          enum:
          - ALLOW
          - BLOCK
        status:
          type: string
          enum:
          - active
          - inactive
          - pending
          - deleting
          - turning_inactive
        origin:
          type: object
          properties:
            type:
              type: string
              enum:
              - library
              - folder
            id:
              type: string
              format: uuid
    ReferList:
      type: object
      properties:
        refers:
          type: array
          items:
            $ref: '#/components/schemas/ReferItem'
  parameters:
    LibraryId:
      name: library_id
      in: path
      required: true
      description: Library ID owned by the authenticated user
      schema:
        type: string
        format: uuid
  securitySchemes:
    PandaAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Panda API token (without Bearer prefix)
    apiKey:
      type: apiKey
      name: Authorization
      in: header
x-refined-from:
- pandavideo-com-panda-ms-library-api-openapi.yml
- pandavideo-com-panda-security-center-api-openapi.yml
x-readme-fauxas: true
x-provenance:
  method: searched
  source: https://docs.pandavideo.com/reference
  harvested: '2026-11-20'
  tool: harvest-readme-openapi.py
  note: Assembled verbatim from the OpenAPI definition ReadMe embeds in each operation page of the provider's developer portal; paths and components merged by API title, nothing authored.
  assembled_from:
  - https://docs.pandavideo.com/reference/get-analytics-from-folder.md
  - https://docs.pandavideo.com/reference/get-bandwidth-by-video.md
  - https://docs.pandavideo.com/reference/get-drm-bandwidth-by-video.md
  - https://docs.pandavideo.com/reference/get-historic-viewer-data-for-live-stream.md
  - https://docs.pandavideo.com/reference/get-viewers-from-a-live.md
  merge:
    pages: 5
    deduped: 4
    conflicts_kept_first: 0