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

# Search Videos



## OpenAPI

````yaml openapi.json post /index/{index_name}/search
openapi: 3.1.0
info:
  title: AskVideos
  version: 0.1.0
servers: []
security: []
paths:
  /index/{index_name}/search:
    post:
      summary: Search Videos
      operationId: search_videos_index__index_name__search_post
      parameters:
        - name: index_name
          in: path
          required: true
          schema:
            type: string
            title: Index Name
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/Body_search_videos_index__index_name__search_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    Body_search_videos_index__index_name__search_post:
      properties:
        query:
          type: string
          title: Query
          description: The search query
        asset_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Asset Ids
          description: Video IDs or Image IDs to include in search
        top_k:
          type: integer
          title: Top K
          description: Number of segments to return
          default: 30
        top_p:
          type: number
          title: Top P
          description: Threshold for search
          default: 0
        modes:
          items:
            type: string
          type: array
          title: Modes
          description: Modalities to search over
          default:
            - video
            - image
        use_masks:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Use Masks
          description: Whether to use masks or not.
          default: false
        use_boxes:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Use Boxes
          description: Whether to use boxes or not.
          default: false
        queue_job:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Queue Job
          description: Whether to queue the job
          default: false
      type: object
      required:
        - query
      title: Body_search_videos_index__index_name__search_post
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````