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

# Compare two commits

> What changed across the whole folder between two commits, as GitHub's /compare/{base}...{head} and git diff a b. basehead is <base>...<head> or <base>..<head>; each end is a commit id, a tag or a unique prefix of 4 or more characters, and an empty head (or HEAD) means today. History is one line, so status is ahead, behind or identical, never diverged. Three dots diff the merge base (the older end) to head, as GitHub, so a head behind its base lists no files; two dots diff base to head directly. commits are head's commits base lacks, oldest first (at most 250); files are the notes that differ (at most 300). Never guessed: a note the kept history cannot rebuild at either end, or whose existence there is uncertain, is listed with status uncertain, uncertain true and no patch.



## OpenAPI

````yaml /openapi.json get /folders/{id}/compare/{basehead}
openapi: 3.1.0
info:
  title: Nemonist API
  version: 1.0.0
  description: >-
    OpenRouter-compatible API with durable per-workspace memory. Point any
    OpenRouter client at https://nemonist.com/api/v1 with a Nemonist key
    (sk-nm-...). Chat completions, Responses and Messages requests from a
    workspace carrying a .nemonist/key get its memory; every other request is
    answered as OpenRouter would.
  contact:
    name: Nemonist
    url: https://nemonist.com
servers:
  - url: https://nemonist.com/api/v1
    description: Production
security:
  - apiKey: []
tags:
  - description: API key management endpoints
    name: API Keys
  - description: Analytics and usage endpoints
    name: Analytics
  - description: Anthropic Messages endpoints
    name: Anthropic Messages
  - description: BYOK endpoints
    name: BYOK
  - description: Benchmarks endpoints
    name: Benchmarks
  - description: Chat completion endpoints
    name: Chat
  - description: Credit management endpoints
    name: Credits
  - description: >-
      Public OpenRouter usage datasets. Data returned by these endpoints is
      licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/):
      reuse and republish it, including commercially, with attribution to
      OpenRouter.
    name: Datasets
  - description: Text embedding endpoints
    name: Embeddings
  - description: Endpoint information
    name: Endpoints
  - name: Folders
    description: >-
      Your memory folders, over your account's API key: read, export, upload,
      and manage keys.
  - description: Generation history endpoints
    name: Generations
  - description: Guardrails endpoints
    name: Guardrails
  - description: Images endpoints
    name: Images
  - name: Memory
    description: Nemonist's per-workspace memory.
  - name: Model runs
    description: Run models (physics and others) on inputs; one contract for every model
  - description: Model information endpoints
    name: Models
  - description: OAuth authentication endpoints
    name: OAuth
  - description: Organization endpoints
    name: Organization
  - description: Private Endpoints endpoints
    name: Private Endpoints
  - description: Provider information endpoints
    name: Providers
  - description: Rerank endpoints
    name: Rerank
  - description: OpenAI-compatible Responses API endpoints
    name: Responses
  - description: Speech-to-text endpoints
    name: STT
    x-displayName: Transcriptions
  - description: >-
      System One endpoints for models such as Jev, compatible with the TypeSafe
      SDKs. See https://openrouter.ai/docs/guides/community/typesafe-sdk.
    name: SystemOne
    x-displayName: System One
  - description: Text-to-speech endpoints
    name: TTS
    x-displayName: Speech
  - description: Video Generation endpoints
    name: Video Generation
  - description: Workspaces endpoints
    name: Workspaces
  - name: beta.responses
    description: >-
      Deprecated alias of responses. Use responses instead; scheduled for
      removal (sunset date TBD).
paths:
  /folders/{id}/compare/{basehead}:
    get:
      tags:
        - Folders
      summary: Compare two commits
      description: >-
        What changed across the whole folder between two commits, as GitHub's
        /compare/{base}...{head} and git diff a b. basehead is <base>...<head>
        or <base>..<head>; each end is a commit id, a tag or a unique prefix of
        4 or more characters, and an empty head (or HEAD) means today. History
        is one line, so status is ahead, behind or identical, never diverged.
        Three dots diff the merge base (the older end) to head, as GitHub, so a
        head behind its base lists no files; two dots diff base to head
        directly. commits are head's commits base lacks, oldest first (at most
        250); files are the notes that differ (at most 300). Never guessed: a
        note the kept history cannot rebuild at either end, or whose existence
        there is uncertain, is listed with status uncertain, uncertain true and
        no patch.
      operationId: compareFolderCommits
      parameters:
        - name: id
          in: path
          required: true
          description: The folder's id (fld_...), as GET /folders lists it.
          schema:
            type: string
        - name: basehead
          in: path
          required: true
          description: >-
            <base>...<head> or <base>..<head> (URL-encoded); head may be empty,
            or HEAD alone, for today. Each end may be HEAD~N or <ref>~N (N
            commits older; HEAD~0 is the newest commit itself).
          schema:
            type: string
      responses:
        '200':
          description: The comparison.
          content:
            application/json:
              schema:
                type: object
                description: A comparison of two commits.
                properties:
                  base_commit:
                    type: object
                    description: 'One end of a comparison: a commit, or today.'
                    properties:
                      id:
                        type:
                          - string
                          - 'null'
                        description: The commit id, or null for today.
                      at:
                        type: string
                        description: Its newest edit's time (ISO 8601).
                      message:
                        type: string
                        description: The first edit's reason, as a commit subject.
                      authors:
                        type: array
                        description: 'Team memory: who made its edits.'
                        items:
                          type: string
                          description: A member.
                      stats:
                        type: object
                        description: Its size.
                        properties:
                          files:
                            type: integer
                            description: Notes changed.
                          additions:
                            type: integer
                            description: Lines put in.
                          deletions:
                            type: integer
                            description: Lines removed.
                      paths:
                        type: array
                        description: The notes it changed.
                        items:
                          type: string
                          description: A path.
                      html_url:
                        type: string
                        description: Its page on the dashboard.
                      tags:
                        type: array
                        description: The tags that name it, by name (absent when none).
                        items:
                          type: string
                          description: A tag name.
                      session:
                        type: string
                        description: >-
                          The request that made it (absent on edits kept before
                          Nov 17 2026), as a Copilot agent commit names its
                          session.
                      started_by:
                        type: string
                        description: >-
                          The hash of the API key that sent that request, as the
                          dashboard's API keys list it.
                      turn_url:
                        type: string
                        description: >-
                          That turn in Logs: its memory round, with tokens, cost
                          and time.
                      today:
                        type: boolean
                        description: True when this end is today (an empty head or HEAD).
                  head_commit:
                    type: object
                    description: 'One end of a comparison: a commit, or today.'
                    properties:
                      id:
                        type:
                          - string
                          - 'null'
                        description: The commit id, or null for today.
                      at:
                        type: string
                        description: Its newest edit's time (ISO 8601).
                      message:
                        type: string
                        description: The first edit's reason, as a commit subject.
                      authors:
                        type: array
                        description: 'Team memory: who made its edits.'
                        items:
                          type: string
                          description: A member.
                      stats:
                        type: object
                        description: Its size.
                        properties:
                          files:
                            type: integer
                            description: Notes changed.
                          additions:
                            type: integer
                            description: Lines put in.
                          deletions:
                            type: integer
                            description: Lines removed.
                      paths:
                        type: array
                        description: The notes it changed.
                        items:
                          type: string
                          description: A path.
                      html_url:
                        type: string
                        description: Its page on the dashboard.
                      tags:
                        type: array
                        description: The tags that name it, by name (absent when none).
                        items:
                          type: string
                          description: A tag name.
                      session:
                        type: string
                        description: >-
                          The request that made it (absent on edits kept before
                          Nov 17 2026), as a Copilot agent commit names its
                          session.
                      started_by:
                        type: string
                        description: >-
                          The hash of the API key that sent that request, as the
                          dashboard's API keys list it.
                      turn_url:
                        type: string
                        description: >-
                          That turn in Logs: its memory round, with tokens, cost
                          and time.
                      today:
                        type: boolean
                        description: True when this end is today (an empty head or HEAD).
                  merge_base_commit:
                    type: object
                    description: 'One end of a comparison: a commit, or today.'
                    properties:
                      id:
                        type:
                          - string
                          - 'null'
                        description: The commit id, or null for today.
                      at:
                        type: string
                        description: Its newest edit's time (ISO 8601).
                      message:
                        type: string
                        description: The first edit's reason, as a commit subject.
                      authors:
                        type: array
                        description: 'Team memory: who made its edits.'
                        items:
                          type: string
                          description: A member.
                      stats:
                        type: object
                        description: Its size.
                        properties:
                          files:
                            type: integer
                            description: Notes changed.
                          additions:
                            type: integer
                            description: Lines put in.
                          deletions:
                            type: integer
                            description: Lines removed.
                      paths:
                        type: array
                        description: The notes it changed.
                        items:
                          type: string
                          description: A path.
                      html_url:
                        type: string
                        description: Its page on the dashboard.
                      tags:
                        type: array
                        description: The tags that name it, by name (absent when none).
                        items:
                          type: string
                          description: A tag name.
                      session:
                        type: string
                        description: >-
                          The request that made it (absent on edits kept before
                          Nov 17 2026), as a Copilot agent commit names its
                          session.
                      started_by:
                        type: string
                        description: >-
                          The hash of the API key that sent that request, as the
                          dashboard's API keys list it.
                      turn_url:
                        type: string
                        description: >-
                          That turn in Logs: its memory round, with tokens, cost
                          and time.
                      today:
                        type: boolean
                        description: True when this end is today (an empty head or HEAD).
                  status:
                    type: string
                    description: ahead, behind or identical.
                  ahead_by:
                    type: integer
                    description: Commits in head that base lacks.
                  behind_by:
                    type: integer
                    description: Commits in base that head lacks.
                  total_commits:
                    type: integer
                    description: Commits in the range (ahead_by).
                  commits:
                    type: array
                    description: The range's commits, oldest first.
                    items:
                      type: object
                      description: 'A commit: one agent turn''s note edits.'
                      properties:
                        id:
                          type: string
                          description: >-
                            The commit id: the turn's, as the Memory page's
                            Commits tab shows it.
                        at:
                          type: string
                          description: Its newest edit's time (ISO 8601).
                        message:
                          type: string
                          description: The first edit's reason, as a commit subject.
                        authors:
                          type: array
                          description: 'Team memory: who made its edits.'
                          items:
                            type: string
                            description: A member.
                        stats:
                          type: object
                          description: Its size.
                          properties:
                            files:
                              type: integer
                              description: Notes changed.
                            additions:
                              type: integer
                              description: Lines put in.
                            deletions:
                              type: integer
                              description: Lines removed.
                        paths:
                          type: array
                          description: The notes it changed.
                          items:
                            type: string
                            description: A path.
                        html_url:
                          type: string
                          description: Its page on the dashboard.
                        tags:
                          type: array
                          description: The tags that name it, by name (absent when none).
                          items:
                            type: string
                            description: A tag name.
                        session:
                          type: string
                          description: >-
                            The request that made it (absent on edits kept
                            before Nov 17 2026), as a Copilot agent commit names
                            its session.
                        started_by:
                          type: string
                          description: >-
                            The hash of the API key that sent that request, as
                            the dashboard's API keys list it.
                        turn_url:
                          type: string
                          description: >-
                            That turn in Logs: its memory round, with tokens,
                            cost and time.
                      required:
                        - id
                        - at
                  files:
                    type: array
                    description: The notes that differ, by path.
                    items:
                      type: object
                      description: One note's change across the range.
                      properties:
                        path:
                          type: string
                          description: The note.
                        status:
                          type: string
                          description: added, modified, removed, or uncertain.
                        additions:
                          type: integer
                          description: Lines put in.
                        deletions:
                          type: integer
                          description: Lines removed.
                        changes:
                          type: integer
                          description: additions + deletions.
                        patch:
                          type: string
                          description: >-
                            The unified diff hunks, without file headers (absent
                            when uncertain or too long).
                        patch_omitted:
                          type: string
                          description: >-
                            Why the patch is left out, when it is longer than
                            200,000 characters.
                        uncertain:
                          type: boolean
                          description: >-
                            True when the kept history cannot rebuild the note
                            at one end; nothing is guessed.
                        reason:
                          type: string
                          description: Why it is uncertain.
                        html_url:
                          type: string
                          description: The note on the dashboard.
                      required:
                        - path
                        - status
                        - uncertain
                  truncated:
                    type: object
                    description: Whether a list was cut at its cap.
                    properties:
                      commits:
                        type: boolean
                        description: More than 250 commits.
                      files:
                        type: boolean
                        description: More than 300 files.
                  html_url:
                    type: string
                    description: >-
                      The folder's range compare page on the dashboard
                      (`compare=` on its Commits tab): base and head pickers,
                      the summary, the commits oldest first and each changed
                      note's diff, as GitHub's compare page.
                required:
                  - base_commit
                  - head_commit
                  - status
                  - ahead_by
                  - behind_by
                  - total_commits
                  - commits
                  - files
        '400':
          description: basehead is not <base>...<head> or <base>..<head>, or base is empty.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NemonistError'
        '401':
          description: Missing or invalid key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NemonistError'
        '404':
          description: >-
            No such commit or tag, a tag whose commit is no longer kept, or no
            such folder.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NemonistError'
        '409':
          description: A prefix starts more than one commit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NemonistError'
        '500':
          description: 'Nemonist: an internal error answered this request; retry.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NemonistError'
        '503':
          description: 'Nemonist: the account service is temporarily unavailable; retry.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NemonistError'
components:
  schemas:
    NemonistError:
      type: object
      description: An error answer.
      required:
        - error
      properties:
        error:
          type: object
          description: What went wrong.
          required:
            - message
          properties:
            code:
              type:
                - integer
                - string
              description: HTTP status or a short error code.
            type:
              type: string
              description: Error kind, such as proxy_error.
            message:
              type: string
              description: Human-readable error message.
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        A Nemonist key (sk-nm-...) as a bearer token in the Authorization
        header.

````

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