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

# Anonymized diagnostics or usage records

> Returns selected anonymized diagnostics categories.

Reuses :func:`bioptimus.observability.probes.snapshot` to capture
versions, host, GPU, dependencies, disk, and loaded-model state for the
models currently held by this worker, and :func:`read_recent_logs` to
read the tail of the server's log file. Both are anonymized so the
response is safe to attach to a support request. The snapshot is
fail-safe: a failing probe degrades to an error section rather than
failing the request. Logs are empty when no log file is configured.
When the optional ``categories`` query parameter is omitted, the
response keeps the historical full-diagnostics shape. When provided,
``usage`` returns only model-request usage log entries and
``diagnostics`` returns the full diagnostics payload under a
``diagnostics`` key.

Security: this endpoint is unauthenticated and returns the server's
environment and recent activity, so it must sit behind the same VPN or
network protection as the rest of the deployment rather than being
exposed publicly.



## OpenAPI

````yaml /api-reference/openapi.json get /diagnostics
openapi: 3.1.0
info:
  description: >
    Multi-model inference server for Bioptimus models. Remove entries from the
    ``models`` section below to skip loading and endpoint creation for specific
    models.

    **Available models:** - **H1** — tile embeddings - **M-Optimus** — spatial
    gene expression prediction - **tissue-seg** — tissue segmentation mask
  title: Bioptimus Model Server
  version: 1.0.0
servers: []
security: []
paths:
  /diagnostics:
    get:
      tags:
        - Diagnostics
      summary: Anonymized diagnostics or usage records
      description: |-
        Returns selected anonymized diagnostics categories.

        Reuses :func:`bioptimus.observability.probes.snapshot` to capture
        versions, host, GPU, dependencies, disk, and loaded-model state for the
        models currently held by this worker, and :func:`read_recent_logs` to
        read the tail of the server's log file. Both are anonymized so the
        response is safe to attach to a support request. The snapshot is
        fail-safe: a failing probe degrades to an error section rather than
        failing the request. Logs are empty when no log file is configured.
        When the optional ``categories`` query parameter is omitted, the
        response keeps the historical full-diagnostics shape. When provided,
        ``usage`` returns only model-request usage log entries and
        ``diagnostics`` returns the full diagnostics payload under a
        ``diagnostics`` key.

        Security: this endpoint is unauthenticated and returns the server's
        environment and recent activity, so it must sit behind the same VPN or
        network protection as the rest of the deployment rather than being
        exposed publicly.
      operationId: diagnostics_diagnostics_get
      parameters:
        - description: >-
            Optional data categories to share. Use 'usage' for model-request
            usage records only, or 'diagnostics' for the full diagnostics
            payload.
          in: query
          name: categories
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            description: >-
              Optional data categories to share. Use 'usage' for model-request
              usage records only, or 'diagnostics' for the full diagnostics
              payload.
            title: Categories
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object

````