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

# Get a library

> Fetches one library's metadata by ID. Returns the library regardless of trash state.



## OpenAPI

````yaml https://api.gumnut.ai/openapi.json get /api/libraries/{library_id}
openapi: 3.1.0
info:
  title: Gumnut API
  description: API for using Gumnut to manage photos and videos
  version: 0.1.0
servers: []
security: []
paths:
  /api/libraries/{library_id}:
    get:
      tags:
        - libraries
      summary: Get a library
      description: >-
        Fetches one library's metadata by ID. Returns the library regardless of
        trash state.
      operationId: get_library
      parameters:
        - name: library_id
          in: path
          required: true
          schema:
            type: string
            description: Library ID (with `lib_` prefix) to fetch.
            title: Library Id
          description: Library ID (with `lib_` prefix) to fetch.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LibraryResponse'
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    LibraryResponse:
      properties:
        id:
          type: string
          title: Id
          description: Unique library identifier with 'lib_' prefix
        name:
          type: string
          title: Name
          description: Display name of the library
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Optional description text for the library
        user_id:
          type: string
          title: User Id
          description: ID of the user who owns this library
        asset_count:
          type: integer
          title: Asset Count
          description: Total number of assets in this library
        storage_used_bytes:
          type: integer
          title: Storage Used Bytes
          description: Bytes of assets currently stored in this library
        storage_limit_bytes:
          anyOf:
            - type: integer
            - type: 'null'
          title: Storage Limit Bytes
          description: >-
            Maximum bytes this library may store, or null if no per-library
            limit applies
        created_at:
          type: string
          format: date-time
          title: Created At
          description: When this library was created
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: When this library was last updated
      type: object
      required:
        - id
        - name
        - user_id
        - asset_count
        - storage_used_bytes
        - created_at
        - updated_at
      title: LibraryResponse
      description: Represents a user's photo library.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````