> ## 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.

# Generate metadata snapshot

> Generate or refresh the metadata snapshot for a vector database by sampling its chunks and ranking the most common metadata keys and values.

Sample the vector database's chunks and store a fresh metadata snapshot. The snapshot records the most common metadata keys, the most frequent values for each key, and each key's inferred type, capturing up to the 100 most common keys with up to 10 values each from as many as 10,000 chunks.

Generating a snapshot replaces the previous one for the vector database rather than adding to it. SeekrFlow also regenerates the snapshot automatically after an ingestion job adds documents.

For SDK examples, see [Generate a metadata snapshot](/flow/sdk/data-engine/generate-metadata-snapshot).


## OpenAPI

````yaml post /v1/flow/vectordb/{database_id}/metadata
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}/metadata:
    post:
      tags:
        - Vector database
      summary: Generate metadata snapshot
      description: >-
        Generate or refresh the metadata snapshot for a vector database by
        sampling its chunks and ranking the most common metadata keys and
        values.
      operationId: >-
        generate_vector_database_metadata_snapshot_v1_flow_vectordb__database_id__metadata_post
      parameters:
        - name: database_id
          in: path
          required: true
          schema:
            type: string
            title: Database Id
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/VectorDatabaseMetadataSnapshotGenerateResponse
        '422':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    VectorDatabaseMetadataSnapshotGenerateResponse:
      properties:
        vector_database_id:
          type: string
          title: Vector Database Id
          description: ID of the vector database the snapshot describes.
        keys_captured:
          type: integer
          title: Keys Captured
          description: Number of metadata keys captured in the snapshot.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Time the snapshot was generated.
      type: object
      required:
        - vector_database_id
        - keys_captured
        - created_at
      title: VectorDatabaseMetadataSnapshotGenerateResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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

````