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

# Get Runs

> Get background runs, newest first. A run is the generic status resource for long-running work.



## OpenAPI

````yaml get /api/runs
openapi: 3.1.0
info:
  title: Recoup API - Releases
  description: >-
    API documentation for the Recoup platform - an AI agent platform for the
    music industry
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.recoupable.dev
security: []
paths:
  /api/runs:
    get:
      summary: Get runs
      description: >-
        Get background runs, newest first. A run is the generic status resource
        for long-running work.
      parameters:
        - name: kind
          in: query
          required: true
          schema:
            type: string
            enum:
              - valuation
          description: Required. The run type to list. Unknown kinds are rejected with 400.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 20
            default: 1
          description: >-
            Optional. Maximum runs to return, newest first. Defaults to 1 (the
            latest run).
      responses:
        '200':
          description: >-
            The calling account's runs of the requested kind, newest first.
            Empty when the account has never run one.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetRunsResponse'
        '400':
          description: Missing or unknown kind, or invalid limit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CatalogSongsErrorResponse'
        '401':
          description: Missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CatalogSongsErrorResponse'
      security:
        - apiKeyAuth: []
        - bearerAuth: []
components:
  schemas:
    GetRunsResponse:
      type: object
      description: The calling account's runs of the requested kind, newest first.
      properties:
        status:
          type: string
          enum:
            - success
            - error
          description: Status of the request
        runs:
          type: array
          description: >-
            Runs, newest first. Empty when the account has never run one of this
            kind.
          items:
            $ref: '#/components/schemas/ValuationRun'
        error:
          type: string
          description: Error message (only present if status is 'error')
    CatalogSongsErrorResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - error
          description: Status of the request
        error:
          type: string
          description: Error message describing what went wrong
    ValuationRun:
      type: object
      description: >-
        One background run. `id` is opaque; `state` is a domain phase, not a
        storage value: `queued` (capture accepted, not yet scraping),
        `measuring` (capture in flight, or finished moments ago and being
        claimed), `claimed` (catalog materialized - `result.catalog_id` is set),
        `failed` (the capture finished but no catalog was claimed, or the
        capture itself failed).
      properties:
        id:
          type: string
          format: uuid
          description: >-
            Opaque run id. Do not infer anything from its format; it is stable
            for polling a single run across requests.
        kind:
          type: string
          enum:
            - valuation
          description: The run type.
        state:
          type: string
          enum:
            - queued
            - measuring
            - claimed
            - failed
          description: Domain phase of the run.
        album_count:
          type: integer
          description: Number of releases in the run's capture scope.
        created_at:
          type: string
          format: date-time
          description: When the run was created.
        result:
          type: object
          nullable: true
          description: Set once the run is claimed; null before that.
          properties:
            catalog_id:
              type: string
              format: uuid
              description: >-
                The materialized catalog. Read its value band via [Get Catalog
                Measurements](/api-reference/songs/catalog-measurements).
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Your Recoup API key. [Learn more](/quickstart#api-keys).
    bearerAuth:
      type: http
      scheme: bearer

````