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

# Search Asset

> Perform a search operation for a specific asset.



## OpenAPI

````yaml /api-reference/openapi.json post /search/asset/{asset_id}/run
openapi: 3.1.0
info:
  title: Aspect API
  description: Manage and search media in Aspect.
  version: 1.0.0
servers:
  - url: https://api.aspect.inc
security:
  - ApiKeyAuth: []
tags:
  - name: Users
  - name: API Keys
  - name: Workspaces
  - name: Projects
  - name: Directories
  - name: Assets
  - name: Attachments
  - name: Filesystem Items
  - name: Jobs
  - name: Collections
  - name: Comments
  - name: Search
  - name: Transcription
  - name: Metadata
  - name: Shares
  - name: Share Templates
  - name: Watermarks
paths:
  /search/asset/{asset_id}/run:
    post:
      tags:
        - Search
      summary: Search Asset
      description: Perform a search operation for a specific asset.
      operationId: search_asset
      parameters:
        - name: asset_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Asset ID
            description: The ID of the asset to search within
          description: The ID of the asset to search within
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssetSearchRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchAssetMetadata'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    AssetSearchRequest:
      properties:
        project_id:
          type: string
          format: uuid
          title: Project ID
          description: ID of the project the asset belongs to
        spec:
          $ref: '#/components/schemas/UserSearchSpec'
          title: Spec
          description: User-facing search spec to execute
      additionalProperties: false
      type: object
      required:
        - project_id
        - spec
      title: AssetSearchRequest
      description: API request schema for searching within a specific asset.
    SearchAssetMetadata:
      properties:
        score:
          type: number
          title: Score
          description: Ordering score across all signals used for result ranking
        moments:
          items:
            $ref: '#/components/schemas/SearchMoment'
          type: array
          title: Moments
          description: Typed local evidence moments for asset-level and timeline display
        confidence:
          $ref: '#/components/schemas/ConfidenceRating'
          title: Confidence
          description: >-
            Asset-level confidence rating derived from the best local evidence
            confidence
        signals:
          items:
            $ref: '#/components/schemas/SearchSignalSummary'
          type: array
          title: Signals
          description: Asset-level logical signals that contributed to this result
      type: object
      required:
        - score
        - confidence
      title: SearchAssetMetadata
      description: >-
        Search metadata for an asset — ordering score, moments, confidence, and
        matched signals.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    UserSearchSpec:
      properties:
        signals:
          items:
            $ref: '#/components/schemas/LogicalSignalQuery'
          type: array
          title: Signals
          description: Logical signal queries to execute
        filters:
          items:
            $ref: '#/components/schemas/Filter'
          type: array
          title: Filters
          description: Filters to apply to search results
      additionalProperties: false
      type: object
      required:
        - signals
      title: UserSearchSpec
      description: >-
        Executable user-facing search spec.


        Intent authoring may produce this type later, but intent-owned metadata
        such

        as source query, hint, rationale, and warnings must live outside this
        model.
    SearchMoment:
      properties:
        id:
          type: string
          title: ID
          description: Stable evidence moment ID within this response
        kind:
          $ref: '#/components/schemas/SearchMomentKind'
          title: Kind
          description: Evidence moment kind for this moment
        confidence:
          $ref: '#/components/schemas/ConfidenceRating'
          title: Confidence
          description: Signal confidence rating for this evidence
        start_time:
          anyOf:
            - type: number
            - type: 'null'
          title: Start Time
          description: Start time in seconds when timeline-backed
        end_time:
          anyOf:
            - type: number
            - type: 'null'
          title: End Time
          description: End time in seconds when timeline-backed
        page:
          anyOf:
            - type: integer
            - type: 'null'
          title: Page
          description: 1-indexed source page when page-anchored (document moments)
        query:
          anyOf:
            - type: string
            - type: 'null'
          title: Query
          description: Signal query text when available
        preview:
          anyOf:
            - $ref: '#/components/schemas/PreviewInfo'
            - type: 'null'
          title: Preview
          description: Scene preview for this evidence moment
        evidence_text:
          anyOf:
            - $ref: '#/components/schemas/SearchEvidenceText'
            - type: 'null'
          title: Evidence Text
          description: Plain-text evidence excerpt for text-backed moments
        person:
          anyOf:
            - $ref: '#/components/schemas/SearchPersonEvidence'
            - type: 'null'
          title: Person
          description: Person evidence detail for person-kind moments
      type: object
      required:
        - id
        - kind
        - confidence
      title: SearchMoment
      description: |-
        Typed local evidence for search result display.

        Moments with timing fields are timeline evidence; moments without timing
        fields are asset-level evidence.
    ConfidenceRating:
      type: string
      enum:
        - unknown
        - low
        - medium
        - high
      title: ConfidenceRating
      description: Confidence rating for search result relevance.
    SearchSignalSummary:
      properties:
        kind:
          $ref: '#/components/schemas/SearchMomentKind'
          title: Kind
          description: Evidence moment kind
        confidence:
          $ref: '#/components/schemas/ConfidenceRating'
          title: Confidence
          description: Best confidence for this signal/query group
        moment_count:
          type: integer
          title: Moment Count
          description: Number of evidence moments for this signal/query group
        query:
          anyOf:
            - type: string
            - type: 'null'
          title: Query
          description: Signal query text when available
      type: object
      required:
        - kind
        - confidence
        - moment_count
      title: SearchSignalSummary
      description: Badge summary derived from resolved evidence moments.
    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
    LogicalSignalQuery:
      properties:
        id:
          type: string
          title: ID
          description: Client-generated stable identifier for this signal query
        signal:
          $ref: '#/components/schemas/LogicalSignalType'
          title: Signal
          description: User-facing logical signal type to search
        query:
          type: string
          title: Query
          description: Text query for this logical signal type
        weight:
          anyOf:
            - type: number
            - type: 'null'
          title: Weight
          description: Optional per-signal weight
      additionalProperties: false
      type: object
      required:
        - id
        - signal
        - query
      title: LogicalSignalQuery
      description: 'One search signal: what to look for and where.'
    Filter:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: UUID of the attribute to filter on
        clause:
          $ref: '#/components/schemas/FilterClause'
          description: Comparison operation (eq, neq, gt, lt, etc.)
        values:
          items: {}
          type: array
          title: Values
          description: Values to compare against (always a list)
      type: object
      required:
        - id
        - clause
      title: Filter
      description: Filter specification for filtering assets by attribute values.
    SearchMomentKind:
      type: string
      enum:
        - visual
        - transcript
        - document
        - filename
        - person
      title: SearchMomentKind
      description: Kinds of evidence a search result can carry.
    PreviewInfo:
      properties:
        id:
          type: string
          format: uuid
          title: Id
      type: object
      required:
        - id
      title: PreviewInfo
      description: A preview identified by ID, without delivery URLs.
    SearchEvidenceText:
      properties:
        source:
          $ref: '#/components/schemas/SearchEvidenceTextSource'
          title: Source
          description: Text source used for the evidence excerpt
        excerpt:
          type: string
          title: Excerpt
          description: Plain-text bounded excerpt from the matched source
        match_kind:
          $ref: '#/components/schemas/SearchEvidenceMatchKind'
          title: Match Kind
          description: Relationship between the query and excerpt
      type: object
      required:
        - source
        - excerpt
        - match_kind
      title: SearchEvidenceText
      description: Bounded plain-text evidence attached to text-backed search moments.
    SearchPersonEvidence:
      properties:
        person_id:
          type: string
          format: uuid
          title: Person ID
          description: Person represented by this person moment
        face_track_id:
          type: string
          format: uuid
          title: Face Track ID
          description: Face pointing at the person that backs this moment
      type: object
      required:
        - person_id
        - face_track_id
      title: SearchPersonEvidence
      description: Person evidence carried by person-kind search moments.
    LogicalSignalType:
      type: string
      enum:
        - visual
        - transcript
        - document
        - filename
      title: LogicalSignalType
      description: Which content a search signal queries.
    FilterClause:
      type: string
      enum:
        - eq
        - neq
        - gt
        - lt
        - gte
        - lte
        - contains
        - not_contains
        - starts_with
        - ends_with
        - includes
        - not_includes
        - exists
        - not_exists
        - is_true
        - is_false
      title: FilterClause
      description: Comparison operations for filtering.
    SearchEvidenceTextSource:
      type: string
      enum:
        - transcription
        - document
      title: SearchEvidenceTextSource
      description: Trusted text source used for search moment evidence excerpts.
    SearchEvidenceMatchKind:
      type: string
      enum:
        - lexical
        - semantic
      title: SearchEvidenceMatchKind
      description: How the evidence excerpt relates to the user-facing signal query.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Aspect API key (sk_...) in Authorization header. 'Bearer ' optional.

````

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