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

# Report lemma usage

> Hit counts of a run (lemma ids, counts, project). Never code. Feeds the hit statistics and the website's node pages.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/lemmas/usage
openapi: 3.1.0
info:
  title: Spec Hub API
  version: '1'
  description: >-
    The registry of Lean 4 specification packages, the cloud verification queue
    and the Lemma Hub. The `theformalera` CLI is the main client; this API is
    what it calls.
servers:
  - url: https://hub.theformalera.com
    description: Spec Hub
  - url: http://127.0.0.1:8700
    description: Local Hub (`theformalera-hub serve`)
security: []
tags:
  - name: Registry
    description: 'Public: no token needed.'
  - name: Verification
    description: Cloud solving (`runner = "cloud"`).
  - name: Lemma Hub
    description: Lemma retrieval, deposit and usage statistics.
paths:
  /v1/lemmas/usage:
    post:
      tags:
        - Lemma Hub
      summary: Report lemma usage
      description: >-
        Hit counts of a run (lemma ids, counts, project). Never code. Feeds the
        hit statistics and the website's node pages.
      operationId: lemma_usage_v1_lemmas_usage_post
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                hits:
                  type: object
                  properties: {}
                  description: Lemma id → hit count.
                project:
                  type: string
                  description: Project name.
            example:
              hits:
                L-d07f2c: 4
              project: acme-qwen3.8-27b-h100
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    description: Always true.
              example:
                ok: true
        '401':
          description: Missing or invalid bearer token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    Error:
      type: object
      properties:
        detail:
          type: string
          description: Why the request was refused.
      required:
        - detail
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        A Spec Hub API token (`tfe_…`). The CLI reads it from
        `THEFORMALERA_TOKEN` or from `theformalera login`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.