Understudy Labs Models API

The Models API from Understudy Labs — 2 operation(s) for models.

OpenAPI Specification

understudy-labs-models-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Understudy Desktop Agent Capabilities Models API
  version: 2.2.0
  description: Authenticated loopback API for agents operating a running Understudy Desktop app. The desktop capability file supplies the ephemeral base URL and bearer token. Prompts, images, traces, and model outputs remain local unless a caller explicitly selects a remote route.
servers:
- url: http://127.0.0.1:{port}
  description: Discovered from the private desktop capability file
  variables:
    port:
      default: '17790'
security:
- desktopBearer: []
tags:
- name: Models
paths:
  /v1/models:
    get:
      operationId: desktopModels
      summary: List local model snapshots available to Desktop
      responses:
        '200':
          description: Installed local models
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelList'
        '401':
          $ref: '#/components/responses/Unauthorized'
      tags:
      - Models
  /v1/models/catalog:
    get:
      operationId: desktopModelCatalog
      summary: List the certified model snapshot catalog with local cache state
      responses:
        '200':
          description: Certified snapshot catalog
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelList'
        '401':
          $ref: '#/components/responses/Unauthorized'
      tags:
      - Models
components:
  schemas:
    ModelList:
      type: array
      items:
        type: object
        required:
        - id
        properties:
          id:
            type: string
            minLength: 1
        additionalProperties: true
    ErrorResponse:
      type: string
      description: A bounded plain-text error. Clients must not treat it as model output.
  responses:
    Unauthorized:
      description: Missing or invalid desktop bearer token
      content:
        text/plain:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    desktopBearer:
      type: http
      scheme: bearer
      description: Ephemeral token read from the owner-only desktop capability file. Agents should use the Understudy CLI or MCP adapter instead of printing this token.
x-understudy-discovery:
  capability_file: ~/.understudy/desktop-api.json
  capability_schema: understudy.desktop_api.v2
  required_file_mode: '0600'
  recommended_adapter: understudy desktop
x-understudy-extension-surfaces:
  available_via_versioned_rest_mcp_and_cli:
  - runtime status
  - model inventory and certified catalog
  - model download lifecycle
  - residency slot lifecycle
  - local correction-pair export and supervision metrics
  not_yet_versioned_in_v2_rest:
  - conversation inspect, branch, compact, and resume
  - runtime and CLI diagnostics with repair actions
  - general capture export outside desktop supervision
  - resumable desktop-wide event subscription