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

# Get an inclusion proof

> Proves the leaf at `leaf_index` is in the tree of size `tree_size` (default: the current size), with its leaf hash and the root. A receipt already carries one; use this to prove it against a newer head. Free and public.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/log/proof
openapi: 3.1.0
info:
  description: 'The public HTTP API of QED Proof. Guides: https://docs.qedproof.site'
  title: QED Proof API
  version: 0.1.0
servers:
  - url: https://api.qedproof.site
security: []
paths:
  /v1/log/proof:
    get:
      summary: Get an inclusion proof
      description: >-
        Proves the leaf at `leaf_index` is in the tree of size `tree_size`
        (default: the current size), with its leaf hash and the root. A receipt
        already carries one; use this to prove it against a newer head. Free and
        public.
      operationId: log_proof_v1_log_proof_get
      parameters:
        - in: query
          name: leaf_index
          required: true
          schema:
            minimum: 0
            title: Leaf Index
            type: integer
        - in: query
          name: tree_size
          required: false
          schema:
            anyOf:
              - minimum: 1
                type: integer
              - type: 'null'
            title: Tree Size
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: true
                title: Response Log Proof V1 Log Proof Get
                type: object
          description: Successful Response
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Invalid parameters.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: No such leaf in a tree of that size.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Rate limit exceeded.
components:
  schemas:
    Error:
      properties:
        detail:
          description: What went wrong, in plain words.
          type: string
      required:
        - detail
      title: Error
      type: object
    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

````

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