> ## Documentation Index
> Fetch the complete documentation index at: https://bunnynet-cb9733c2-playback-api-gaps.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Encoding Statistics

> Returns video encoding seconds for the library, split into premium and free tier. Each includes billable (normalized) and output seconds over time, plus totals by video codec, resolution, and JIT vs standard encoding. Data is available starting 2026-06-15.



## OpenAPI

````yaml https://video.bunnycdn.com/openapi/bunnynet-video-api.public.json get /library/{libraryId}/statistics/encoding
openapi: 3.0.0
info:
  title: Stream API
  termsOfService: https://bunny.net/tos
  contact:
    name: bunny.net
    url: https://docs.bunny.net
    email: support@bunny.net
  version: 1.6.6
servers:
  - url: https://video.bunnycdn.com
security: []
tags:
  - name: Manage Collections
  - name: Encoding Statistics
  - name: Manage Videos
paths:
  /library/{libraryId}/statistics/encoding:
    get:
      tags:
        - Encoding Statistics
      summary: Get Encoding Statistics
      description: >-
        Returns video encoding seconds for the library, split into premium and
        free tier. Each includes billable (normalized) and output seconds over
        time, plus totals by video codec, resolution, and JIT vs standard
        encoding. Data is available starting 2026-06-15.
      operationId: EncodingStatistics_GetEncodingStatistics
      parameters:
        - name: libraryId
          in: path
          required: true
          schema:
            type: integer
            format: int64
          x-position: 1
        - name: dateFrom
          in: query
          description: >-
            Optional start of the time range (UTC). Defaults to 14 days ago.
            Data is available starting 2026-06-15.
          schema:
            type: string
            format: date-time
            nullable: true
          x-position: 2
        - name: dateTo
          in: query
          description: >-
            Optional end of the time range (UTC). If omitted, the current date
            is used.
          schema:
            type: string
            format: date-time
            nullable: true
          x-position: 3
        - name: hourly
          in: query
          description: >-
            Optional. If true, returns hourly data for ranges of up to 31 days
            within the last 89 days; otherwise daily (UTC). Default is daily.
          schema:
            type: boolean
            default: false
          x-position: 4
        - name: videoCodecs
          in: query
          style: form
          explode: true
          description: >-
            Optional video codecs to include: H264, VP9, HEVC, AV1. Repeat for
            multiple values.
          schema:
            type: array
            nullable: true
            items:
              type: string
          x-position: 5
        - name: resolutions
          in: query
          style: form
          explode: true
          description: >-
            Optional highest output resolutions to include: 240, 360, 480, 540,
            720, 1080, 1440, 2160. Repeat for multiple values.
          schema:
            type: array
            nullable: true
            items:
              type: integer
              format: int32
          x-position: 6
        - name: jit
          in: query
          description: >-
            Optional. If true, only JIT encodes are included; if false, only
            standard encodes. Omit for both.
          schema:
            type: boolean
            nullable: true
          x-position: 7
      responses:
        '200':
          description: >-
            Returns video encoding seconds for the requested video library,
            split by premium and free tier.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoEncodingStatisticsModel'
        '400':
          description: The date range or filters are invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusModel'
        '401':
          description: The request authentication failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusModel'
        '404':
          description: The requested video library was not found.
        '500':
          description: Internal Server Error
        '503':
          description: Encoding statistics are not available.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusModel'
      security:
        - AccessKey: []
components:
  schemas:
    VideoEncodingStatisticsModel:
      type: object
      additionalProperties: false
      properties:
        hourly:
          type: boolean
          description: Indicates whether the charts use hourly or daily UTC buckets.
        total:
          description: >-
            Combined premium and free encoding statistics for the selected
            period.
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/VideoEncodingBreakdownModel'
        premium:
          description: >-
            Encoding statistics for videos encoded with the premium encoding
            tier.
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/VideoEncodingBreakdownModel'
        free:
          description: Encoding statistics for videos encoded with the free encoding tier.
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/VideoEncodingBreakdownModel'
    StatusModel:
      type: object
      additionalProperties: false
      properties:
        success:
          type: boolean
          description: Determines if the request was successful
        message:
          type: string
          description: >-
            Human-readable message describing the result, typically populated
            with error details when Success is false.
          nullable: true
        statusCode:
          type: integer
          description: The HTTP status code corresponding to the result of the request.
          format: int32
    VideoEncodingBreakdownModel:
      type: object
      additionalProperties: false
      properties:
        normalizedTotal:
          type: integer
          description: >-
            Billable encoding seconds in the selected period: counted per output
            codec and weighted by the video's highest resolution (x0.5 below
            720p, x1 up to 1080p, x3 above).
          format: int64
        normalizedChart:
          type: object
          description: >-
            Billable (normalized) encoding seconds over time, grouped hourly or
            daily in UTC.
          nullable: true
          additionalProperties:
            type: integer
            format: int64
        outputTotal:
          type: integer
          description: >-
            Encoded output seconds in the selected period: video length counted
            once per output codec, without resolution weighting.
          format: int64
        outputChart:
          type: object
          description: Encoded output seconds over time, grouped hourly or daily in UTC.
          nullable: true
          additionalProperties:
            type: integer
            format: int64
        byVideoCodec:
          type: object
          description: >-
            Encoding seconds grouped by output video codec (H264, VP9, HEVC,
            AV1).
          nullable: true
          additionalProperties:
            $ref: '#/components/schemas/VideoEncodingSecondsModel'
        byResolution:
          type: object
          description: >-
            Encoding seconds grouped by the video's highest output resolution. 0
            means the resolution was unknown.
          nullable: true
          additionalProperties:
            $ref: '#/components/schemas/VideoEncodingSecondsModel'
        byJit:
          type: object
          description: >-
            Encoding seconds grouped by encoding type: 'jit' for just-in-time
            encodes, 'standard' for full encodes.
          nullable: true
          additionalProperties:
            $ref: '#/components/schemas/VideoEncodingSecondsModel'
    VideoEncodingSecondsModel:
      type: object
      additionalProperties: false
      properties:
        normalized:
          type: integer
          description: Billable encoding seconds, weighted by resolution.
          format: int64
        output:
          type: integer
          description: Encoded output seconds, without resolution weighting.
          format: int64
  securitySchemes:
    AccessKey:
      type: apiKey
      description: AccessKey based authentication
      name: AccessKey
      in: header

````