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

# Get vector database chunk

> Retrieve provenance details for a chunk in a vector database.

Returns the text content of the specified chunk along with its location within the source file and a reference to the original uploaded file. Location data includes line numbers, character offsets, page number, and the heading hierarchy at the point where the chunk appears. The `file_id` in the response identifies the source document and can be used with the file download endpoint to retrieve it.

The `chunk_id` required to call this endpoint is available in the assistant message content after a run that used the file search tool. Each chunk in the message includes `chunk_id` alongside `page`, `lines`, and `section`, giving you a complete lineage chain from model output to the original source file.

`page_number` is `null` for native Markdown and JSON files, which have no page structure.


## OpenAPI

````yaml get /v1/flow/vectordb/{database_id}/chunk/{chunk_id}
openapi: 3.1.0
info:
  title: SeekrFlow API
  description: SeekrFlow API Documentation
  termsOfService: http://www.seekr.com/support
  contact:
    name: Seekr API Support
    url: http://www.seekr.com/contact
    email: contact@seekr.com
  version: 5.99.0
servers:
  - url: https://flow.seekr.com
    description: SeekrBuild server base URL
security: []
paths:
  /v1/flow/vectordb/{database_id}/chunk/{chunk_id}:
    get:
      tags:
        - Vector database
      summary: Get vector database chunk
      description: Retrieve provenance details for a chunk in a vector database.
      operationId: >-
        get_vector_database_chunk_v1_flow_vectordb__database_id__chunk__chunk_id__get
      parameters:
        - name: database_id
          in: path
          required: true
          schema:
            type: string
            title: Database Id
        - name: chunk_id
          in: path
          required: true
          schema:
            type: string
            title: Chunk Id
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VectorDatabaseChunkResponse'
        '422':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    VectorDatabaseChunkResponse:
      properties:
        chunk_id:
          type: string
          title: Chunk Id
        file_id:
          type: string
          title: File Id
        text:
          type: string
          title: Text
        locations:
          anyOf:
            - items:
                $ref: '#/components/schemas/VectorDatabaseMarkdownLocation'
              type: array
            - type: 'null'
          title: Locations
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
          description: >-
            User-defined metadata attached to this chunk at ingestion time, or
            updated via PATCH /vectordb/{database_id}/metadata. Null if no
            metadata was provided.
      type: object
      required:
        - chunk_id
        - file_id
        - text
      title: VectorDatabaseChunkResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    VectorDatabaseMarkdownLocation:
      properties:
        line_number_start:
          anyOf:
            - type: integer
            - type: 'null'
          title: Line Number Start
        line_number_end:
          anyOf:
            - type: integer
            - type: 'null'
          title: Line Number End
        char_start:
          anyOf:
            - type: integer
            - type: 'null'
          title: Char Start
        char_end:
          anyOf:
            - type: integer
            - type: 'null'
          title: Char End
        hierarchy:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Hierarchy
        page_number:
          anyOf:
            - type: integer
            - type: 'null'
          title: Page Number
      type: object
      title: VectorDatabaseMarkdownLocation
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      description: >-
        Your Seekr API key, sent in the Authorization header with no 'Bearer'
        prefix.
      in: header
      name: Authorization

````