> ## 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.

# Corpus-level cleanliness counts, shares and coverage reduced from stored
per-frame measurements.

> This endpoint performs no decode or model call. `usable`, `distorted` and
`jerky` form one exhaustive partition of `frames_measured`, stamped with the
opaque version of the rule that produced it.



## OpenAPI

````yaml https://api.hebbianrobotics.com/openapi.json get /api/quality/cleanliness
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/cleanliness:
    get:
      tags:
        - quality
      summary: |-
        Corpus-level cleanliness counts, shares and coverage reduced from stored
        per-frame measurements.
      description: >-
        This endpoint performs no decode or model call. `usable`, `distorted`
        and

        `jerky` form one exhaustive partition of `frames_measured`, stamped with
        the

        opaque version of the rule that produced it.
      operationId: cleanliness_route
      parameters:
        - name: dataset
          in: query
          description: Dataset or corpus id whose index root holds the measurements.
          required: true
          schema:
            type: string
        - name: analysis
          in: query
          description: >-
            Stored analysis whose clips define the expected population. Omit for
            the

            most recent.
          required: false
          schema:
            type:
              - string
              - 'null'
        - name: frame_quality
          in: query
          description: >-
            Stored raw frame-measurement run to classify. Omit for the most
            recent.
          required: false
          schema:
            type:
              - string
              - 'null'
      responses:
        '200':
          description: Stored frame-quality counts, shares and coverage
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CleanlinessResponse'
        '400':
          description: Invalid dataset id or incompatible analysis and frame-quality runs
          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 analysis or frame-quality run is stored at the requested address
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorBody'
      security:
        - bearer_token: []
components:
  schemas:
    CleanlinessResponse:
      type: object
      description: >-
        Response of `GET /api/quality/cleanliness`: a corpus-level frame
        partition

        reduced from one stored analysis and one stored frame-quality run.


        Counts are the source of truth and shares are conveniences derived from
        the

        same `frames_measured` denominator. Shares are absent when no frame was

        measured, which is different from measuring frames and finding zero in a

        category.


        The cutoffs that produced the partition are NOT published. They are the

        calibration of our measuring instrument, which the contract reserves to
        us,

        and a reader who could vary them could re-partition the corpus to
        whatever

        answer suited them. `classification_version` is what makes two
        partitions

        comparable, which is the only thing the cutoffs would have told them.
      required:
        - dataset
        - analysis
        - frame_quality
        - classification_version
        - clips_analyzed
        - clips_measured
        - clips_without_measurements
        - clips_without_identity
        - frames_measured
        - usable_frames
        - distorted_frames
        - jerky_frames
      properties:
        analysis:
          type: string
          description: >-
            The run whose clip identities defined the expected population — the
            one

            asked for, or the most recent when none was named.
        classification_version:
          type: string
          description: >-
            Opaque token naming the classification rule. Two partitions carrying
            the

            same token are directly comparable; two carrying different ones are
            not.
        clips_analyzed:
          type: integer
          minimum: 0
        clips_measured:
          type: integer
          minimum: 0
        clips_without_identity:
          type: integer
          description: >-
            Legacy analysis artifacts that cannot be joined because they
            recorded

            no stable source identity.
          minimum: 0
        clips_without_measurements:
          type: integer
          description: Identifiable analysed clips with no object in the measurement run.
          minimum: 0
        dataset:
          type: string
        distorted_frames:
          type: integer
          format: int64
          minimum: 0
        distorted_share:
          type:
            - number
            - 'null'
          format: double
        frame_quality:
          type: string
          description: >-
            The stored frame-measurement run that was classified, resolved the
            same

            way.
        frames_measured:
          type: integer
          format: int64
          minimum: 0
        jerky_frames:
          type: integer
          format: int64
          minimum: 0
        jerky_share:
          type:
            - number
            - 'null'
          format: double
        usable_frames:
          type: integer
          format: int64
          description: >-
            Frames free of the distortion and jerk conditions below. Internally
            the

            historical category name is `active`; this wire name avoids
            confusion

            with active manipulation.
          minimum: 0
        usable_share:
          type:
            - number
            - 'null'
          format: double
    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.
  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.

````