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

# Set Thumbnail

> Sets the video's thumbnail. If thumbnailUrl is omitted, the thumbnail is read from the request body as a raw image upload. If thumbnailUrl is one of thumbnail_1.jpg…thumbnail_5.jpg, an existing auto-generated thumbnail for the video is used instead. Any other value is fetched by the server as a URL, so it must point to a reachable, publicly accessible image.



## OpenAPI

````yaml https://video.bunnycdn.com/openapi/bunnynet-video-api.public.json post /library/{libraryId}/videos/{videoId}/thumbnail
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.1
servers:
  - url: https://video.bunnycdn.com
security: []
tags:
  - name: Manage Collections
  - name: Manage Videos
paths:
  /library/{libraryId}/videos/{videoId}/thumbnail:
    post:
      tags:
        - Manage Videos
      summary: Set Thumbnail
      description: >-
        Sets the video's thumbnail. If thumbnailUrl is omitted, the thumbnail is
        read from the request body as a raw image upload. If thumbnailUrl is one
        of thumbnail_1.jpg…thumbnail_5.jpg, an existing auto-generated thumbnail
        for the video is used instead. Any other value is fetched by the server
        as a URL, so it must point to a reachable, publicly accessible image.
      operationId: Video_SetThumbnail
      parameters:
        - name: libraryId
          in: path
          required: true
          description: The ID of the video library.
          schema:
            type: integer
            format: int64
          x-position: 1
        - name: videoId
          in: path
          required: true
          description: The GUID of the video.
          schema:
            type: string
          x-position: 2
        - name: thumbnailUrl
          in: query
          description: >-
            Optional. One of thumbnail_1.jpg…thumbnail_5.jpg to reuse an
            auto-generated thumbnail, or a URL for the server to fetch. Omit to
            upload a raw image in the request body instead.
          schema:
            type: string
            nullable: true
          x-position: 3
      requestBody:
        description: Optional thumbnail file to upload
        content:
          application/octet-stream:
            schema:
              type: string
              format: binary
              nullable: true
      responses:
        '200':
          description: The thumbnail was successfully set
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusModel'
        '400':
          description: The request or URL was invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusModel'
        '401':
          description: The request authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusModel'
        '403':
          description: The request authorization failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusModel'
        '404':
          description: The requested video was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusModel'
        '422':
          description: Unable to fetch thumbnail from origin
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusModel'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusModel'
      security:
        - AccessKey: []
components:
  schemas:
    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
  securitySchemes:
    AccessKey:
      type: apiKey
      description: AccessKey based authentication
      name: AccessKey
      in: header

````