components:
  schemas:
    AcceptCoverPreviewRequest:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/AcceptCoverPreviewRequest.json
          format: uri
          readOnly: true
          type: string
        side:
          default: front
          description: Cover side
          enum:
            - front
            - back
          type: string
      type: object
    AddMemberInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/AddMemberInputBody.json
          format: uri
          readOnly: true
          type: string
        role:
          minLength: 1
          type: string
        user_id:
          minLength: 1
          type: string
      required:
        - user_id
        - role
      type: object
    AddStreamTrackInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/AddStreamTrackInputBody.json
          format: uri
          readOnly: true
          type: string
        stream_url:
          maxLength: 2000
          minLength: 1
          type: string
        title:
          maxLength: 500
          minLength: 1
          type: string
      required:
        - title
        - stream_url
      type: object
    AdminCreateUserInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/AdminCreateUserInputBody.json
          format: uri
          readOnly: true
          type: string
        display_name:
          type: string
        email:
          format: email
          type: string
        password:
          type: string
        role:
          type: string
      required:
        - email
        - role
        - password
      type: object
    AdminDeleteUserInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/AdminDeleteUserInputBody.json
          format: uri
          readOnly: true
          type: string
        reassignments: {}
      type: object
    AdminHealthOutputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/AdminHealthOutputBody.json
          format: uri
          readOnly: true
          type: string
        cards:
          format: int64
          type: integer
        checked_at:
          format: date-time
          type: string
        collections:
          $ref: "#/components/schemas/CountCollectionsRow"
        jobs:
          $ref: "#/components/schemas/CountJobsByStatusRow"
        status:
          type: string
        users:
          $ref: "#/components/schemas/CountUsersRow"
      required:
        - status
        - users
        - cards
        - collections
        - jobs
        - checked_at
      type: object
    AdminJobOut:
      additionalProperties: false
      properties:
        attempts:
          format: int64
          type: integer
        completed_at:
          format: date-time
          type:
            - string
            - "null"
        created_at:
          format: date-time
          type: string
        error:
          type:
            - string
            - "null"
        id:
          type: string
        status:
          type: string
        type:
          type: string
        user_id:
          type: string
      required:
        - id
        - type
        - status
        - user_id
        - attempts
        - error
        - created_at
        - completed_at
      type: object
    AdminResetPasswordOutputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/AdminResetPasswordOutputBody.json
          format: uri
          readOnly: true
          type: string
        message:
          type: string
        reset_link:
          type: string
      required:
        - message
      type: object
    AdminUpdateUserInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/AdminUpdateUserInputBody.json
          format: uri
          readOnly: true
          type: string
        display_name:
          type: string
        role:
          type: string
      required:
        - display_name
        - role
      type: object
    AdminUserOutputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/AdminUserOutputBody.json
          format: uri
          readOnly: true
          type: string
        created_at:
          format: date-time
          type: string
        display_name:
          type: string
        email:
          type: string
        id:
          type: string
        role:
          type: string
        status:
          type: string
      required:
        - id
        - email
        - display_name
        - role
        - status
        - created_at
      type: object
    ApproveDeletionInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/ApproveDeletionInputBody.json
          format: uri
          readOnly: true
          type: string
        reassignments: {}
      type: object
    ApproveThemeInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/ApproveThemeInputBody.json
          format: uri
          readOnly: true
          type: string
        colors:
          items:
            type: string
          type:
            - array
            - "null"
        palette_name:
          type: string
        style:
          type: string
      required:
        - palette_name
        - colors
        - style
      type: object
    AssignOrphanedInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/AssignOrphanedInputBody.json
          format: uri
          readOnly: true
          type: string
        user_id:
          minLength: 1
          type: string
      required:
        - user_id
      type: object
    AuditLogEntryOut:
      additionalProperties: false
      properties:
        action:
          type: string
        actor_id:
          type: string
        created_at:
          format: date-time
          type: string
        detail:
          type: string
        id:
          type: string
        ip:
          type: string
        user_id:
          type: string
      required:
        - id
        - user_id
        - actor_id
        - action
        - detail
        - ip
        - created_at
      type: object
    CacheStatusOut:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/CacheStatusOut.json
          format: uri
          readOnly: true
          type: string
        account_id:
          type: string
        device_id:
          type: string
      required:
        - device_id
        - account_id
      type: object
    CardDetailOut:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/CardDetailOut.json
          format: uri
          readOnly: true
          type: string
        author:
          type: string
        back_cover_hash:
          type:
            - string
            - "null"
        back_cover_prompt:
          type: string
        collection_id:
          type: string
        collection_name:
          type: string
        collection_slug:
          type: string
        content_hash:
          type:
            - string
            - "null"
        cover_hash:
          type:
            - string
            - "null"
        cover_prompt:
          type: string
        created_at:
          format: date-time
          type: string
        description:
          type: string
        slug:
          type: string
        source_types:
          items:
            type: string
          type:
            - array
            - "null"
        title:
          type: string
        total_duration_s:
          format: int64
          type: integer
        track_count:
          format: int64
          type: integer
        tracks:
          items:
            $ref: "#/components/schemas/TrackOut"
          type:
            - array
            - "null"
        updated_at:
          format: date-time
          type: string
        viewer_role:
          type:
            - string
            - "null"
      required:
        - tracks
        - slug
        - title
        - description
        - author
        - collection_id
        - collection_name
        - collection_slug
        - cover_hash
        - back_cover_hash
        - cover_prompt
        - back_cover_prompt
        - content_hash
        - track_count
        - total_duration_s
        - source_types
        - viewer_role
        - created_at
        - updated_at
      type: object
    CardOut:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/CardOut.json
          format: uri
          readOnly: true
          type: string
        author:
          type: string
        back_cover_hash:
          type:
            - string
            - "null"
        back_cover_prompt:
          type: string
        collection_id:
          type: string
        collection_name:
          type: string
        collection_slug:
          type: string
        content_hash:
          type:
            - string
            - "null"
        cover_hash:
          type:
            - string
            - "null"
        cover_prompt:
          type: string
        created_at:
          format: date-time
          type: string
        description:
          type: string
        slug:
          type: string
        source_types:
          items:
            type: string
          type:
            - array
            - "null"
        title:
          type: string
        total_duration_s:
          format: int64
          type: integer
        track_count:
          format: int64
          type: integer
        updated_at:
          format: date-time
          type: string
        viewer_role:
          type:
            - string
            - "null"
      required:
        - slug
        - title
        - description
        - author
        - collection_id
        - collection_name
        - collection_slug
        - cover_hash
        - back_cover_hash
        - cover_prompt
        - back_cover_prompt
        - content_hash
        - track_count
        - total_duration_s
        - source_types
        - viewer_role
        - created_at
        - updated_at
      type: object
    ChangePasswordInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/ChangePasswordInputBody.json
          format: uri
          readOnly: true
          type: string
        current_password:
          type: string
        new_password:
          type: string
      required:
        - current_password
        - new_password
      type: object
    ChangePasswordOutputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/ChangePasswordOutputBody.json
          format: uri
          readOnly: true
          type: string
        message:
          type: string
      required:
        - message
      type: object
    CollectionOut:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/CollectionOut.json
          format: uri
          readOnly: true
          type: string
        background_image_hash:
          type:
            - string
            - "null"
        card_count:
          format: int64
          type: integer
        created_at:
          format: date-time
          type: string
        description:
          type: string
        id:
          type: string
        is_default:
          type: boolean
        name:
          type: string
        slug:
          type: string
        viewer_role:
          type:
            - string
            - "null"
      required:
        - id
        - name
        - slug
        - description
        - background_image_hash
        - is_default
        - created_at
        - card_count
        - viewer_role
      type: object
    CollectionProfileOut:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/CollectionProfileOut.json
          format: uri
          readOnly: true
          type: string
        avoid_themes:
          type: string
        child_age:
          format: int64
          type:
            - integer
            - "null"
        child_name:
          type: string
        duration_min:
          format: int64
          type: integer
        friends:
          type: string
        interests:
          type: string
        notes:
          type: string
        pets:
          type: string
        prompt_template:
          type: string
        vocab_level:
          type: string
        voice_id:
          type: string
      required:
        - prompt_template
        - child_name
        - child_age
        - interests
        - avoid_themes
        - friends
        - pets
        - voice_id
        - duration_min
        - vocab_level
        - notes
      type: object
    CollectionStatsOutputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/CollectionStatsOutputBody.json
          format: uri
          readOnly: true
          type: string
        card_count:
          format: int64
          type: integer
        disk_bytes:
          format: int64
          type: integer
        published_count:
          format: int64
          type: integer
        total_duration_s:
          format: int64
          type: integer
        track_count:
          format: int64
          type: integer
      required:
        - card_count
        - track_count
        - total_duration_s
        - disk_bytes
        - published_count
      type: object
    CountCollectionsRow:
      additionalProperties: false
      properties:
        orphaned:
          format: int64
          type: integer
        total:
          format: int64
          type: integer
      required:
        - total
        - orphaned
      type: object
    CountJobsByStatusRow:
      additionalProperties: false
      properties:
        done:
          format: int64
          type: integer
        failed:
          format: int64
          type: integer
        pending:
          format: int64
          type: integer
        running:
          format: int64
          type: integer
        total:
          format: int64
          type: integer
      required:
        - pending
        - running
        - failed
        - done
        - total
      type: object
    CountUsersRow:
      additionalProperties: false
      properties:
        admins:
          format: int64
          type: integer
        total:
          format: int64
          type: integer
      required:
        - total
        - admins
      type: object
    CreateCardInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/CreateCardInputBody.json
          format: uri
          readOnly: true
          type: string
        author:
          type: string
        description:
          type: string
        slug:
          type: string
        title:
          minLength: 1
          type: string
      required:
        - title
        - description
      type: object
    CreateCollectionInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/CreateCollectionInputBody.json
          format: uri
          readOnly: true
          type: string
        description:
          type: string
        name:
          minLength: 1
          type: string
        slug:
          type: string
      required:
        - name
        - description
      type: object
    CreatePresetInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/CreatePresetInputBody.json
          format: uri
          readOnly: true
          type: string
        duration_min:
          format: int64
          type: integer
        emoji:
          type: string
        name:
          minLength: 1
          type: string
        prompt_template:
          type: string
        sort_order:
          format: int64
          type: integer
        vocab_level:
          type: string
        voice_id:
          type: string
      required:
        - name
        - emoji
        - prompt_template
        - voice_id
        - duration_min
        - vocab_level
        - sort_order
      type: object
    CreateProviderInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/CreateProviderInputBody.json
          format: uri
          readOnly: true
          type: string
        api_key:
          type: string
        budget_usd:
          format: double
          type: number
        enabled:
          type: boolean
        model:
          type: string
        monthly_budget_cents:
          format: int64
          type: integer
        priority:
          format: int64
          type: integer
        provider:
          minLength: 1
          type: string
      required:
        - provider
        - model
        - priority
        - api_key
        - budget_usd
        - enabled
      type: object
    DeletionRequestInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/DeletionRequestInputBody.json
          format: uri
          readOnly: true
          type: string
        reason:
          maxLength: 2000
          type: string
      type: object
    DeletionRequestItem:
      additionalProperties: false
      properties:
        created_at:
          format: date-time
          type: string
        expires_at:
          format: date-time
          type: string
        id:
          type: string
        owned_collections:
          items:
            $ref: "#/components/schemas/OwnedCollectionItem"
          type:
            - array
            - "null"
        reason:
          type: string
        status:
          type: string
        user_id:
          type: string
      required:
        - id
        - user_id
        - reason
        - status
        - created_at
        - expires_at
        - owned_collections
      type: object
    DeletionRequestOutputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/DeletionRequestOutputBody.json
          format: uri
          readOnly: true
          type: string
        message:
          type: string
      required:
        - message
      type: object
    DeviceOut:
      additionalProperties: false
      properties:
        account_id:
          type: string
        account_label:
          type: string
        description:
          type: string
        device_family:
          type: string
        device_id:
          type: string
        device_type:
          type: string
        form_factor:
          type: string
        generation:
          type: string
        name:
          type: string
        online:
          type: boolean
      required:
        - device_id
        - name
        - description
        - online
        - device_type
        - device_family
        - form_factor
        - generation
        - account_id
        - account_label
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: Where the error occurred, e.g. 'body.items[3].tags' or 'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
    ErrorModel:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/ErrorModel.json
          format: uri
          readOnly: true
          type: string
        detail:
          description: A human-readable explanation specific to this occurrence of the problem.
          examples:
            - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: "#/components/schemas/ErrorDetail"
          type:
            - array
            - "null"
        instance:
          description: A URI reference that identifies the specific occurrence of the problem.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
            - 400
          format: int64
          type: integer
        title:
          description: A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
            - https://example.com/errors/example
          format: uri
          type: string
      type: object
    FadeTrackInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/FadeTrackInputBody.json
          format: uri
          readOnly: true
          type: string
        fade_in_ms:
          format: int64
          maximum: 5000
          minimum: 0
          type: integer
        fade_out_ms:
          format: int64
          maximum: 5000
          minimum: 0
          type: integer
      required:
        - fade_in_ms
        - fade_out_ms
      type: object
    ForgotPasswordInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/ForgotPasswordInputBody.json
          format: uri
          readOnly: true
          type: string
        email:
          format: email
          type: string
      required:
        - email
      type: object
    ForgotPasswordOutputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/ForgotPasswordOutputBody.json
          format: uri
          readOnly: true
          type: string
        message:
          type: string
      required:
        - message
      type: object
    GenerateCoverOutputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/GenerateCoverOutputBody.json
          format: uri
          readOnly: true
          type: string
        preview_hash:
          type: string
      required:
        - preview_hash
      type: object
    GenerateCoverRequest:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/GenerateCoverRequest.json
          format: uri
          readOnly: true
          type: string
        prompt:
          description: Description of the desired cover image
          maxLength: 1000
          minLength: 1
          type: string
        side:
          default: front
          description: Cover side
          enum:
            - front
            - back
          type: string
      required:
        - prompt
      type: object
    GenerateIconsOutputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/GenerateIconsOutputBody.json
          format: uri
          readOnly: true
          type: string
        generated:
          format: int64
          type: integer
        message:
          type: string
      required:
        - generated
        - message
      type: object
    GenerateLabelsOutputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/GenerateLabelsOutputBody.json
          format: uri
          readOnly: true
          type: string
        filename:
          type: string
        url:
          type: string
      required:
        - filename
        - url
      type: object
    GenerateLabelsRequest:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/GenerateLabelsRequest.json
          format: uri
          readOnly: true
          type: string
        card_slugs:
          items:
            type: string
          type:
            - array
            - "null"
        format:
          default: pdf
          enum:
            - pdf
            - svg
          type: string
        page_size:
          default: letter
          enum:
            - letter
            - a4
          type: string
      required:
        - card_slugs
        - page_size
        - format
      type: object
    GenerateVariationsInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/GenerateVariationsInputBody.json
          format: uri
          readOnly: true
          type: string
        count:
          format: int64
          maximum: 8
          minimum: 1
          type: integer
        prompt:
          type: string
      required:
        - count
      type: object
    GetCollectionBySlugOutputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/GetCollectionBySlugOutputBody.json
          format: uri
          readOnly: true
          type: string
        background_image_hash:
          type:
            - string
            - "null"
        card_count:
          format: int64
          type: integer
        cards:
          items:
            $ref: "#/components/schemas/CardOut"
          type:
            - array
            - "null"
        created_at:
          format: date-time
          type: string
        description:
          type: string
        id:
          type: string
        is_default:
          type: boolean
        name:
          type: string
        slug:
          type: string
        viewer_role:
          type:
            - string
            - "null"
      required:
        - cards
        - id
        - name
        - slug
        - description
        - background_image_hash
        - is_default
        - created_at
        - card_count
        - viewer_role
      type: object
    GetCollectionOutputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/GetCollectionOutputBody.json
          format: uri
          readOnly: true
          type: string
        background_image_hash:
          type:
            - string
            - "null"
        card_count:
          format: int64
          type: integer
        cards:
          items:
            $ref: "#/components/schemas/CardOut"
          type:
            - array
            - "null"
        created_at:
          format: date-time
          type: string
        description:
          type: string
        id:
          type: string
        is_default:
          type: boolean
        name:
          type: string
        slug:
          type: string
        viewer_role:
          type:
            - string
            - "null"
      required:
        - cards
        - id
        - name
        - slug
        - description
        - background_image_hash
        - is_default
        - created_at
        - card_count
        - viewer_role
      type: object
    HealthOutputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/HealthOutputBody.json
          format: uri
          readOnly: true
          type: string
        status:
          type: string
      required:
        - status
      type: object
    ImportFromYotoInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/ImportFromYotoInputBody.json
          format: uri
          readOnly: true
          type: string
        account_id:
          minLength: 1
          type: string
        yoto_card_id:
          minLength: 1
          type: string
      required:
        - yoto_card_id
        - account_id
      type: object
    ImportFromYotoOutputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/ImportFromYotoOutputBody.json
          format: uri
          readOnly: true
          type: string
        card_slug:
          type: string
        job_id:
          type: string
      required:
        - card_slug
        - job_id
      type: object
    InfoSnapshot:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/InfoSnapshot.json
          format: uri
          readOnly: true
          type: string
        cached:
          type: boolean
        device_family:
          type: string
        device_id:
          type: string
        device_type:
          type: string
        form_factor:
          type: string
        fw_version:
          type: string
        generation:
          type: string
        last_updated:
          format: date-time
          type: string
        name:
          type: string
        online:
          type: boolean
        settings:
          $ref: "#/components/schemas/SettingsSnapshot"
        status:
          $ref: "#/components/schemas/StatusSnapshot"
      required:
        - device_id
        - name
        - fw_version
        - form_factor
        - generation
        - device_type
        - device_family
        - online
        - cached
        - status
        - settings
      type: object
    JobIDOutputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/JobIDOutputBody.json
          format: uri
          readOnly: true
          type: string
        job_id:
          type: string
      required:
        - job_id
      type: object
    JobOut:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/JobOut.json
          format: uri
          readOnly: true
          type: string
        attempts:
          format: int64
          type: integer
        completed_at:
          format: date-time
          type:
            - string
            - "null"
        created_at:
          format: date-time
          type: string
        error:
          type:
            - string
            - "null"
        id:
          type: string
        payload:
          type: string
        status:
          type: string
        type:
          type: string
      required:
        - id
        - type
        - status
        - payload
        - attempts
        - error
        - created_at
        - completed_at
      type: object
    LLMProviderOut:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/LLMProviderOut.json
          format: uri
          readOnly: true
          type: string
        budget_left:
          format: double
          type: number
        budget_usd:
          format: double
          type: number
        enabled:
          type: boolean
        has_key:
          type: boolean
        id:
          type: string
        model:
          type: string
        monthly_budget_cents:
          format: int64
          type:
            - integer
            - "null"
        monthly_spend_cents:
          format: int64
          type: integer
        monthly_spend_reset_at:
          type: string
        owner_type:
          type: string
        priority:
          format: int64
          type: integer
        provider:
          type: string
        spent_usd:
          format: double
          type: number
      required:
        - id
        - owner_type
        - provider
        - model
        - priority
        - has_key
        - budget_usd
        - spent_usd
        - budget_left
        - monthly_budget_cents
        - monthly_spend_cents
        - enabled
      type: object
    LabelShareOut:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/LabelShareOut.json
          format: uri
          readOnly: true
          type: string
        access_count:
          format: int64
          type: integer
        card_slugs:
          type: string
        created_at:
          format: date-time
          type: string
        expires_at:
          format: date-time
          type:
            - string
            - "null"
        id:
          type: string
        label_id:
          type: string
        slug:
          type: string
        url:
          type: string
      required:
        - id
        - slug
        - label_id
        - card_slugs
        - expires_at
        - access_count
        - created_at
      type: object
    LinkCardInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/LinkCardInputBody.json
          format: uri
          readOnly: true
          type: string
        card_id:
          minLength: 1
          type: string
      required:
        - card_id
      type: object
    ListDevicesOutputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/ListDevicesOutputBody.json
          format: uri
          readOnly: true
          type: string
        devices:
          items:
            $ref: "#/components/schemas/DeviceOut"
          type:
            - array
            - "null"
      required:
        - devices
      type: object
    ListYotoAccountsOutputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/ListYotoAccountsOutputBody.json
          format: uri
          readOnly: true
          type: string
        accounts:
          items:
            $ref: "#/components/schemas/YotoAccountOut"
          type:
            - array
            - "null"
      required:
        - accounts
      type: object
    LoginInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/LoginInputBody.json
          format: uri
          readOnly: true
          type: string
        email:
          description: User email
          format: email
          type: string
        password:
          description: User password
          type: string
      required:
        - email
        - password
      type: object
    MemberOut:
      additionalProperties: false
      properties:
        added_at:
          format: date-time
          type: string
        display_name:
          type: string
        email:
          type: string
        role:
          type: string
        user_id:
          type: string
      required:
        - user_id
        - email
        - display_name
        - role
        - added_at
      type: object
    MergeTracksInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/MergeTracksInputBody.json
          format: uri
          readOnly: true
          type: string
        title:
          type: string
        track_slugs:
          items:
            type: string
          minItems: 2
          type:
            - array
            - "null"
      required:
        - track_slugs
      type: object
    MessageOutputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/MessageOutputBody.json
          format: uri
          readOnly: true
          type: string
        message:
          type: string
      required:
        - message
      type: object
    MetricsOutputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/MetricsOutputBody.json
          format: uri
          readOnly: true
          type: string
        cards:
          format: int64
          type: integer
        collections:
          $ref: "#/components/schemas/CountCollectionsRow"
        jobs:
          $ref: "#/components/schemas/CountJobsByStatusRow"
        users:
          $ref: "#/components/schemas/CountUsersRow"
      required:
        - users
        - cards
        - collections
        - jobs
      type: object
    MoveCardHomeInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/MoveCardHomeInputBody.json
          format: uri
          readOnly: true
          type: string
        collection_id:
          minLength: 1
          type: string
      required:
        - collection_id
      type: object
    OrphanedCollectionOut:
      additionalProperties: false
      properties:
        created_at:
          format: date-time
          type: string
        description:
          type: string
        id:
          type: string
        name:
          type: string
        slug:
          type: string
      required:
        - id
        - name
        - slug
        - description
        - created_at
      type: object
    OwnedCollectionItem:
      additionalProperties: false
      properties:
        card_count:
          format: int64
          type: integer
        id:
          type: string
        name:
          type: string
      required:
        - id
        - name
        - card_count
      type: object
    PaletteOut:
      additionalProperties: false
      properties:
        colors:
          items:
            type: string
          type:
            - array
            - "null"
        name:
          type: string
      required:
        - name
        - colors
      type: object
    PlaybackConfigOut:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/PlaybackConfigOut.json
          format: uri
          readOnly: true
          type: string
        autoadvance:
          type: string
        overlay_timeout:
          format: int64
          type: integer
        resume_timeout:
          format: int64
          type: integer
        shuffle:
          type: string
      required:
        - autoadvance
        - resume_timeout
        - shuffle
        - overlay_timeout
      type: object
    PresetOut:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/PresetOut.json
          format: uri
          readOnly: true
          type: string
        collection_id:
          type: string
        created_at:
          format: date-time
          type: string
        duration_min:
          format: int64
          type: integer
        emoji:
          type: string
        id:
          type: string
        name:
          type: string
        prompt_template:
          type: string
        sort_order:
          format: int64
          type: integer
        vocab_level:
          type: string
        voice_id:
          type: string
      required:
        - id
        - collection_id
        - name
        - emoji
        - prompt_template
        - voice_id
        - duration_min
        - vocab_level
        - sort_order
        - created_at
      type: object
    PreviewTTSVoiceRequest:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/PreviewTTSVoiceRequest.json
          format: uri
          readOnly: true
          type: string
        instructions:
          type: string
        text:
          maxLength: 200
          minLength: 1
          type: string
        voice:
          minLength: 1
          type: string
      required:
        - text
        - voice
      type: object
    PublishCardsInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/PublishCardsInputBody.json
          format: uri
          readOnly: true
          type: string
        account_ids:
          items:
            type: string
          type:
            - array
            - "null"
        card_slugs:
          items:
            type: string
          type:
            - array
            - "null"
        collection_id:
          minLength: 1
          type: string
      required:
        - collection_id
        - card_slugs
        - account_ids
      type: object
    PublishRecordOut:
      additionalProperties: false
      properties:
        account_label:
          type: string
        card_id:
          type: string
        content_hash_at_publish:
          type:
            - string
            - "null"
        id:
          type: string
        last_published_at:
          format: date-time
          type:
            - string
            - "null"
        status:
          type: string
        yoto_account_id:
          type: string
        yoto_card_id:
          type:
            - string
            - "null"
      required:
        - id
        - card_id
        - yoto_account_id
        - yoto_card_id
        - last_published_at
        - content_hash_at_publish
        - status
        - account_label
      type: object
    PublishedCardOut:
      additionalProperties: false
      properties:
        card_id:
          type: string
        cover_hash:
          type:
            - string
            - "null"
        file_size_bytes:
          format: int64
          type: integer
        slug:
          type: string
        title:
          type: string
        yoto_card_id:
          type: string
      required:
        - card_id
        - slug
        - yoto_card_id
        - title
        - cover_hash
        - file_size_bytes
      type: object
    PublishedCardsOutputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/PublishedCardsOutputBody.json
          format: uri
          readOnly: true
          type: string
        cards:
          items:
            $ref: "#/components/schemas/PublishedCardOut"
          type:
            - array
            - "null"
      required:
        - cards
      type: object
    ReadyOutputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/ReadyOutputBody.json
          format: uri
          readOnly: true
          type: string
        db:
          type: string
      required:
        - db
      type: object
    RecordFinishBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/RecordFinishBody.json
          format: uri
          readOnly: true
          type: string
        title:
          type: string
      type: object
    RecordFinishOutputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/RecordFinishOutputBody.json
          format: uri
          readOnly: true
          type: string
        track_id:
          type: string
        track_slug:
          type: string
      required:
        - track_slug
        - track_id
      type: object
    RecordStartInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/RecordStartInputBody.json
          format: uri
          readOnly: true
          type: string
        title:
          type: string
      type: object
    RecordStartOutputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/RecordStartOutputBody.json
          format: uri
          readOnly: true
          type: string
        chunk_interval_s:
          format: int64
          type: integer
        session_id:
          type: string
      required:
        - session_id
        - chunk_interval_s
      type: object
    RenameCollectionSlugInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/RenameCollectionSlugInputBody.json
          format: uri
          readOnly: true
          type: string
        slug:
          minLength: 1
          type: string
      required:
        - slug
      type: object
    RenameSlugInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/RenameSlugInputBody.json
          format: uri
          readOnly: true
          type: string
        slug:
          minLength: 1
          type: string
      required:
        - slug
      type: object
    RenameTrackSlugInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/RenameTrackSlugInputBody.json
          format: uri
          readOnly: true
          type: string
        slug:
          maxLength: 200
          minLength: 1
          type: string
      required:
        - slug
      type: object
    ReorderTracksInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/ReorderTracksInputBody.json
          format: uri
          readOnly: true
          type: string
        positions:
          items:
            type: string
          type:
            - array
            - "null"
      required:
        - positions
      type: object
    ResetPasswordInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/ResetPasswordInputBody.json
          format: uri
          readOnly: true
          type: string
        new_password:
          type: string
        token:
          type: string
      required:
        - token
        - new_password
      type: object
    ResetPasswordOutputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/ResetPasswordOutputBody.json
          format: uri
          readOnly: true
          type: string
        message:
          type: string
      required:
        - message
      type: object
    RotateKeyInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/RotateKeyInputBody.json
          format: uri
          readOnly: true
          type: string
        old_key:
          minLength: 1
          type: string
      required:
        - old_key
      type: object
    SeedContentInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/SeedContentInputBody.json
          format: uri
          readOnly: true
          type: string
        account_id:
          type: string
        card_ids:
          items:
            type: string
          type:
            - array
            - "null"
        collection_id:
          type: string
        device_ids:
          items:
            type: string
          type:
            - array
            - "null"
        schedule_at:
          type:
            - string
            - "null"
      required:
        - card_ids
        - collection_id
        - device_ids
        - account_id
        - schedule_at
      type: object
    SeedExampleOutputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/SeedExampleOutputBody.json
          format: uri
          readOnly: true
          type: string
        cards_created:
          format: int64
          type: integer
        tracks_created:
          format: int64
          type: integer
      required:
        - cards_created
        - tracks_created
      type: object
    SeedJobOut:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/SeedJobOut.json
          format: uri
          readOnly: true
          type: string
        job_ids:
          items:
            type: string
          type:
            - array
            - "null"
      required:
        - job_ids
      type: object
    SeedStatusOutputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/SeedStatusOutputBody.json
          format: uri
          readOnly: true
          type: string
        seeded:
          type: boolean
      required:
        - seeded
      type: object
    SelectPreviewInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/SelectPreviewInputBody.json
          format: uri
          readOnly: true
          type: string
        index:
          format: int64
          minimum: 0
          type: integer
      required:
        - index
      type: object
    SendCommandInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/SendCommandInputBody.json
          format: uri
          readOnly: true
          type: string
        card_id:
          type: string
        command:
          type: string
      required:
        - command
      type: object
    SettingsSnapshot:
      additionalProperties: false
      properties:
        clock_face:
          type: string
        day_brightness:
          type: string
        day_max_volume:
          type: string
        day_time:
          type: string
        night_brightness:
          type: string
        night_max_volume:
          type: string
        night_time:
          type: string
        shutdown_timeout_min:
          type: string
        timezone:
          type: string
      required:
        - day_max_volume
        - night_max_volume
        - day_brightness
        - night_brightness
        - shutdown_timeout_min
        - timezone
        - clock_face
        - day_time
        - night_time
      type: object
    ShortcutIn:
      additionalProperties: false
      properties:
        card_id:
          type: string
        slot_number:
          format: int64
          type: integer
      required:
        - slot_number
        - card_id
      type: object
    SlugAvailableOutputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/SlugAvailableOutputBody.json
          format: uri
          readOnly: true
          type: string
        available:
          type: boolean
      required:
        - available
      type: object
    SourceTrackOut:
      additionalProperties: false
      properties:
        audio_path:
          type:
            - string
            - "null"
        description:
          type: string
        duration:
          format: int64
          type:
            - integer
            - "null"
        file_size_bytes:
          format: int64
          type: integer
        id:
          type: string
        parent_track_id:
          type:
            - string
            - "null"
        slug:
          type: string
        title:
          type: string
      required:
        - id
        - title
        - slug
        - audio_path
        - duration
        - file_size_bytes
        - parent_track_id
        - description
      type: object
    SplitTrackInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/SplitTrackInputBody.json
          format: uri
          readOnly: true
          type: string
        split_points:
          items:
            format: double
            type: number
          minItems: 1
          type:
            - array
            - "null"
        titles:
          items:
            type: string
          type:
            - array
            - "null"
      required:
        - split_points
      type: object
    StatusSnapshot:
      additionalProperties: false
      properties:
        active_card:
          type: string
        active_card_cover:
          type: string
        active_card_title:
          type: string
        battery_level:
          format: int64
          type: integer
        charging:
          format: int64
          type: integer
        free_disk_bytes:
          format: int64
          type: integer
        temperature_c:
          type: string
        total_disk_bytes:
          format: int64
          type: integer
        uptime_s:
          format: int64
          type: integer
        volume:
          format: int64
          type: integer
        wifi_ssid:
          type: string
        wifi_strength:
          format: int64
          type: integer
      required:
        - battery_level
        - charging
        - active_card
        - free_disk_bytes
        - total_disk_bytes
        - wifi_ssid
        - wifi_strength
        - volume
        - temperature_c
        - uptime_s
      type: object
    SuggestThemeOutputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/SuggestThemeOutputBody.json
          format: uri
          readOnly: true
          type: string
        palettes:
          items:
            $ref: "#/components/schemas/PaletteOut"
          type:
            - array
            - "null"
      required:
        - palettes
      type: object
    TTSGenerateInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/TTSGenerateInputBody.json
          format: uri
          readOnly: true
          type: string
        instructions:
          type: string
        position:
          format: int64
          type: integer
        text:
          maxLength: 5000
          minLength: 1
          type: string
        title:
          type: string
        voice:
          minLength: 1
          type: string
      required:
        - text
        - voice
      type: object
    TestProviderInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/TestProviderInputBody.json
          format: uri
          readOnly: true
          type: string
        api_key:
          minLength: 1
          type: string
        provider:
          minLength: 1
          type: string
      required:
        - provider
        - api_key
      type: object
    TestProviderOutputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/TestProviderOutputBody.json
          format: uri
          readOnly: true
          type: string
        message:
          type: string
        ok:
          type: boolean
      required:
        - ok
        - message
      type: object
    TrackDetailOut:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/TrackDetailOut.json
          format: uri
          readOnly: true
          type: string
        description:
          type: string
        duration:
          format: int64
          type:
            - integer
            - "null"
        file_size_bytes:
          format: int64
          type: integer
        icon_path:
          type:
            - string
            - "null"
        icon_prompt:
          type: string
        icon_source_path:
          type:
            - string
            - "null"
        id:
          type: string
        is_source:
          type: boolean
        original_format:
          type: string
        original_size_bytes:
          format: int64
          type: integer
        parent_track_id:
          type:
            - string
            - "null"
        position:
          format: int64
          type: integer
        processing_job_id:
          type:
            - string
            - "null"
        slug:
          type: string
        source_type:
          type: string
        stream_status:
          type:
            - string
            - "null"
        title:
          type: string
        transcode_status:
          type: string
        transcoded_format:
          type: string
        transcoded_size_bytes:
          format: int64
          type: integer
        tts_instructions:
          type:
            - string
            - "null"
        tts_provider:
          type:
            - string
            - "null"
        tts_text:
          type:
            - string
            - "null"
        tts_voice:
          type:
            - string
            - "null"
      required:
        - icon_prompt
        - parent_track_id
        - is_source
        - processing_job_id
        - tts_text
        - tts_voice
        - tts_provider
        - tts_instructions
        - id
        - position
        - title
        - slug
        - source_type
        - duration
        - file_size_bytes
        - original_format
        - original_size_bytes
        - transcoded_format
        - transcoded_size_bytes
        - transcode_status
        - stream_status
        - icon_path
        - icon_source_path
        - description
      type: object
    TrackOut:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/TrackOut.json
          format: uri
          readOnly: true
          type: string
        description:
          type: string
        duration:
          format: int64
          type:
            - integer
            - "null"
        file_size_bytes:
          format: int64
          type: integer
        icon_path:
          type:
            - string
            - "null"
        icon_prompt:
          type: string
        icon_source_path:
          type:
            - string
            - "null"
        id:
          type: string
        original_format:
          type: string
        original_size_bytes:
          format: int64
          type: integer
        position:
          format: int64
          type: integer
        slug:
          type: string
        source_type:
          type: string
        stream_status:
          type:
            - string
            - "null"
        title:
          type: string
        transcode_status:
          type: string
        transcoded_format:
          type: string
        transcoded_size_bytes:
          format: int64
          type: integer
      required:
        - id
        - position
        - title
        - slug
        - source_type
        - duration
        - file_size_bytes
        - original_format
        - original_size_bytes
        - transcoded_format
        - transcoded_size_bytes
        - transcode_status
        - stream_status
        - icon_path
        - icon_source_path
        - description
        - icon_prompt
      type: object
    TrackSlugAvailableOutputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/TrackSlugAvailableOutputBody.json
          format: uri
          readOnly: true
          type: string
        available:
          type: boolean
      required:
        - available
      type: object
    TrimTrackInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/TrimTrackInputBody.json
          format: uri
          readOnly: true
          type: string
        end:
          format: double
          type: number
        start:
          format: double
          minimum: 0
          type: number
        title:
          type: string
      required:
        - start
        - end
      type: object
    UpdateCardInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/UpdateCardInputBody.json
          format: uri
          readOnly: true
          type: string
        author:
          type: string
        description:
          type: string
        title:
          minLength: 1
          type: string
      required:
        - title
        - description
      type: object
    UpdateCollectionInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/UpdateCollectionInputBody.json
          format: uri
          readOnly: true
          type: string
        description:
          type: string
        name:
          minLength: 1
          type: string
      required:
        - name
        - description
      type: object
    UpdateCollectionProfileInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/UpdateCollectionProfileInputBody.json
          format: uri
          readOnly: true
          type: string
        avoid_themes:
          type: string
        child_age:
          format: int64
          type:
            - integer
            - "null"
        child_name:
          type: string
        duration_min:
          format: int64
          type: integer
        friends:
          type: string
        interests:
          type: string
        notes:
          type: string
        pets:
          type: string
        prompt_template:
          type: string
        vocab_level:
          type: string
        voice_id:
          type: string
      required:
        - prompt_template
        - child_name
        - child_age
        - interests
        - avoid_themes
        - friends
        - pets
        - voice_id
        - duration_min
        - vocab_level
        - notes
      type: object
    UpdateMemberInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/UpdateMemberInputBody.json
          format: uri
          readOnly: true
          type: string
        role:
          minLength: 1
          type: string
      required:
        - role
      type: object
    UpdatePlaybackConfigInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/UpdatePlaybackConfigInputBody.json
          format: uri
          readOnly: true
          type: string
        autoadvance:
          type: string
        overlay_timeout:
          format: int64
          type: integer
        resume_timeout:
          format: int64
          type: integer
        shuffle:
          type: string
      required:
        - autoadvance
        - resume_timeout
        - shuffle
        - overlay_timeout
      type: object
    UpdatePresetInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/UpdatePresetInputBody.json
          format: uri
          readOnly: true
          type: string
        duration_min:
          format: int64
          type: integer
        emoji:
          type: string
        name:
          minLength: 1
          type: string
        prompt_template:
          type: string
        sort_order:
          format: int64
          type: integer
        vocab_level:
          type: string
        voice_id:
          type: string
      required:
        - name
        - emoji
        - prompt_template
        - voice_id
        - duration_min
        - vocab_level
        - sort_order
      type: object
    UpdateProfileInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/UpdateProfileInputBody.json
          format: uri
          readOnly: true
          type: string
        display_name:
          maxLength: 100
          type: string
      required:
        - display_name
      type: object
    UpdateProfileOutputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/UpdateProfileOutputBody.json
          format: uri
          readOnly: true
          type: string
        message:
          type: string
      required:
        - message
      type: object
    UpdateProviderInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/UpdateProviderInputBody.json
          format: uri
          readOnly: true
          type: string
        api_key:
          type: string
        budget_usd:
          format: double
          type: number
        enabled:
          type: boolean
        model:
          type: string
        monthly_budget_cents:
          format: int64
          type: integer
        priority:
          format: int64
          type: integer
        provider:
          minLength: 1
          type: string
      required:
        - provider
        - model
        - priority
        - budget_usd
        - enabled
      type: object
    UpdateSettingsInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/UpdateSettingsInputBody.json
          format: uri
          readOnly: true
          type: string
        clock_face:
          type: string
        day_brightness:
          type: string
        day_max_volume:
          type: string
        day_time:
          type: string
        night_brightness:
          type: string
        night_max_volume:
          type: string
        night_time:
          type: string
        shutdown_timeout_min:
          type: string
        timezone:
          type: string
      type: object
    UpdateShortcutsInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/UpdateShortcutsInputBody.json
          format: uri
          readOnly: true
          type: string
        shortcuts:
          items:
            $ref: "#/components/schemas/ShortcutIn"
          type:
            - array
            - "null"
      required:
        - shortcuts
      type: object
    UpdateTrackDescriptionInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/UpdateTrackDescriptionInputBody.json
          format: uri
          readOnly: true
          type: string
        description:
          maxLength: 5000
          type: string
      required:
        - description
      type: object
    UpdateTrackIconPromptInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/UpdateTrackIconPromptInputBody.json
          format: uri
          readOnly: true
          type: string
        icon_prompt:
          maxLength: 2000
          type: string
      required:
        - icon_prompt
      type: object
    UpdateTrackTitleInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/UpdateTrackTitleInputBody.json
          format: uri
          readOnly: true
          type: string
        title:
          maxLength: 500
          minLength: 1
          type: string
      required:
        - title
      type: object
    UpdateTrackTitleOutputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/UpdateTrackTitleOutputBody.json
          format: uri
          readOnly: true
          type: string
        slug:
          type: string
      required:
        - slug
      type: object
    UserOut:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/UserOut.json
          format: uri
          readOnly: true
          type: string
        auth_type:
          type: string
        created_at:
          format: date-time
          type: string
        display_name:
          type: string
        email:
          type: string
        email_verified_at:
          format: date-time
          type: string
        id:
          type: string
        locked_account_count:
          format: int64
          type: integer
        role:
          type: string
        status:
          type: string
      required:
        - id
        - email
        - display_name
        - role
        - created_at
      type: object
    VariationsOutputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/VariationsOutputBody.json
          format: uri
          readOnly: true
          type: string
        count:
          format: int64
          type: integer
        estimated_usd:
          format: double
          type: number
      required:
        - count
        - estimated_usd
      type: object
    VerifyEmailInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/VerifyEmailInputBody.json
          format: uri
          readOnly: true
          type: string
        token:
          type: string
      required:
        - token
      type: object
    VerifyEmailOutputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/VerifyEmailOutputBody.json
          format: uri
          readOnly: true
          type: string
        message:
          type: string
      required:
        - message
      type: object
    VerifyPublishInputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/VerifyPublishInputBody.json
          format: uri
          readOnly: true
          type: string
        account_ids:
          items:
            type: string
          type:
            - array
            - "null"
        card_slugs:
          items:
            type: string
          type:
            - array
            - "null"
      required:
        - card_slugs
        - account_ids
      type: object
    VerifyPublishOutputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/VerifyPublishOutputBody.json
          format: uri
          readOnly: true
          type: string
        results:
          items:
            $ref: "#/components/schemas/VerifyResult"
          type:
            - array
            - "null"
      required:
        - results
      type: object
    VerifyResult:
      additionalProperties: false
      properties:
        account_id:
          type: string
        card_slug:
          type: string
        message:
          type: string
        status:
          type: string
      required:
        - card_slug
        - account_id
        - status
      type: object
    VoiceOut:
      additionalProperties: false
      properties:
        description:
          type: string
        id:
          type: string
        name:
          type: string
        provider:
          type: string
      required:
        - id
        - name
        - description
        - provider
      type: object
    YotoAccountOut:
      additionalProperties: false
      properties:
        id:
          type: string
        label:
          type: string
        last_seen:
          format: date-time
          type:
            - string
            - "null"
        status:
          type: string
      required:
        - id
        - label
        - status
        - last_seen
      type: object
    YotoLibraryCardOut:
      additionalProperties: false
      properties:
        already_imported:
          type: boolean
        chapter_count:
          format: int64
          type: integer
        cover_url:
          type:
            - string
            - "null"
        locally_edited:
          type: boolean
        title:
          type: string
        yoto_card_id:
          type: string
      required:
        - yoto_card_id
        - title
        - chapter_count
        - cover_url
        - already_imported
        - locally_edited
      type: object
info:
  description: API for managing Yoto Make Your Own audio cards.
  title: YotoShelf API
  version: 1.0.0
openapi: 3.1.0
paths:
  /admin/audit-log:
    get:
      operationId: adminAuditLog
      parameters:
        - explode: false
          in: query
          name: user_id
          schema:
            type: string
        - explode: false
          in: query
          name: action
          schema:
            type: string
        - explode: false
          in: query
          name: limit
          schema:
            default: 50
            format: int64
            maximum: 200
            minimum: 1
            type: integer
        - explode: false
          in: query
          name: offset
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/AuditLogEntryOut"
                type:
                  - array
                  - "null"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: View audit log
      tags:
        - admin
  /admin/deletion-requests:
    get:
      operationId: adminListDeletionRequests
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/DeletionRequestItem"
                type:
                  - array
                  - "null"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: List pending deletion requests
      tags:
        - admin
  /admin/deletion-requests/{id}/approve:
    post:
      operationId: adminApproveDeletion
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ApproveDeletionInputBody"
        required: true
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Approve a deletion request
      tags:
        - admin
  /admin/deletion-requests/{id}/reject:
    post:
      operationId: adminRejectDeletion
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Reject a deletion request
      tags:
        - admin
  /admin/health:
    get:
      operationId: adminHealth
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AdminHealthOutputBody"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Admin comprehensive health report
      tags:
        - admin
  /admin/jobs:
    get:
      operationId: adminListJobs
      parameters:
        - explode: false
          in: query
          name: status
          schema:
            type: string
        - explode: false
          in: query
          name: type
          schema:
            type: string
        - explode: false
          in: query
          name: limit
          schema:
            default: 50
            format: int64
            maximum: 200
            minimum: 1
            type: integer
        - explode: false
          in: query
          name: offset
          schema:
            default: 0
            format: int64
            minimum: 0
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/AdminJobOut"
                type:
                  - array
                  - "null"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: List all jobs with optional status/type filters
      tags:
        - admin
  /admin/jobs/{id}:
    delete:
      operationId: adminDeleteJob
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Delete a job by ID
      tags:
        - admin
  /admin/llm-providers:
    get:
      operationId: adminListLLMProviders
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/LLMProviderOut"
                type:
                  - array
                  - "null"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: List system LLM providers
      tags:
        - settings
    post:
      operationId: adminCreateLLMProvider
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateProviderInputBody"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LLMProviderOut"
          description: Created
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Create a system LLM provider
      tags:
        - settings
  /admin/llm-providers/test:
    post:
      operationId: adminTestLLMProvider
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TestProviderInputBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TestProviderOutputBody"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Test an LLM provider API key
      tags:
        - settings
  /admin/llm-providers/{id}:
    delete:
      operationId: adminDeleteLLMProvider
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Delete a system LLM provider
      tags:
        - settings
    put:
      operationId: adminUpdateLLMProvider
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateProviderInputBody"
        required: true
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Update a system LLM provider
      tags:
        - settings
  /admin/orphaned-collections:
    get:
      operationId: adminListOrphanedCollections
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/OrphanedCollectionOut"
                type:
                  - array
                  - "null"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: List orphaned collections
      tags:
        - admin
  /admin/orphaned-collections/{id}/assign:
    post:
      operationId: adminAssignOrphanedCollection
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AssignOrphanedInputBody"
        required: true
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Assign an orphaned collection to a user
      tags:
        - admin
  /admin/rotate-key:
    post:
      operationId: rotateEncryptionKey
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RotateKeyInputBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MessageOutputBody"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Rotate the encryption key for stored tokens
      tags:
        - admin
  /admin/seed-examples:
    post:
      operationId: seedExampleContent
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SeedExampleOutputBody"
          description: Created
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Seed example cards for first-run experience
      tags:
        - admin
  /admin/seed-status:
    get:
      operationId: getSeedStatus
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SeedStatusOutputBody"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Check whether example content has been seeded
      tags:
        - admin
  /admin/users:
    get:
      operationId: adminListUsers
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/UserOut"
                type:
                  - array
                  - "null"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: List all users
      tags:
        - admin
    post:
      operationId: adminCreateUser
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AdminCreateUserInputBody"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AdminUserOutputBody"
          description: Created
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Create a new user
      tags:
        - admin
  /admin/users/{id}:
    delete:
      operationId: adminDeleteUser
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AdminDeleteUserInputBody"
        required: true
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Directly delete a user
      tags:
        - admin
    put:
      operationId: adminUpdateUser
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AdminUpdateUserInputBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AdminUserOutputBody"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Update user role or display name
      tags:
        - admin
  /admin/users/{id}/deactivate:
    post:
      operationId: adminDeactivateUser
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Deactivate a user account
      tags:
        - admin
  /admin/users/{id}/reactivate:
    post:
      operationId: adminReactivateUser
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Reactivate a deactivated user
      tags:
        - admin
  /admin/users/{id}/resend-verification:
    post:
      operationId: adminResendVerification
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MessageOutputBody"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Resend email verification to a user
      tags:
        - admin
  /admin/users/{id}/reset-password:
    post:
      operationId: adminResetPassword
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AdminResetPasswordOutputBody"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Admin-initiated password reset
      tags:
        - admin
  /admin/users/{id}/revoke-sessions:
    post:
      operationId: adminRevokeSessions
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Revoke all sessions for a user
      tags:
        - admin
  /admin/users/{id}/unlock:
    post:
      operationId: adminUnlockUser
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Unlock a locked user account
      tags:
        - admin
  /admin/users/{id}/verify-email:
    post:
      operationId: adminVerifyEmail
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Manually verify a user's email
      tags:
        - admin
  /auth/delete-request:
    post:
      operationId: createDeletionRequest
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DeletionRequestInputBody"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeletionRequestOutputBody"
          description: Created
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Request account deletion
      tags:
        - auth
  /auth/forgot-password:
    post:
      operationId: forgotPassword
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ForgotPasswordInputBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForgotPasswordOutputBody"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security: []
      summary: Request a password reset email
      tags:
        - auth
  /auth/login:
    post:
      operationId: login
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/LoginInputBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UserOut"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security: []
      summary: Login with email and password
      tags:
        - auth
  /auth/logout:
    post:
      operationId: logout
      responses:
        "204":
          description: No Content
          headers:
            Location:
              schema:
                type: string
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security: []
      summary: Logout and clear session
      tags:
        - auth
  /auth/me:
    get:
      operationId: getMe
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UserOut"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Get current authenticated user
      tags:
        - auth
  /auth/oidc/backchannel-logout:
    post:
      operationId: oidcBackchannelLogout
      responses:
        "200":
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security: []
      summary: OIDC backchannel logout (provider-initiated)
      tags:
        - auth
  /auth/oidc/callback:
    get:
      operationId: oidcCallback
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security: []
      summary: OIDC callback (public)
      tags:
        - auth
  /auth/oidc/login:
    get:
      operationId: oidcLogin
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security: []
      summary: Initiate OIDC login flow
      tags:
        - auth
  /auth/oidc/unlink:
    post:
      operationId: oidcUnlink
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Unlink OIDC SSO from account
      tags:
        - auth
  /auth/password:
    put:
      operationId: changePassword
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ChangePasswordInputBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ChangePasswordOutputBody"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Change password (requires current password)
      tags:
        - auth
  /auth/profile:
    patch:
      operationId: updateProfile
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateProfileInputBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UpdateProfileOutputBody"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Update display name
      tags:
        - auth
  /auth/reset-password:
    post:
      operationId: resetPassword
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ResetPasswordInputBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ResetPasswordOutputBody"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security: []
      summary: Reset password using a token
      tags:
        - auth
  /auth/sessions/revoke:
    post:
      operationId: revokeSessions
      responses:
        "200":
          description: OK
          headers:
            Location:
              schema:
                type: string
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Revoke all sessions (log out everywhere)
      tags:
        - auth
  /auth/verify-email:
    post:
      operationId: verifyEmail
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/VerifyEmailInputBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/VerifyEmailOutputBody"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security: []
      summary: Verify email address using a token
      tags:
        - auth
  /cards:
    get:
      operationId: listAllCards
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/CardOut"
                type:
                  - array
                  - "null"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: List all cards across all collections
      tags:
        - cards
  /cards/import-from-yoto:
    post:
      operationId: importFromYoto
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ImportFromYotoInputBody"
        required: true
      responses:
        "202":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ImportFromYotoOutputBody"
          description: Accepted
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Import a MYO card from a linked Yoto account (async)
      tags:
        - import
  /cards/slug-available:
    get:
      operationId: checkCardSlugAvailable
      parameters:
        - explode: false
          in: query
          name: slug
          required: true
          schema:
            minLength: 1
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SlugAvailableOutputBody"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Check if a card slug is available
      tags:
        - cards
  /cards/{slug}:
    delete:
      operationId: deleteCard
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Delete a card
      tags:
        - cards
    get:
      operationId: getCard
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CardDetailOut"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Get a card by slug with its tracks
      tags:
        - cards
    put:
      operationId: updateCard
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateCardInputBody"
        required: true
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Update a card's title and description
      tags:
        - cards
  /cards/{slug}/cover:
    get:
      operationId: serveCover
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
        - description: Cover side
          explode: false
          in: query
          name: side
          schema:
            default: front
            description: Cover side
            enum:
              - front
              - back
            type: string
      responses:
        "200":
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Serve card cover image
      tags:
        - cards
    post:
      operationId: uploadCover
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
        - description: Cover side
          explode: false
          in: query
          name: side
          schema:
            default: front
            description: Cover side
            enum:
              - front
              - back
            type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              properties:
                filename:
                  contentMediaType: application/octet-stream
                  description: filename of the file being uploaded
                  format: binary
                  type: string
                name:
                  description: general purpose name for multipart form value
                  type: string
              type: object
        required: true
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Upload card cover image (multipart)
      tags:
        - cards
  /cards/{slug}/cover/accept-preview:
    post:
      operationId: acceptCoverPreview
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AcceptCoverPreviewRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GenerateCoverOutputBody"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Promote a generated cover preview to the final cover
      tags:
        - cards
  /cards/{slug}/cover/generate:
    post:
      operationId: generateCover
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/GenerateCoverRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GenerateCoverOutputBody"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Generate a preview cover image (does not commit)
      tags:
        - cards
  /cards/{slug}/cover/preview:
    get:
      operationId: serveCoverPreview
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
        - description: Cover side
          explode: false
          in: query
          name: side
          schema:
            default: front
            description: Cover side
            enum:
              - front
              - back
            type: string
      responses:
        "200":
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Serve the pending cover preview
      tags:
        - cards
  /cards/{slug}/home:
    put:
      operationId: moveCardHome
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/MoveCardHomeInputBody"
        required: true
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Move a card to a different home collection
      tags:
        - cards
  /cards/{slug}/icons/generate:
    post:
      operationId: batchGenerateIcons
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GenerateIconsOutputBody"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Batch generate icons for a card
      tags:
        - icons
  /cards/{slug}/icons/sample:
    post:
      operationId: generateIconSamples
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GenerateIconsOutputBody"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Generate icon samples for a card
      tags:
        - icons
  /cards/{slug}/icons/theme:
    post:
      operationId: suggestIconTheme
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SuggestThemeOutputBody"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Suggest an icon theme for a card
      tags:
        - icons
    put:
      operationId: approveIconTheme
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ApproveThemeInputBody"
        required: true
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Approve an icon theme for a card
      tags:
        - icons
  /cards/{slug}/icons/{position}:
    get:
      operationId: serveIcon
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
        - in: path
          name: position
          required: true
          schema:
            format: int64
            type: integer
      responses:
        "200":
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Serve 16×16 track icon PNG
      tags:
        - icons
  /cards/{slug}/icons/{position}-full:
    get:
      operationId: serveIconFull
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
        - in: path
          name: position
          required: true
          schema:
            format: int64
            type: integer
      responses:
        "200":
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Serve full-resolution track illustration
      tags:
        - icons
  /cards/{slug}/icons/{position}/preview/{index}:
    get:
      operationId: serveIconPreview
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
        - in: path
          name: position
          required: true
          schema:
            format: int64
            type: integer
        - in: path
          name: index
          required: true
          schema:
            format: int64
            type: integer
      responses:
        "200":
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Serve an icon preview PNG
      tags:
        - icons
  /cards/{slug}/icons/{position}/regenerate:
    post:
      operationId: regenerateIcon
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
        - in: path
          name: position
          required: true
          schema:
            format: int64
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GenerateIconsOutputBody"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Regenerate a single icon for a card
      tags:
        - icons
  /cards/{slug}/icons/{position}/select:
    post:
      operationId: selectIconPreview
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
        - in: path
          name: position
          required: true
          schema:
            format: int64
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SelectPreviewInputBody"
        required: true
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Select an icon preview as the final icon
      tags:
        - icons
  /cards/{slug}/icons/{position}/variations:
    post:
      operationId: generateIconVariations
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
        - in: path
          name: position
          required: true
          schema:
            format: int64
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/GenerateVariationsInputBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/VariationsOutputBody"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Generate N icon variations for preview
      tags:
        - icons
  /cards/{slug}/merge:
    post:
      operationId: mergeTracks
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/MergeTracksInputBody"
        required: true
      responses:
        "202":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/JobIDOutputBody"
          description: Accepted
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Merge multiple tracks into one
      tags:
        - cards
  /cards/{slug}/playback:
    get:
      operationId: getPlaybackConfig
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PlaybackConfigOut"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Get playback configuration for a card
      tags:
        - cards
    put:
      operationId: updatePlaybackConfig
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdatePlaybackConfigInputBody"
        required: true
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Update playback configuration for a card
      tags:
        - cards
  /cards/{slug}/publish-status:
    get:
      operationId: getPublishStatus
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/PublishRecordOut"
                type:
                  - array
                  - "null"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Get publish status for a card
      tags:
        - publish
  /cards/{slug}/slug:
    put:
      operationId: renameCardSlug
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RenameSlugInputBody"
        required: true
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Rename a card's slug
      tags:
        - cards
  /cards/{slug}/sources:
    get:
      operationId: listSourceTracks
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/SourceTrackOut"
                type:
                  - array
                  - "null"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: List source material tracks for a card
      tags:
        - cards
  /cards/{slug}/sources/{track_slug}:
    delete:
      operationId: purgeSourceTrack
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
        - in: path
          name: track_slug
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Purge a source material track (deletes file and DB record)
      tags:
        - cards
  /cards/{slug}/tracks:
    post:
      operationId: uploadTrack
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              properties:
                filename:
                  contentMediaType: application/octet-stream
                  description: filename of the file being uploaded
                  format: binary
                  type: string
                name:
                  description: general purpose name for multipart form value
                  type: string
              type: object
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TrackOut"
          description: Created
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Upload an audio track (multipart)
      tags:
        - cards
  /cards/{slug}/tracks/record-start:
    post:
      operationId: recordStart
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RecordStartInputBody"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RecordStartOutputBody"
          description: Created
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Start a recording session with ffmpeg stdin pipe
      tags:
        - recording
  /cards/{slug}/tracks/reorder:
    put:
      operationId: reorderTracks
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ReorderTracksInputBody"
        required: true
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Reorder tracks on a card
      tags:
        - cards
  /cards/{slug}/tracks/slug-available:
    get:
      operationId: checkTrackSlugAvailable
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
        - explode: false
          in: query
          name: slug
          required: true
          schema:
            minLength: 1
            type: string
        - explode: false
          in: query
          name: track_id
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TrackSlugAvailableOutputBody"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Check if a track slug is available within a card
      tags:
        - cards
  /cards/{slug}/tracks/stream:
    post:
      operationId: addStreamTrack
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AddStreamTrackInputBody"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TrackOut"
          description: Created
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Add a streaming track to a card
      tags:
        - cards
  /cards/{slug}/tracks/tts:
    post:
      operationId: generateTTSTrack
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TTSGenerateInputBody"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TrackOut"
          description: Created
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Generate a TTS audio track from text
      tags:
        - cards
  /cards/{slug}/tracks/{position}/icon:
    post:
      operationId: uploadIcon
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
        - in: path
          name: position
          required: true
          schema:
            format: int64
            type: integer
      requestBody:
        content:
          multipart/form-data:
            schema:
              properties:
                filename:
                  contentMediaType: application/octet-stream
                  description: filename of the file being uploaded
                  format: binary
                  type: string
                name:
                  description: general purpose name for multipart form value
                  type: string
              type: object
        required: true
      responses:
        "200":
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Upload a custom icon for a track position
      tags:
        - icons
  /cards/{slug}/tracks/{track_slug}:
    delete:
      operationId: deleteTrack
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
        - in: path
          name: track_slug
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Delete a track from a card
      tags:
        - cards
    get:
      operationId: getTrackBySlug
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
        - in: path
          name: track_slug
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TrackDetailOut"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Get a track by slug
      tags:
        - cards
  /cards/{slug}/tracks/{track_slug}/audio:
    get:
      operationId: serveTrackAudio
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
        - in: path
          name: track_slug
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Serve track audio file with Range support
      tags:
        - cards
  /cards/{slug}/tracks/{track_slug}/description:
    put:
      operationId: updateTrackDescription
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
        - in: path
          name: track_slug
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateTrackDescriptionInputBody"
        required: true
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Update a track's description
      tags:
        - cards
  /cards/{slug}/tracks/{track_slug}/fade:
    post:
      operationId: fadeTrack
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
        - in: path
          name: track_slug
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/FadeTrackInputBody"
        required: true
      responses:
        "202":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/JobIDOutputBody"
          description: Accepted
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Apply fade in/out to a track
      tags:
        - cards
  /cards/{slug}/tracks/{track_slug}/icon-prompt:
    put:
      operationId: updateTrackIconPrompt
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
        - in: path
          name: track_slug
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateTrackIconPromptInputBody"
        required: true
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Update a track's icon prompt
      tags:
        - cards
  /cards/{slug}/tracks/{track_slug}/slug:
    put:
      operationId: renameTrackSlug
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
        - in: path
          name: track_slug
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RenameTrackSlugInputBody"
        required: true
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Rename a track's slug
      tags:
        - cards
  /cards/{slug}/tracks/{track_slug}/split:
    post:
      operationId: splitTrack
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
        - in: path
          name: track_slug
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SplitTrackInputBody"
        required: true
      responses:
        "202":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/JobIDOutputBody"
          description: Accepted
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Split a track at marker points
      tags:
        - cards
  /cards/{slug}/tracks/{track_slug}/title:
    put:
      operationId: updateTrackTitle
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
        - in: path
          name: track_slug
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateTrackTitleInputBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UpdateTrackTitleOutputBody"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Update a track's title and auto-update slug
      tags:
        - cards
  /cards/{slug}/tracks/{track_slug}/trim:
    post:
      operationId: trimTrack
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
        - in: path
          name: track_slug
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TrimTrackInputBody"
        required: true
      responses:
        "202":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/JobIDOutputBody"
          description: Accepted
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Trim a track to a selection
      tags:
        - cards
  /collections:
    get:
      operationId: listCollections
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/CollectionOut"
                type:
                  - array
                  - "null"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: List collections for the authenticated user
      tags:
        - collections
    post:
      operationId: createCollection
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateCollectionInputBody"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CollectionOut"
          description: Created
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Create a new collection
      tags:
        - collections
  /collections/by-slug/{slug}:
    get:
      operationId: getCollectionBySlug
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetCollectionBySlugOutputBody"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Get a collection by slug with its cards
      tags:
        - collections
  /collections/default:
    post:
      operationId: getOrCreateDefaultCollection
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CollectionOut"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Get or create the default collection for Quick Record
      tags:
        - collections
  /collections/slug-available:
    get:
      operationId: checkCollectionSlugAvailable
      parameters:
        - explode: false
          in: query
          name: slug
          required: true
          schema:
            minLength: 1
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SlugAvailableOutputBody"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Check if a collection slug is available
      tags:
        - collections
  /collections/{collectionID}/cards:
    get:
      operationId: listCollectionCards
      parameters:
        - in: path
          name: collectionID
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/CardOut"
                type:
                  - array
                  - "null"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: List cards in a collection
      tags:
        - cards
    post:
      operationId: createCard
      parameters:
        - in: path
          name: collectionID
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateCardInputBody"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CardOut"
          description: Created
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Create a new card in a collection
      tags:
        - cards
  /collections/{id}:
    delete:
      operationId: deleteCollection
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
        - explode: false
          in: query
          name: cascade
          schema:
            type: boolean
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Delete a collection
      tags:
        - collections
    get:
      operationId: getCollection
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetCollectionOutputBody"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Get a collection by ID
      tags:
        - collections
    put:
      operationId: updateCollection
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateCollectionInputBody"
        required: true
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Update a collection
      tags:
        - collections
  /collections/{id}/background:
    get:
      operationId: serveCollectionBackground
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Serve collection background image
      tags:
        - collections
    post:
      operationId: uploadCollectionBackground
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              properties:
                filename:
                  contentMediaType: application/octet-stream
                  description: filename of the file being uploaded
                  format: binary
                  type: string
                name:
                  description: general purpose name for multipart form value
                  type: string
              type: object
        required: true
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Upload collection background image (multipart)
      tags:
        - collections
  /collections/{id}/cards/link:
    post:
      operationId: linkCard
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/LinkCardInputBody"
        required: true
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Link a card to a collection
      tags:
        - collections
  /collections/{id}/cards/{cardId}/link:
    delete:
      operationId: unlinkCard
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
        - in: path
          name: cardId
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Unlink a card from a collection
      tags:
        - collections
  /collections/{id}/members:
    get:
      operationId: listMembers
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/MemberOut"
                type:
                  - array
                  - "null"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: List members of a collection
      tags:
        - collections
    post:
      operationId: addMember
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AddMemberInputBody"
        required: true
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Add a member to a collection
      tags:
        - collections
  /collections/{id}/members/{userId}:
    delete:
      operationId: removeMember
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
        - in: path
          name: userId
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Remove a member from a collection
      tags:
        - collections
    put:
      operationId: updateMember
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
        - in: path
          name: userId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateMemberInputBody"
        required: true
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Update a member's role in a collection
      tags:
        - collections
  /collections/{id}/presets:
    get:
      operationId: listPresets
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/PresetOut"
                type:
                  - array
                  - "null"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: List generation presets for a collection
      tags:
        - collections
    post:
      operationId: createPreset
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreatePresetInputBody"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PresetOut"
          description: Created
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Create a generation preset
      tags:
        - collections
  /collections/{id}/presets/{preset_id}:
    delete:
      operationId: deletePreset
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
        - in: path
          name: preset_id
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Delete a generation preset
      tags:
        - collections
    put:
      operationId: updatePreset
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
        - in: path
          name: preset_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdatePresetInputBody"
        required: true
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Update a generation preset
      tags:
        - collections
  /collections/{id}/profile:
    get:
      operationId: getCollectionProfile
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CollectionProfileOut"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Get generation profile for a collection
      tags:
        - collections
    patch:
      operationId: updateCollectionProfile
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateCollectionProfileInputBody"
        required: true
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Update generation profile for a collection
      tags:
        - collections
  /collections/{id}/set-default:
    post:
      operationId: setDefaultCollection
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Set a collection as the default for Quick Record
      tags:
        - collections
  /collections/{id}/slug:
    put:
      operationId: renameCollectionSlug
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RenameCollectionSlugInputBody"
        required: true
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Rename a collection's slug
      tags:
        - collections
  /collections/{id}/stats:
    get:
      operationId: getCollectionStats
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CollectionStatsOutputBody"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Get stats for a collection
      tags:
        - collections
  /devices:
    get:
      operationId: listDevices
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListDevicesOutputBody"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: List all devices across all linked Yoto accounts
      tags:
        - devices
  /devices/{accountID}/{deviceID}/cache-status:
    get:
      operationId: getCacheStatus
      parameters:
        - in: path
          name: accountID
          required: true
          schema:
            type: string
        - in: path
          name: deviceID
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CacheStatusOut"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Get device cache status from Yoto
      tags:
        - devices
  /devices/{accountID}/{deviceID}/command:
    post:
      operationId: sendDeviceCommand
      parameters:
        - in: path
          name: accountID
          required: true
          schema:
            type: string
        - in: path
          name: deviceID
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SendCommandInputBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MessageOutputBody"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Send a command to a device
      tags:
        - devices
  /devices/{accountID}/{deviceID}/info:
    get:
      operationId: getDeviceInfo
      parameters:
        - in: path
          name: accountID
          required: true
          schema:
            type: string
        - in: path
          name: deviceID
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InfoSnapshot"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Get full device info including status and settings
      tags:
        - devices
  /devices/{accountID}/{deviceID}/published:
    get:
      operationId: getPublishedCards
      parameters:
        - in: path
          name: accountID
          required: true
          schema:
            type: string
        - in: path
          name: deviceID
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublishedCardsOutputBody"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: List cards published to this device's account
      tags:
        - devices
  /devices/{accountID}/{deviceID}/settings:
    put:
      operationId: updateDeviceSettings
      parameters:
        - in: path
          name: accountID
          required: true
          schema:
            type: string
        - in: path
          name: deviceID
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateSettingsInputBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MessageOutputBody"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Update device settings
      tags:
        - devices
  /devices/{accountID}/{deviceID}/shortcuts:
    put:
      operationId: updateShortcuts
      parameters:
        - in: path
          name: accountID
          required: true
          schema:
            type: string
        - in: path
          name: deviceID
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateShortcutsInputBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MessageOutputBody"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Update device shortcut button assignments
      tags:
        - devices
  /health:
    get:
      operationId: health
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/HealthOutputBody"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security: []
      summary: Public health check
      tags:
        - admin
  /jobs:
    get:
      operationId: listJobs
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/JobOut"
                type:
                  - array
                  - "null"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: List background jobs
      tags:
        - publish
  /jobs/{id}:
    get:
      operationId: getJob
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/JobOut"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Get a single job by ID
      tags:
        - jobs
  /labels/generate:
    post:
      operationId: generateLabels
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/GenerateLabelsRequest"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GenerateLabelsOutputBody"
          description: Created
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Generate print-ready label PDF/SVG
      tags:
        - labels
  /labels/{filename}:
    get:
      operationId: downloadLabel
      parameters:
        - in: path
          name: filename
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Download a generated label file
      tags:
        - labels
  /labels/{id}/share:
    post:
      operationId: createLabelShare
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LabelShareOut"
          description: Created
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Create a share link for a label
      tags:
        - labels
  /library/rescan:
    post:
      operationId: rescanLibrary
      responses:
        "202":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MessageOutputBody"
          description: Accepted
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Trigger a full library rescan
      tags:
        - admin
  /metrics:
    get:
      operationId: metrics
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MetricsOutputBody"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Basic system metrics
      tags:
        - admin
  /publish:
    post:
      operationId: publishCards
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PublishCardsInputBody"
        required: true
      responses:
        "202":
          description: Accepted
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Publish cards to Yoto accounts
      tags:
        - publish
  /publish/verify:
    post:
      operationId: verifyPublish
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/VerifyPublishInputBody"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/VerifyPublishOutputBody"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Verify published cards against Yoto accounts
      tags:
        - publish
  /ready:
    get:
      operationId: ready
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ReadyOutputBody"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security: []
      summary: Readiness check — pings database
      tags:
        - admin
  /recording/{session_id}/abandon:
    post:
      operationId: recordAbandon
      parameters:
        - in: path
          name: session_id
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Abandon a recording session
      tags:
        - recording
  /recording/{session_id}/chunk:
    post:
      operationId: recordChunk
      parameters:
        - in: path
          name: session_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/octet-stream:
            schema:
              contentMediaType: application/octet-stream
              format: binary
              type: string
        required: true
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Write a chunk to the recording ffmpeg stdin pipe
      tags:
        - recording
  /recording/{session_id}/finish:
    post:
      operationId: recordFinish
      parameters:
        - in: path
          name: session_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RecordFinishBody"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RecordFinishOutputBody"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: "Finish recording: close pipe, transcode FLAC to M4A, create track"
      tags:
        - recording
  /seed:
    post:
      operationId: seedContent
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SeedContentInputBody"
        required: true
      responses:
        "202":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SeedJobOut"
          description: Accepted
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Seed content to Yoto devices
      tags:
        - devices
  /settings/llm-providers:
    get:
      operationId: listLLMProviders
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/LLMProviderOut"
                type:
                  - array
                  - "null"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: List user LLM providers
      tags:
        - settings
    post:
      operationId: createLLMProvider
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateProviderInputBody"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LLMProviderOut"
          description: Created
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Create a user LLM provider
      tags:
        - settings
  /settings/llm-providers/cascade:
    get:
      operationId: getLLMProviderCascade
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/LLMProviderOut"
                type:
                  - array
                  - "null"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Get resolved LLM provider cascade for user
      tags:
        - settings
  /settings/llm-providers/{id}:
    delete:
      operationId: deleteLLMProvider
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Delete a user LLM provider
      tags:
        - settings
    put:
      operationId: updateLLMProvider
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateProviderInputBody"
        required: true
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Update a user LLM provider
      tags:
        - settings
  /settings/llm-providers/{id}/test:
    post:
      operationId: testLLMProvider
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TestProviderOutputBody"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Test a user LLM provider API key
      tags:
        - settings
  /shares:
    delete:
      operationId: revokeAllLabelShares
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Revoke all label share links for the authenticated user
      tags:
        - labels
    get:
      operationId: listLabelShares
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/LabelShareOut"
                type:
                  - array
                  - "null"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: List label share links for the authenticated user
      tags:
        - labels
  /shares/{id}:
    delete:
      operationId: revokeLabelShare
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Revoke a label share link
      tags:
        - labels
  /tts/preview:
    post:
      operationId: previewTTSVoice
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PreviewTTSVoiceRequest"
        required: true
      responses:
        "200":
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Preview a TTS voice with a short text sample
      tags:
        - tts
  /tts/voices:
    get:
      operationId: listTTSVoices
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/VoiceOut"
                type:
                  - array
                  - "null"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: List available TTS voices
      tags:
        - tts
  /yoto-accounts:
    get:
      operationId: listYotoAccounts
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListYotoAccountsOutputBody"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: List linked Yoto accounts
      tags:
        - yoto
  /yoto-accounts/callback:
    get:
      operationId: yotoOAuthCallback
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      security: []
      summary: Yoto OAuth callback (public)
      tags:
        - yoto
  /yoto-accounts/link:
    get:
      operationId: initiateYotoLink
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Initiate Yoto OAuth link flow
      tags:
        - yoto
  /yoto-accounts/{id}:
    delete:
      operationId: deleteYotoAccount
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No Content
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: Unlink a Yoto account
      tags:
        - yoto
  /yoto-accounts/{id}/library:
    get:
      operationId: listYotoLibrary
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/YotoLibraryCardOut"
                type:
                  - array
                  - "null"
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ErrorModel"
          description: Error
      summary: List MYO cards from a linked Yoto account
      tags:
        - import
