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

# Get a document

> Read one document's metadata, including how many topics were extracted from it.

`topic_count` greater than 0 is also the authoritative signal that an async ingest finished.

The text itself lives in those topics; list them with GET .../documents/{doc_id}/topics.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v2/knowledge_bases/{kb_id}/documents/{doc_id}
openapi: 3.1.0
info:
  title: EverOS Cloud Memory API
  version: 2.0.0
  license:
    name: Apache-2.0
    identifier: Apache-2.0
  contact:
    name: EverMind AI
    email: service@evermind.ai
    url: https://github.com/EverMind-AI/everos-cloud-sdk-python
  description: >-
    Official Python client for the EverOS Cloud Memory API. Add, search,
    retrieve, and manage long-term memory for your AI applications over a typed
    interface (pydantic v2, with full type hints). Install and usage guides:
    https://github.com/EverMind-AI/everos-cloud-sdk-python
servers:
  - url: https://api.evermind.ai
    description: Production
security:
  - BearerAuth: []
paths:
  /api/v2/knowledge_bases/{kb_id}/documents/{doc_id}:
    get:
      tags:
        - Knowledge
      summary: Get a document
      description: >-
        Read one document's metadata, including how many topics were extracted
        from it.


        `topic_count` greater than 0 is also the authoritative signal that an
        async ingest finished.


        The text itself lives in those topics; list them with GET
        .../documents/{doc_id}/topics.
      operationId: getDocument
      parameters:
        - name: kb_id
          in: path
          required: true
          schema:
            type: string
            title: Kb Id
        - name: doc_id
          in: path
          required: true
          schema:
            type: string
            title: Doc Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessEnvelope_DocData_'
        '401':
          description: Missing or invalid bearer token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
        '403':
          description: >-
            Authenticated but not permitted — either rejected by the auth
            service, or the account's memory API version does not match the
            interface version implied by the path (a v1 account calling an
            /api/v2 route).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Rate limit or quota exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
        '503':
          description: >-
            The gateway could not reach the authentication service. Transient —
            retry with backoff.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
components:
  schemas:
    SuccessEnvelope_DocData_:
      properties:
        request_id:
          type: string
          title: Request Id
          description: Request trace id (peer to data)
        data:
          $ref: '#/components/schemas/DocData'
          description: Endpoint-defined business result
      type: object
      required:
        - request_id
        - data
      title: SuccessEnvelope[DocData]
    GatewayError:
      type: object
      additionalProperties: true
      description: >-
        Gateway error body. NOTE: shape is not yet uniform across auth/quota/
        rate-limit paths — treat fields as best-effort. Commonly includes a
        `code`/`message` (flat) or an `error` object/string with a `message`.
      title: GatewayError
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
          description: One entry per field that failed validation.
      type: object
      title: HTTPValidationError
    DocData:
      properties:
        id:
          type: string
          title: Id
          description: Document id (bare primary key)
        kb_id:
          type: string
          title: Kb Id
          description: The knowledge base this document belongs to.
        category_id:
          type: string
          title: Category Id
          default: ''
          description: The category it is filed under; empty when it is uncategorized.
        category_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Category Name
          description: >-
            Resolved category display name (kb-local or tenant-global preset);
            None when the document is unclassified or the category no longer
            exists
        title:
          type: string
          title: Title
          description: The document's title.
        summary:
          anyOf:
            - type: string
            - type: 'null'
          title: Summary
          description: Document-level summary produced during ingest.
        source_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Name
          description: Name of the file or source it was ingested from.
        source_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Type
          description: What kind of source it came from.
        tags:
          items:
            $ref: '#/components/schemas/TagRef'
          type: array
          title: Tags
          description: >-
            Distinct opaque ids from the document's read-only topic-tag union.
            Cloud leaves name unset; KHS may validate and expand display names.
            This document aggregate is read-only and carries no topic ownership
            field.
        topic_count:
          type: integer
          title: Topic Count
          description: >-
            Number of real topics extracted (0 = not ingested yet / ingest
            failed). EXCLUDES the synthetic document-root node, so `GET
            .../topics` — which includes it — returns exactly one more item than
            this
          default: 0
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
          description: When the document was created.
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
          description: When it last changed.
      type: object
      required:
        - id
        - kb_id
        - title
        - tags
      title: DocData
      description: >-
        A document as returned to clients. ``topic_count`` = the node_count (>0
        = ingested).


        Contract note — ``topic_count`` vs ``GET .../topics``: the count is of
        REAL topics and

        excludes the synthetic document-root node, while the topics list
        INCLUDES it. So

        ``len(topics) == topic_count + 1`` for an ingested document. See
        ``TopicListData``.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
          description: Path to the offending field, from the body root.
        msg:
          type: string
          title: Message
          description: What is wrong with it.
        type:
          type: string
          title: Error Type
          description: Machine-readable validation-error kind.
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    TagRef:
      properties:
        id:
          type: string
          title: Id
          description: Opaque semantic tag id.
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: >-
            The tag's display name when one is resolved; null when only the id
            is known.
      additionalProperties: false
      type: object
      required:
        - id
      title: TagRef
      description: Opaque semantic tag reference; its containing topic conveys ownership.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: 'API key issued by EverOS, sent as `Authorization: Bearer <api_key>`.'

````