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

# Every analysed clip of an enriched corpus, with everything measured about
it: where it was shot, what it contains, how its frames partition, and how
long hands were visible and manipulating.

> This is the row a buyer aggregates their own report from. Counts and
seconds, never shares, so any subset of clips can be re-totalled without
inheriting a denominator we chose. `frame_quality` and `hand_activity` are
joined only when named, because each costs one stored read per clip on the
page — the page bound is what keeps that finite.



## OpenAPI

````yaml https://api.hebbianrobotics.com/openapi.json get /api/quality/clips
openapi: 3.1.0
info:
  title: squash
  description: >-
    Semantic search and debugging over LeRobot robot-episode datasets: register
    and index datasets, search episodes by natural language with frame-level
    evidence, inspect and annotate episodes, run episode-level analytics, export
    selections as new LeRobot datasets, and follow every operation live on the
    global event stream.


    Requests may select an organization's data by sending its id in the
    `X-Squash-Organization-Id` header; without it a request is scoped to public
    data.
  license:
    name: Apache-2.0
    identifier: Apache-2.0
  version: 0.0.0
servers:
  - url: https://api.hebbianrobotics.com
    description: Hosted squash API
security:
  - {}
  - bearer_token: []
tags:
  - name: search
    description: Natural-language search over indexed episodes.
  - name: episodes
    description: >-
      Browse, inspect, and stream one episode's metadata, frames, and
      timeseries.
  - name: datasets
    description: Register datasets, follow indexing, and manage catalog entries.
  - name: analytics
    description: >-
      Corpus-level measurements: similarity, near-duplicates, coverage, and
      consistency.
  - name: quality
    description: >-
      Stored Quality Indexing reports: diversity and cleanliness scores over an
      enriched corpus.
  - name: annotations
    description: 'Human curation: episode annotations and mutually-exclusive curation flags.'
  - name: exports
    description: Export a selection of episodes as a new LeRobot dataset.
  - name: jobs
    description: 'Durable pipeline jobs: acquisition, conversion, and their records.'
  - name: backfills
    description: Queue derived-artifact backfills against an active index.
  - name: events
    description: Server-sent event streams of live activity.
  - name: access
    description: The effective capabilities of the calling principal.
paths:
  /api/quality/clips:
    get:
      tags:
        - quality
      summary: >-
        Every analysed clip of an enriched corpus, with everything measured
        about

        it: where it was shot, what it contains, how its frames partition, and
        how

        long hands were visible and manipulating.
      description: >-
        This is the row a buyer aggregates their own report from. Counts and

        seconds, never shares, so any subset of clips can be re-totalled without

        inheriting a denominator we chose. `frame_quality` and `hand_activity`
        are

        joined only when named, because each costs one stored read per clip on
        the

        page — the page bound is what keeps that finite.
      operationId: quality_clips_route
      parameters:
        - name: dataset
          in: query
          description: Dataset or corpus id whose index root holds the enrichment.
          required: true
          schema:
            type: string
        - name: vocabulary
          in: query
          description: Stored vocabulary classification. Omit for the most recent.
          required: false
          schema:
            type:
              - string
              - 'null'
        - name: term
          in: query
          description: >-
            Only clips carrying this published term or a spelling that merged
            into

            one, in any section. Matching is evidence-based: a spelling no
            window

            ever produced selects nothing.
          required: false
          schema:
            type:
              - string
              - 'null'
        - name: frame_quality
          in: query
          description: >-
            Join each clip's frame counts from the most recent frame-quality
            run.


            A flag rather than an address, unlike the corpus-level routes: those

            name the run their whole answer is about, whereas this adds columns
            to

            rows the vocabulary already chose. Off by default because each
            joined

            column costs one stored read per clip on the page.
          required: false
          schema:
            type:
              - boolean
              - 'null'
        - name: hand_activity
          in: query
          description: |-
            Join each clip's hand-visibility seconds from the most recent
            hand-activity run.
          required: false
          schema:
            type:
              - boolean
              - 'null'
        - name: offset
          in: query
          description: Number of matching clips to skip (default 0).
          required: false
          schema:
            type:
              - integer
              - 'null'
            minimum: 0
        - name: limit
          in: query
          description: Maximum matching clips returned (default 100, maximum 1000).
          required: false
          schema:
            type:
              - integer
              - 'null'
            minimum: 0
      responses:
        '200':
          description: A page of analysed clips
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QualityClipsResponse'
        '400':
          description: Invalid dataset id or out-of-range page
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorBody'
        '401':
          description: A valid bearer credential is required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorBody'
        '404':
          description: >-
            No such classification, one of its source runs is not stored, or
            `term` names nothing published
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorBody'
        '409':
          description: The classification is stale for what its source runs now contain
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorBody'
      security:
        - bearer_token: []
components:
  schemas:
    QualityClipsResponse:
      type: object
      description: Response of `GET /api/quality/clips`.
      required:
        - dataset
        - vocabulary
        - filtered_to
        - total
        - offset
        - limit
        - clips
      properties:
        clips:
          type: array
          items:
            $ref: '#/components/schemas/QualityClipDto'
          description: >-
            The `offset`/`limit` slice, ordered by episode index; clips whose
            runs

            disagree about an index sort last, by identity.
        dataset:
          type: string
        filtered_to:
          type: array
          items:
            $ref: '#/components/schemas/QualityTermFilterMatchDto'
          description: >-
            What `term` resolved to, per section it is published in — a query
            can

            name a term in more than one, and the clips are the UNION, so every

            contributor is stated rather than the first. Empty when no `term`
            was

            given.
        limit:
          type: integer
          minimum: 0
        offset:
          type: integer
          minimum: 0
        total:
          type: integer
          description: Clips matching the filter before pagination.
          minimum: 0
        vocabulary:
          type: string
          description: >-
            The classification these rows were built from — the one asked for,
            or

            the most recent when none was named.
    ApiErrorBody:
      type: object
      description: Error payload returned by every failing API route.
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: Machine-readable error code, e.g. `dataset_not_found`.
        message:
          type: string
          description: Human-readable message.
    QualityClipDto:
      type: object
      description: >-
        Everything the stored measurements say about one clip.


        COUNTS and SECONDS throughout, never shares. A share commits the reader
        to

        our denominator; counts let them re-aggregate over any subset of clips
        they

        care about, which is the whole reason this endpoint exists rather than
        only

        the corpus-level ones.
      required:
        - clip
        - analysed_secs
        - environments
        - objects
        - actions
      properties:
        actions:
          type: array
          items:
            type: string
          description: The clip's published action terms.
        analysed_secs:
          type: number
          format: double
          description: >-
            Footage assessed, in seconds. A duration, not an offset into the
            source.
        clip:
          type: string
          description: >-
            The clip identity, which no renumbering changes. Names the source
            file

            and the span within it, so it is the join key a reader already has.
        environments:
          type: array
          items:
            type: string
          description: The clip's published environment terms.
        episode_index:
          type:
            - integer
            - 'null'
          format: int32
          description: >-
            The episode index the clip had when analysed. Absent when the source

            runs disagree about it — the corpus was renumbered between
            describes,

            and either run's number would address somebody else's footage.
          minimum: 0
        frame_quality:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/ClipFrameQualityDto'
              description: >-
                Frame counts for this clip. Absent — never zeroed — when no

                `frame_quality` was named or this clip was never decoded,
                because a clip

                measured and found to have no active frames is a different fact.
        hand_activity:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/ClipHandActivityDto'
              description: >-
                Hand-visibility and manipulation seconds for this clip. Absent
                when no

                `hand_activity` was named or the clip carries none.
        objects:
          type: array
          items:
            type: string
          description: The clip's published object terms.
    QualityTermFilterMatchDto:
      type: object
      description: |-
        One published term a `term` filter resolved to (mirror of
        `squash_analysis::TermFilterMatch`).
      required:
        - section
        - term
        - clip_count
      properties:
        clip_count:
          type: integer
          minimum: 0
        section:
          type: string
        term:
          type: string
    ClipFrameQualityDto:
      type: object
      description: >-
        One clip's frames, partitioned. Counts, so the reader picks the
        denominator.
      required:
        - frames
        - active
        - distorted
        - jerky
      properties:
        active:
          type: integer
          format: int64
          minimum: 0
        distorted:
          type: integer
          format: int64
          minimum: 0
        frames:
          type: integer
          format: int64
          minimum: 0
        jerky:
          type: integer
          format: int64
          minimum: 0
    ClipHandActivityDto:
      type: object
      description: >-
        One clip's hand activity, in seconds against its own measured footage.


        The repeated `_seconds` is the unit, and these are field names in
        somebody

        else's aggregation code; dropping it would leave `measured` and

        `hands_visible` with the unit documented only where they are not
        looking.
      required:
        - measured_seconds
        - hands_visible_seconds
        - two_hands_visible_seconds
        - active_manipulation_seconds
      properties:
        active_manipulation_seconds:
          type: number
          format: double
        hands_visible_seconds:
          type: number
          format: double
        measured_seconds:
          type: number
          format: double
        two_hands_visible_seconds:
          type: number
          format: double
  securitySchemes:
    bearer_token:
      type: http
      scheme: bearer
      description: >-
        Capability-bearing token issued by a squash operator. Required for
        curation, exports, dataset registration, and job control when the
        deployment runs in gated mode; public reads stay open. `GET /api/access`
        reports the capabilities a given credential actually carries.

````