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.