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

# Get Semantic Set Id

> Get or create a semantic set ID.

    Returns the set ID for the given set type configuration and optional
    metadata. If the set does not exist, it is created.

    The set ID is deterministically generated based on:
    - Organization and project scope
    - Set type (org-level or project-level)
    - Metadata tags and values



## OpenAPI

````yaml /openapi.json post /api/v2/memories/semantic/set_id/get
openapi: 3.1.0
info:
  title: MemMachine API
  version: 0.3.10
  description: >-
    Architectural Memory Systems for AI Agents. Specialized in episodic and
    semantic memory management with strict namespace isolation.
servers:
  - url: http://localhost:8080
security: []
tags:
  - name: Configuration
    description: System overview and memory subsystem configuration.
  - name: Episodic Configuration
    description: Per-project episodic memory subsystem configuration.
  - name: Memories
    description: Core operations for episodic and semantic memory ingestion and retrieval.
  - name: Projects
    description: Lifecycle management for isolated memory namespaces.
  - name: Resources
    description: Embedder, language model, and reranker lifecycle management.
  - name: 'Semantic Memory: Categories'
    description: Category, template, and tag management for semantic sets.
  - name: 'Semantic Memory: Features'
    description: Add, retrieve, and update individual semantic features.
  - name: 'Semantic Memory: Sets'
    description: Set type and set ID lifecycle, listing, and configuration.
  - name: System
    description: Infrastructure, health, and observability.
paths:
  /api/v2/memories/semantic/set_id/get:
    post:
      tags:
        - 'Semantic Memory: Sets'
      summary: Get Semantic Set Id
      description: |-
        Get or create a semantic set ID.

            Returns the set ID for the given set type configuration and optional
            metadata. If the set does not exist, it is created.

            The set ID is deterministically generated based on:
            - Organization and project scope
            - Set type (org-level or project-level)
            - Metadata tags and values
      operationId: get_semantic_set_id
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetSemanticSetIdSpec'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSemanticSetIdResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    GetSemanticSetIdSpec:
      properties:
        org_id:
          type: string
          title: Org Id
          description: |2-

                The unique identifier of the organization.

                - Must not contain slashes (`/`).
                - Must contain only letters, numbers, underscores, hyphens, colon, and Unicode
                  characters (e.g., Chinese/Japanese/Korean). No slashes or other symbols
                  are allowed.

                This value determines the namespace the project belongs to.
                
          default: universal
          examples:
            - MemVerge
            - AI_Labs
        project_id:
          type: string
          title: Project Id
          description: |2-

                The identifier of the project.

                - Must be unique within the organization.
                - Must not contain slashes (`/`).
                - Must contain only letters, numbers, underscores, hyphens, colon, and Unicode
                  characters (e.g., Chinese/Japanese/Korean). No slashes or other symbols
                  are allowed.

                This ID is used in API paths and resource locations.
                
          default: universal
          examples:
            - memmachine
            - research123
            - qa_pipeline
        is_org_level:
          type: boolean
          title: Is Org Level
          description: |2-

                Whether the set type is scoped at the organization level (True) or
                project level (False). Org-level sets are shared across all projects
                within the organization.
          default: false
        metadata_tags:
          items:
            type: string
          type: array
          title: Metadata Tags
          description: |2-

                Ordered list of metadata tag keys that define this set type. These tags
                determine how set IDs are generated and grouped. For example,
                ["user_id", "session_id"] means sets are grouped by user and session.
        set_metadata:
          anyOf:
            - additionalProperties:
                $ref: '#/components/schemas/JsonValue'
              type: object
            - type: 'null'
          title: Set Metadata
          description: |2-

                Optional metadata key-value pairs used to filter or identify semantic sets.
      type: object
      required:
        - metadata_tags
      title: GetSemanticSetIdSpec
      description: Specification model for getting a semantic set ID.
    GetSemanticSetIdResponse:
      properties:
        set_id:
          type: string
          title: Set Id
          description: Identifier of the semantic set.
      type: object
      required:
        - set_id
      title: GetSemanticSetIdResponse
      description: Response model for getting a semantic set ID.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    JsonValue: {}
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````