> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gleap.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# YouTube allowance

> The workspace's YouTube allowance (new terms): video per period, used,
left, the per-video maximum and the playlist size. `allowance` is null on
the old terms (no limits); `allowed` is false when the plan has no
YouTube sources (Free), with the plan that has them.



## OpenAPI

````yaml https://api.gleap.io/api-docs.json get /youtube-source/allowance
openapi: 3.0.0
info:
  title: gleap-server
  version: 14.0.0
  contact: {}
servers:
  - url: https://api.gleap.io/v3
security: []
paths:
  /youtube-source/allowance:
    get:
      tags:
        - AI content
      summary: YouTube allowance
      description: >-
        The workspace's YouTube allowance (new terms): video per period, used,

        left, the per-video maximum and the playlist size. `allowance` is null
        on

        the old terms (no limits); `allowed` is false when the plan has no

        YouTube sources (Free), with the plan that has them.
      operationId: Allowance
      parameters: []
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                anyOf:
                  - properties:
                      allowance: {}
                      message:
                        type: string
                      requiredPlan:
                        $ref: '#/components/schemas/RequiredPlan'
                      allowed:
                        type: boolean
                    required:
                      - allowance
                      - message
                      - requiredPlan
                      - allowed
                    type: object
                  - properties:
                      allowance:
                        $ref: '#/components/schemas/YouTubeAllowanceView'
                      message: {}
                      requiredPlan: {}
                      allowed:
                        type: boolean
                    required:
                      - allowance
                      - message
                      - requiredPlan
                      - allowed
                    type: object
      security:
        - jwt: []
components:
  schemas:
    RequiredPlan:
      type: string
      enum:
        - team
        - pro
        - enterprise
    YouTubeAllowanceView:
      description: >-
        The allowance as the preview and GET /youtube-source/allowance return
        it.
      properties:
        plan:
          $ref: '#/components/schemas/YouTubeLimitPlan'
        period:
          type: string
          enum:
            - month
            - trial
        allowanceSeconds:
          type: number
          format: double
        usedSeconds:
          type: number
          format: double
        remainingSeconds:
          type: number
          format: double
        resetsAt:
          type: string
          format: date-time
          nullable: true
          description: When the monthly allowance starts over; null for the trial.
        maxVideoSeconds:
          type: number
          format: double
        maxBatchVideos:
          type: number
          format: double
          description: '0: single videos only (the trial).'
        fits:
          type: boolean
          description: Whether the previewed import fits as it is (true without a preview).
        message:
          type: string
          nullable: true
          description: >-
            Why it does not fit (or why the balance does not cover it), in the
            user's words.
        requiredPlan:
          type: string
          enum:
            - team
            - pro
            - enterprise
          nullable: true
          description: The plan that allows more, or null.
        firstFitting:
          properties:
            estimatedCostCents:
              type: number
              format: double
            durationSeconds:
              type: number
              format: double
            videoCount:
              type: number
              format: double
          required:
            - estimatedCostCents
            - durationSeconds
            - videoCount
          type: object
          nullable: true
          description: >-
            A playlist that does not fit: the first videos that do, which
            `firstFittingOnly` imports.
        tooLongCount:
          type: number
          format: double
          description: >-
            Playlist videos skipped: longer than the per-video maximum, or
            without a duration.
        unavailableCount:
          type: number
          format: double
        balanceMessage:
          type: string
          nullable: true
          description: >-
            The AI balance does not cover the estimate (the import is refused
            until it does).
      required:
        - plan
        - period
        - allowanceSeconds
        - usedSeconds
        - remainingSeconds
        - resetsAt
        - maxVideoSeconds
        - maxBatchVideos
        - fits
        - message
        - requiredPlan
        - firstFitting
        - tooLongCount
        - unavailableCount
        - balanceMessage
      type: object
      additionalProperties: false
    YouTubeLimitPlan:
      type: string
      enum:
        - free
        - trial
        - team
        - pro
        - enterprise
  securitySchemes:
    jwt:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.