Get HLS Segment Duration

Returns the library configuration for the authenticated account. This page focuses only on the hls_segment_duration field (the other library fields are documented in the Library section).

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

GET /library

Returns the configuration of the authenticated account's library. This page documents only the hls_segment_duration field — the other library fields are covered in the Library section.

The HLS segment duration is how long each .ts piece of a transcoded video lasts. It is configurable per library (default 6 seconds). A larger segment produces fewer files, and therefore fewer requests to the CDN and to storage — a cost lever (4s → 6s is about 33% fewer files per video). It does not reduce bandwidth in GB (the bitrate is the same), and it can slightly increase time-to-first-frame and reduce seek precision.

📘

Authorization

Requires a valid API token in the Authorization header (no Bearer prefix).

HTTP Method & Path

GET /library

Base URL: https://api-v2.pandavideo.com.br

The HLS field in the response

FieldTypeDescription
hls_segment_durationintegerDuration of each HLS segment in seconds (4–15, default 6).

The returned value is the one that applies to new uploads and reencodes. A library that has never changed it returns the default 6.

Success Response (200)

{
  "data": {
    "hls_segment_duration": 6
  }
}
📘

Note

The response also carries the full library configuration; only the HLS-relevant field is shown above.

Example — cURL

curl -X GET "https://api-v2.pandavideo.com.br/library" \
  -H "Authorization: {api_key}"
Response

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json