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

# Fetch Video



## OpenAPI

````yaml https://video.bunnycdn.com/openapi/bunnynet-video-api.public.json post /library/{libraryId}/videos/fetch
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.5.5
servers:
  - url: https://video.bunnycdn.com
security: []
tags:
  - name: Manage Collections
  - name: Manage Videos
paths:
  /library/{libraryId}/videos/fetch:
    post:
      tags:
        - Manage Videos
      summary: Fetch Video
      operationId: Video_FetchNewVideo
      parameters:
        - name: libraryId
          in: path
          required: true
          schema:
            type: integer
            format: int64
          x-position: 1
        - name: collectionId
          in: query
          schema:
            type: string
            nullable: true
          x-position: 3
        - name: thumbnailTime
          in: query
          description: (Optional) Video time in ms to extract the main video thumbnail.
          schema:
            type: integer
            format: int32
            nullable: true
          x-position: 4
      requestBody:
        x-name: request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FetchVideoRequest'
        required: true
        x-position: 2
      responses:
        '200':
          description: The video was successfully fetched
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusModel'
        '400':
          description: URL validation failed or request was invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusModel'
        '401':
          description: The request authentication failed
        '403':
          description: The request authorization failed
        '404':
          description: The requested video was not found
        '422':
          description: Unable to fetch video from origin
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusModel'
        '429':
          description: Too many fetch jobs queued. Please try again later.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusModel'
        '500':
          description: Internal Server Error
      security:
        - AccessKey: []
components:
  schemas:
    FetchVideoRequest:
      type: object
      additionalProperties: false
      required:
        - url
      properties:
        url:
          type: string
          description: The URL from which the video will be fetched from.
          minLength: 1
        headers:
          type: object
          description: The headers that will be sent along with the fetch request.
          nullable: true
          additionalProperties:
            type: string
        title:
          type: string
          description: The title that will be set to video.
          nullable: true
    StatusModel:
      type: object
      additionalProperties: false
      properties:
        success:
          type: boolean
          description: Determines if the request was successful
        message:
          type: string
          description: Response message description
          nullable: true
        statusCode:
          type: integer
          description: The response status code
          format: int32
  securitySchemes:
    AccessKey:
      type: apiKey
      description: AccessKey based authentication
      name: AccessKey
      in: header

````