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

# Partially Update Namespace

> Partially updates an existing namespace (PATCH operation)



## OpenAPI

````yaml patch /v1/namespaces/{namespace_identifier}
openapi: 3.1.0
info:
  title: Mixpeek API
  description: >-
    This is the Mixpeek API, providing access to various endpoints for data
    processing and retrieval.
  termsOfService: https://mixpeek.com/terms
  contact:
    name: Mixpeek Support
    url: https://mixpeek.com/contact
    email: info@mixpeek.com
  version: '0.82'
servers:
  - url: https://api.mixpeek.com
    description: Production
security: []
paths:
  /v1/namespaces/{namespace_identifier}:
    patch:
      tags:
        - Namespaces
      summary: Partially Update Namespace
      description: Partially updates an existing namespace (PATCH operation)
      operationId: patch_namespace_v1_namespaces__namespace_identifier__patch
      parameters:
        - name: namespace_identifier
          in: path
          required: true
          schema:
            type: string
            description: Either the namespace name or namespace ID
            examples:
              - my_namespace
              - ns_1234567890
            title: Namespace Identifier
          description: Either the namespace name or namespace ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchNamespaceRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NamespaceModel'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    PatchNamespaceRequest:
      properties:
        namespace_name:
          anyOf:
            - type: string
              maxLength: 64
              minLength: 3
            - type: 'null'
          title: Namespace Name
          description: Updated name for the namespace
          example: product-search
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Updated description for the namespace
        feature_extractors:
          anyOf:
            - items:
                $ref: '#/components/schemas/BaseFeatureExtractorModel-Input'
              type: array
            - type: 'null'
          title: Feature Extractors
          description: >-
            Feature extractors to add to this namespace. Existing extractors are
            preserved; only new ones are appended. Each extractor must be a
            registered builtin plugin.
        payload_indexes:
          anyOf:
            - items:
                $ref: '#/components/schemas/PayloadIndexConfig-Input'
              type: array
            - type: 'null'
          title: Payload Indexes
          description: Updated list of custom payload indexes for this namespace.
        auto_create_indexes:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Auto Create Indexes
          description: >-
            Enable automatic creation of Qdrant payload indexes based on filter
            usage patterns. When enabled, the system tracks which fields are
            most frequently filtered (>100 queries/24h) and automatically
            creates indexes to improve query performance. Background task runs
            every 6 hours. Expected performance improvement: 50-90% latency
            reduction for filtered queries. Default: False.
          example: true
        repair_vectors:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Repair Vectors
          description: >-
            When True, verify all registered feature extractors have their
            corresponding vector indexes in the vector store and add any missing
            ones. Use this to fix namespaces where vector schema is out of sync
            with registered extractors.
        infrastructure:
          anyOf:
            - $ref: '#/components/schemas/NamespaceInfrastructure-Input'
            - type: 'null'
          description: >-
            Infrastructure configuration for this namespace. Set compute_tier to
            'dedicated_cpu' or 'dedicated_gpu' and max_custom_models > 0 to
            enable custom model uploads. Requires Enterprise account.
      type: object
      title: PatchNamespaceRequest
      description: Request schema for partially updating a namespace (PATCH operation).
    NamespaceModel:
      properties:
        object:
          type: string
          title: Object
          description: Resource type identifier, always 'namespace'.
          default: namespace
          readOnly: true
        namespace_id:
          type: string
          title: Namespace Id
          description: 'Unique identifier for the namespace. Format: ns_<random>.'
        namespace_name:
          type: string
          maxLength: 64
          title: Namespace Name
          description: Name of the namespace
          example: product-search
        namespace_type:
          $ref: '#/components/schemas/NamespaceType'
          description: >-
            Type of namespace. STANDARD for regular namespaces, MARKETPLACE for
            curated datasets that can be subscribed to.
          default: standard
        scope:
          $ref: '#/components/schemas/NamespaceScope'
          description: >-
            Ownership scope. ORG (default) is org-scoped — only visible to
            members of the owning organization. SYSTEM is Mixpeek-owned and
            visible read-only to every authenticated org; used for curated
            sample corpora. Mutations on SYSTEM namespaces require admin auth.
          default: org
        infrastructure:
          anyOf:
            - $ref: '#/components/schemas/NamespaceInfrastructure-Output'
            - type: 'null'
          description: Infrastructure configuration for the namespace.
        cluster_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Cluster Id
          description: >-
            Infrastructure cluster ID for this namespace (Enterprise only). When
            set, this namespace uses a dedicated compute and vector cluster. If
            None, uses shared infrastructure or organization-level
            infrastructure. Format: iclstr_xxx
          examples:
            - iclstr_abc123xyz
            - null
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Description of the namespace
        feature_extractors:
          items:
            $ref: '#/components/schemas/BaseFeatureExtractorModel-Output'
          type: array
          title: Feature Extractors
          description: List of feature extractors configured for this namespace
        payload_indexes:
          anyOf:
            - items:
                $ref: '#/components/schemas/PayloadIndexConfig-Output'
              type: array
            - type: 'null'
          title: Payload Indexes
          description: Custom payload indexes configured for this namespace
        document_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Document Count
          description: Total number of documents in this namespace
        bucket_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Bucket Count
          description: Total number of buckets in this namespace
        collection_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Collection Count
          description: Total number of collections in this namespace
        object_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Object Count
          description: Total number of objects across all buckets in this namespace
        auto_create_indexes:
          type: boolean
          title: Auto Create Indexes
          description: >-
            Enable automatic creation of Qdrant payload indexes based on filter
            usage patterns. When enabled, the system tracks which fields are
            most frequently filtered (>100 queries/24h) and automatically
            creates indexes to improve query performance. Background task runs
            every 6 hours. Expected performance improvement: 50-90% latency
            reduction for filtered queries.
          default: false
        vector_inference_map:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Vector Inference Map
          description: >-
            Mapping of vector index names to inference service names. Built at
            namespace creation based on extractor configurations. Used by
            feature search to determine correct inference service for queries.
            Example: {'image_extractor_v1_embedding': 'google_siglip_base_v1'}
        mode:
          anyOf:
            - type: string
            - type: 'null'
          title: Mode
          description: >-
            Namespace mode: 'managed' (Mixpeek manages vector schemas and
            inference) or 'standalone' (bring-your-own vectors). Populated from
            the stored mvs_mode; null for namespaces that predate BYOV.
        vector_configs:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Vector Configs
          description: >-
            For standalone / promoted (BYO-vector) namespaces, the per-vector
            configs: name, dimension, metric. Populated from the stored
            mvs_vector_configs; null for managed namespaces with no BYO vectors.
        qdrant_status:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Qdrant Status
          description: >-
            Live vector collection status. Populated when retrieving a
            namespace. Includes: status (green/yellow/red), points_count,
            indexed_vectors_count, segments_count. None if vector collection
            does not exist or is unreachable.
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
          description: When the namespace was created
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
          description: When the namespace was last updated
        expires_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expires At
          description: >-
            UTC timestamp after which the namespace is auto-deleted by the
            hourly cleanup_expired_namespaces reaper. Computed at create time
            from CreateNamespaceRequest.ttl_seconds; null means the namespace
            never expires.
      type: object
      required:
        - namespace_name
      title: NamespaceModel
      description: Namespace model.
    ErrorResponse:
      properties:
        success:
          type: boolean
          title: Success
          description: Always false for error responses
          default: false
        status:
          type: integer
          title: Status
          description: HTTP status code for this error
        error:
          $ref: '#/components/schemas/ErrorDetail'
          description: Error details payload
      type: object
      required:
        - status
        - error
      title: ErrorResponse
      description: Error response model.
      examples:
        - error:
            details:
              id: ns_123
              resource: namespace
            message: Namespace not found
            type: NotFoundError
          status: 404
          success: false
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    BaseFeatureExtractorModel-Input:
      properties:
        feature_extractor_name:
          type: string
          title: Feature Extractor Name
          description: Name of the feature extractor
        version:
          type: string
          title: Version
          description: Version of the feature extractor (e.g., 'v1', 'v2')
        params:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Params
          description: >-
            Optional extractor parameters that affect vector index
            configuration. Parameters set here are locked at namespace creation
            and determine vector dimensions in Qdrant. Collections using this
            extractor must use compatible params. Example: {'model':
            'siglip_base'}
      type: object
      required:
        - feature_extractor_name
        - version
      title: BaseFeatureExtractorModel
      description: Minimum feature extractor definition.
    PayloadIndexConfig-Input:
      properties:
        field_name:
          type: string
          maxLength: 255
          minLength: 1
          title: Field Name
          description: >-
            Name of the payload field to index. Must be unique within the
            namespace. Use dot notation for nested fields (e.g.,
            'metadata.title'). Cannot use protected system field names when
            is_protected=False.
          examples:
            - metadata.title
            - user_id
            - tags
        type:
          $ref: '#/components/schemas/PayloadSchemaType'
          description: >-
            Data type of the indexed field. Determines query capabilities and
            storage optimization. TEXT: Full-text search. KEYWORD: Exact
            matching, filtering. INTEGER/FLOAT: Range queries, sorting.
            DATETIME: Temporal queries. GEO: Geospatial queries. BOOL: Boolean
            filtering. UUID: Unique identifier matching.
        field_schema:
          anyOf:
            - $ref: '#/components/schemas/TextIndexParams'
            - $ref: '#/components/schemas/IntegerIndexParams'
            - $ref: '#/components/schemas/KeywordIndexParams'
            - $ref: '#/components/schemas/FloatIndexParams'
            - $ref: '#/components/schemas/GeoIndexParams'
            - $ref: '#/components/schemas/DatetimeIndexParams'
            - $ref: '#/components/schemas/UuidIndexParams'
            - $ref: '#/components/schemas/BoolIndexParams'
            - type: 'null'
          title: Field Schema
          description: >-
            Optional schema configuration for the index. If not provided, uses
            default parameters for the specified type. Different types support
            different parameters (e.g., KeywordIndexParams.is_tenant).
        is_protected:
          type: boolean
          title: Is Protected
          description: >-
            Whether this index is system-managed and cannot be modified by
            users. Protected indexes (is_protected=True) are created
            automatically by Mixpeek and are essential for internal operations
            like tenant isolation, lineage tracking, and document management.
            Users cannot create, modify, or delete protected indexes.
            User-created indexes always have is_protected=False.
          default: false
      type: object
      required:
        - field_name
        - type
      title: PayloadIndexConfig
      description: >-
        Configuration for a payload index.


        Defines the structure and behavior of a payload field index in Qdrant
        collections.

        Payload indexes enable efficient filtering and searching on document
        metadata.


        Protected Indexes:
            System-managed indexes (is_protected=True) cannot be modified or deleted by users.
            These are essential for Mixpeek's internal operations:
            - internal_id: Tenant isolation
            - namespace_id: Namespace scoping
            - collection_id, document_id: Document lineage
            - bucket_id, object_id, root_object_id, root_bucket_id, source_object_id: Object lineage
            - created_at, updated_at: Timestamps

        Use Cases:
            - Create custom metadata indexes for efficient filtering
            - Configure full-text search on text fields
            - Set up geospatial queries on location data
            - Enable range queries on numeric fields

        Requirements:
            - field_name: REQUIRED - Must be unique within the namespace
            - type: REQUIRED - Must match PayloadSchemaType enum
            - field_schema: OPTIONAL - Auto-generated from type if not provided
            - is_protected: OPTIONAL - Defaults to False (user-managed index)
      examples:
        - description: User-created text index for full-text search
          field_name: metadata.description
          is_protected: false
          type: text
        - description: User-created keyword index for exact filtering
          field_name: user_id
          is_protected: false
          type: keyword
        - description: System-managed protected index (created automatically)
          field_name: internal_id
          field_schema:
            is_tenant: true
          is_protected: true
          type: keyword
    NamespaceInfrastructure-Input:
      properties:
        ray_cluster_id:
          anyOf:
            - type: string
              pattern: ^ray_[a-zA-Z0-9_]{3,64}$
            - type: 'null'
          title: Ray Cluster Id
          description: Dedicated Ray cluster identifier for this namespace.
          examples:
            - ray_shared
            - ray_prod_gpu_cluster
            - null
        ray_head_node_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Ray Head Node Url
          description: Ray head node address for job submission (ray://host:port).
          examples:
            - ray://shared-cluster:10001
            - ray://gpu-cluster-head:10001
        ray_dashboard_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Ray Dashboard Url
          description: Ray dashboard URL for monitoring (http://host:8265).
          examples:
            - http://ray-dashboard-prod:8265
        qdrant_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Qdrant Url
          description: >-
            Dedicated vector store URL for this namespace. When set, this
            namespace uses its own vector store instance instead of organization
            or shared infrastructure. Format: http://hostname:port or
            https://hostname:port. REQUIRED when compute_tier is DEDICATED_CPU
            or DEDICATED_GPU. NOT REQUIRED for SHARED tier (inherits from
            organization or uses shared).
          examples:
            - http://qdrant-ns-prod:6333
            - https://qdrant-namespace.example.com:6333
        qdrant_api_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Qdrant Api Key
          description: >-
            API key for dedicated vector store instance. Write-only: accepted on
            create/update but never returned in responses. REQUIRED when
            qdrant_url is set. NOT REQUIRED for shared tier.
          examples:
            - qdrant_key_namespace_123
        qdrant_api_key_provided:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Qdrant Api Key Provided
          description: >-
            Indicates whether a vector store API key has been configured. The
            key itself is never returned.
          readOnly: true
        qdrant_collection:
          type: string
          maxLength: 128
          minLength: 3
          title: Qdrant Collection
          description: Vector collection backing this namespace's vector data.
          examples:
            - ns_production
            - ns_ml_inference
        s3_vector_bucket:
          anyOf:
            - type: string
            - type: 'null'
          title: S3 Vector Bucket
          description: >-
            S3 Vectors bucket name for vector tiering. When set, vectors are
            durably stored in S3.
        compute_tier:
          $ref: '#/components/schemas/ComputeTier'
          description: Compute tier controlling isolation and performance characteristics.
          default: shared
          examples:
            - shared
            - dedicated_cpu
            - dedicated_gpu
        max_concurrent_jobs:
          type: integer
          maximum: 1000
          minimum: 1
          title: Max Concurrent Jobs
          description: Maximum concurrent Ray jobs allowed for the namespace.
          default: 10
          examples:
            - 10
            - 50
            - 20
        autoscaling_enabled:
          type: boolean
          title: Autoscaling Enabled
          description: Toggle autoscaling for dedicated clusters (ignored for shared tier).
          default: true
        min_workers:
          type: integer
          maximum: 100
          minimum: 0
          title: Min Workers
          description: Lower bound for Ray workers when autoscaling is enabled.
          default: 1
        max_workers:
          type: integer
          maximum: 100
          minimum: 1
          title: Max Workers
          description: Upper bound for Ray workers when autoscaling is enabled.
          default: 10
        gpu_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Gpu Type
          description: GPU type for dedicated GPU clusters (e.g. A100, T4).
          examples:
            - A100
            - T4
            - null
        gpus_per_worker:
          type: integer
          maximum: 8
          minimum: 0
          title: Gpus Per Worker
          description: Number of GPUs allocated to each Ray worker when using GPUs.
          default: 1
        compute_profiles:
          additionalProperties:
            additionalProperties: true
            type: object
          type: object
          title: Compute Profiles
          description: >-
            Per-extractor compute profile overrides keyed by
            feature_extractor_id (e.g. 'text_extractor_v1'). Values are partial
            ComputeProfile dicts merged on top of the extractor's built-in
            profile at batch build time.
          examples:
            - text_extractor_v1:
                batch_size: 64
                resource_type: gpu
        s3_plugin_bucket:
          type: string
          title: S3 Plugin Bucket
          description: S3 bucket for storing custom plugins and model weights.
          default: mixpeek-plugins
        s3_plugin_prefix:
          anyOf:
            - type: string
            - type: 'null'
          title: S3 Plugin Prefix
          description: >-
            S3 prefix for namespace-scoped plugin storage. Format:
            {namespace_id}/ when custom plugins are enabled.
          examples:
            - ns_abc123/
        max_custom_plugins:
          type: integer
          maximum: 100
          minimum: 0
          title: Max Custom Plugins
          description: >-
            Maximum number of custom plugins allowed for this namespace. 0 =
            custom plugins disabled (shared tier). Set to >0 for dedicated tiers
            to enable custom plugins.
          default: 0
        max_custom_models:
          type: integer
          maximum: 50
          minimum: 0
          title: Max Custom Models
          description: >-
            Maximum number of custom model weights allowed for this namespace. 0
            = custom models disabled (shared tier). Set to >0 for dedicated
            tiers to enable custom model uploads.
          default: 0
        authorization:
          anyOf:
            - $ref: '#/components/schemas/NamespaceAuthorizationConfig'
            - type: 'null'
          description: >-
            Opt-in document-level authorization (external auth provider) for
            authorized retrieval. None or enabled=False (default) means the
            namespace is unchanged: no _acl enforcement and no authz calls.
      type: object
      required:
        - qdrant_collection
      title: NamespaceInfrastructure
      description: >-
        Infrastructure configuration associated with a namespace.


        Defines infrastructure resources for a specific namespace. This
        configuration

        can override organization-level defaults, enabling flexible deployment
        patterns

        where different namespaces use different infrastructure.


        Resolution Priority:
            When a namespace has infrastructure configured with DEDICATED tier, it takes
            precedence over organization-level infrastructure. This allows:
            - ENTERPRISE org with SHARED namespace (cost savings for dev/test)
            - ENTERPRISE org with dedicated GPU namespace (ML workloads)
            - Mixed infrastructure within a single organization

        Tier Behaviors:
            SHARED:
                - Namespace uses organization infrastructure (if configured)
                - Falls back to Mixpeek's shared infrastructure
                - All infrastructure URLs should be None
                - Lowest cost, multi-tenant

            DEDICATED_CPU:
                - Namespace uses its own dedicated CPU infrastructure
                - Requires qdrant_url, qdrant_api_key, ray_head_node_url
                - Single-tenant CPU compute
                - Medium cost

            DEDICATED_GPU:
                - Namespace uses its own dedicated GPU infrastructure
                - Requires qdrant_url, qdrant_api_key, ray_head_node_url
                - Requires gpu_type and gpus_per_worker configuration
                - Single-tenant GPU compute
                - Highest cost

        Use Cases:
            - Development namespace: Set compute_tier=SHARED to use organization's infrastructure
            - Production namespace: Inherit organization's DEDICATED infrastructure (don't override)
            - ML namespace: Override with DEDICATED_GPU and GPU configuration
            - Cost optimization: Override ENTERPRISE org to SHARED for dev/test namespaces

        Examples:
            Inherits organization infrastructure (no override):
                NamespaceInfrastructure(
                    qdrant_collection="ns_production",
                    compute_tier=ComputeTier.SHARED  # Uses org or shared infrastructure
                )

            Override to dedicated CPU:
                NamespaceInfrastructure(
                    qdrant_url="http://qdrant-ns-prod:6333",
                    qdrant_api_key="qdrant_key_ns_123",
                    qdrant_collection="ns_production",
                    ray_head_node_url="ray://ray-ns-prod:10001",
                    ray_dashboard_url="http://ray-ns-dashboard:8265",
                    compute_tier=ComputeTier.DEDICATED_CPU,
                    max_concurrent_jobs=50
                )

            Override to dedicated GPU:
                NamespaceInfrastructure(
                    qdrant_url="http://qdrant-gpu:6333",
                    qdrant_api_key="qdrant_key_gpu",
                    qdrant_collection="ns_ml",
                    ray_head_node_url="ray://ray-gpu:10001",
                    compute_tier=ComputeTier.DEDICATED_GPU,
                    gpu_type="A100",
                    gpus_per_worker=2
                )
      examples:
        - autoscaling_enabled: false
          compute_tier: shared
          description: Shared development namespace
          max_concurrent_jobs: 10
          qdrant_collection: ns_dev
          ray_head_node_url: ray://shared-cluster:10001
        - autoscaling_enabled: true
          compute_tier: dedicated_cpu
          description: Dedicated production CPU cluster
          max_concurrent_jobs: 50
          max_workers: 20
          min_workers: 3
          qdrant_collection: ns_production
          ray_cluster_id: ray_prod_cluster
          ray_dashboard_url: http://prod-dashboard:8265
          ray_head_node_url: ray://prod-head:10001
    NamespaceType:
      type: string
      enum:
        - standard
        - marketplace
      title: NamespaceType
      description: Type of namespace defining its access control and billing model.
    NamespaceScope:
      type: string
      enum:
        - org
        - system
      title: NamespaceScope
      description: |-
        Ownership scope for a namespace.

        ORG: owned by a single organization (default). Internal_id-scoped.
        SYSTEM: owned by Mixpeek, visible read-only to every authenticated user.
            Used for curated sample corpora that power the onboarding experience.
            Mutations require MIXPEEK_PRIVATE_TOKEN admin auth.
    NamespaceInfrastructure-Output:
      properties:
        ray_cluster_id:
          anyOf:
            - type: string
              pattern: ^ray_[a-zA-Z0-9_]{3,64}$
            - type: 'null'
          title: Ray Cluster Id
          description: Dedicated Ray cluster identifier for this namespace.
          examples:
            - ray_shared
            - ray_prod_gpu_cluster
            - null
        ray_head_node_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Ray Head Node Url
          description: Ray head node address for job submission (ray://host:port).
          examples:
            - ray://shared-cluster:10001
            - ray://gpu-cluster-head:10001
        ray_dashboard_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Ray Dashboard Url
          description: Ray dashboard URL for monitoring (http://host:8265).
          examples:
            - http://ray-dashboard-prod:8265
        qdrant_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Qdrant Url
          description: >-
            Dedicated vector store URL for this namespace. When set, this
            namespace uses its own vector store instance instead of organization
            or shared infrastructure. Format: http://hostname:port or
            https://hostname:port. REQUIRED when compute_tier is DEDICATED_CPU
            or DEDICATED_GPU. NOT REQUIRED for SHARED tier (inherits from
            organization or uses shared).
          examples:
            - http://qdrant-ns-prod:6333
            - https://qdrant-namespace.example.com:6333
        qdrant_api_key_provided:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Qdrant Api Key Provided
          description: >-
            Indicates whether a vector store API key has been configured. The
            key itself is never returned.
          readOnly: true
        qdrant_collection:
          type: string
          maxLength: 128
          minLength: 3
          title: Qdrant Collection
          description: Vector collection backing this namespace's vector data.
          examples:
            - ns_production
            - ns_ml_inference
        s3_vector_bucket:
          anyOf:
            - type: string
            - type: 'null'
          title: S3 Vector Bucket
          description: >-
            S3 Vectors bucket name for vector tiering. When set, vectors are
            durably stored in S3.
        compute_tier:
          $ref: '#/components/schemas/ComputeTier'
          description: Compute tier controlling isolation and performance characteristics.
          default: shared
          examples:
            - shared
            - dedicated_cpu
            - dedicated_gpu
        max_concurrent_jobs:
          type: integer
          maximum: 1000
          minimum: 1
          title: Max Concurrent Jobs
          description: Maximum concurrent Ray jobs allowed for the namespace.
          default: 10
          examples:
            - 10
            - 50
            - 20
        autoscaling_enabled:
          type: boolean
          title: Autoscaling Enabled
          description: Toggle autoscaling for dedicated clusters (ignored for shared tier).
          default: true
        min_workers:
          type: integer
          maximum: 100
          minimum: 0
          title: Min Workers
          description: Lower bound for Ray workers when autoscaling is enabled.
          default: 1
        max_workers:
          type: integer
          maximum: 100
          minimum: 1
          title: Max Workers
          description: Upper bound for Ray workers when autoscaling is enabled.
          default: 10
        gpu_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Gpu Type
          description: GPU type for dedicated GPU clusters (e.g. A100, T4).
          examples:
            - A100
            - T4
            - null
        gpus_per_worker:
          type: integer
          maximum: 8
          minimum: 0
          title: Gpus Per Worker
          description: Number of GPUs allocated to each Ray worker when using GPUs.
          default: 1
        compute_profiles:
          additionalProperties:
            additionalProperties: true
            type: object
          type: object
          title: Compute Profiles
          description: >-
            Per-extractor compute profile overrides keyed by
            feature_extractor_id (e.g. 'text_extractor_v1'). Values are partial
            ComputeProfile dicts merged on top of the extractor's built-in
            profile at batch build time.
          examples:
            - text_extractor_v1:
                batch_size: 64
                resource_type: gpu
        s3_plugin_bucket:
          type: string
          title: S3 Plugin Bucket
          description: S3 bucket for storing custom plugins and model weights.
          default: mixpeek-plugins
        s3_plugin_prefix:
          anyOf:
            - type: string
            - type: 'null'
          title: S3 Plugin Prefix
          description: >-
            S3 prefix for namespace-scoped plugin storage. Format:
            {namespace_id}/ when custom plugins are enabled.
          examples:
            - ns_abc123/
        max_custom_plugins:
          type: integer
          maximum: 100
          minimum: 0
          title: Max Custom Plugins
          description: >-
            Maximum number of custom plugins allowed for this namespace. 0 =
            custom plugins disabled (shared tier). Set to >0 for dedicated tiers
            to enable custom plugins.
          default: 0
        max_custom_models:
          type: integer
          maximum: 50
          minimum: 0
          title: Max Custom Models
          description: >-
            Maximum number of custom model weights allowed for this namespace. 0
            = custom models disabled (shared tier). Set to >0 for dedicated
            tiers to enable custom model uploads.
          default: 0
        authorization:
          anyOf:
            - $ref: '#/components/schemas/NamespaceAuthorizationConfig'
            - type: 'null'
          description: >-
            Opt-in document-level authorization (external auth provider) for
            authorized retrieval. None or enabled=False (default) means the
            namespace is unchanged: no _acl enforcement and no authz calls.
      type: object
      required:
        - qdrant_collection
      title: NamespaceInfrastructure
      description: >-
        Infrastructure configuration associated with a namespace.


        Defines infrastructure resources for a specific namespace. This
        configuration

        can override organization-level defaults, enabling flexible deployment
        patterns

        where different namespaces use different infrastructure.


        Resolution Priority:
            When a namespace has infrastructure configured with DEDICATED tier, it takes
            precedence over organization-level infrastructure. This allows:
            - ENTERPRISE org with SHARED namespace (cost savings for dev/test)
            - ENTERPRISE org with dedicated GPU namespace (ML workloads)
            - Mixed infrastructure within a single organization

        Tier Behaviors:
            SHARED:
                - Namespace uses organization infrastructure (if configured)
                - Falls back to Mixpeek's shared infrastructure
                - All infrastructure URLs should be None
                - Lowest cost, multi-tenant

            DEDICATED_CPU:
                - Namespace uses its own dedicated CPU infrastructure
                - Requires qdrant_url, qdrant_api_key, ray_head_node_url
                - Single-tenant CPU compute
                - Medium cost

            DEDICATED_GPU:
                - Namespace uses its own dedicated GPU infrastructure
                - Requires qdrant_url, qdrant_api_key, ray_head_node_url
                - Requires gpu_type and gpus_per_worker configuration
                - Single-tenant GPU compute
                - Highest cost

        Use Cases:
            - Development namespace: Set compute_tier=SHARED to use organization's infrastructure
            - Production namespace: Inherit organization's DEDICATED infrastructure (don't override)
            - ML namespace: Override with DEDICATED_GPU and GPU configuration
            - Cost optimization: Override ENTERPRISE org to SHARED for dev/test namespaces

        Examples:
            Inherits organization infrastructure (no override):
                NamespaceInfrastructure(
                    qdrant_collection="ns_production",
                    compute_tier=ComputeTier.SHARED  # Uses org or shared infrastructure
                )

            Override to dedicated CPU:
                NamespaceInfrastructure(
                    qdrant_url="http://qdrant-ns-prod:6333",
                    qdrant_api_key="qdrant_key_ns_123",
                    qdrant_collection="ns_production",
                    ray_head_node_url="ray://ray-ns-prod:10001",
                    ray_dashboard_url="http://ray-ns-dashboard:8265",
                    compute_tier=ComputeTier.DEDICATED_CPU,
                    max_concurrent_jobs=50
                )

            Override to dedicated GPU:
                NamespaceInfrastructure(
                    qdrant_url="http://qdrant-gpu:6333",
                    qdrant_api_key="qdrant_key_gpu",
                    qdrant_collection="ns_ml",
                    ray_head_node_url="ray://ray-gpu:10001",
                    compute_tier=ComputeTier.DEDICATED_GPU,
                    gpu_type="A100",
                    gpus_per_worker=2
                )
      examples:
        - autoscaling_enabled: false
          compute_tier: shared
          description: Shared development namespace
          max_concurrent_jobs: 10
          qdrant_collection: ns_dev
          ray_head_node_url: ray://shared-cluster:10001
        - autoscaling_enabled: true
          compute_tier: dedicated_cpu
          description: Dedicated production CPU cluster
          max_concurrent_jobs: 50
          max_workers: 20
          min_workers: 3
          qdrant_collection: ns_production
          ray_cluster_id: ray_prod_cluster
          ray_dashboard_url: http://prod-dashboard:8265
          ray_head_node_url: ray://prod-head:10001
    BaseFeatureExtractorModel-Output:
      properties:
        feature_extractor_name:
          type: string
          title: Feature Extractor Name
          description: Name of the feature extractor
        version:
          type: string
          title: Version
          description: Version of the feature extractor (e.g., 'v1', 'v2')
        params:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Params
          description: >-
            Optional extractor parameters that affect vector index
            configuration. Parameters set here are locked at namespace creation
            and determine vector dimensions in Qdrant. Collections using this
            extractor must use compatible params. Example: {'model':
            'siglip_base'}
        feature_extractor_id:
          type: string
          title: Feature Extractor Id
          description: >-
            Construct unique identifier for the feature extractor instance (name
            + version).
          readOnly: true
      type: object
      required:
        - feature_extractor_name
        - version
        - feature_extractor_id
      title: BaseFeatureExtractorModel
      description: Minimum feature extractor definition.
    PayloadIndexConfig-Output:
      properties:
        field_name:
          type: string
          maxLength: 255
          minLength: 1
          title: Field Name
          description: >-
            Name of the payload field to index. Must be unique within the
            namespace. Use dot notation for nested fields (e.g.,
            'metadata.title'). Cannot use protected system field names when
            is_protected=False.
          examples:
            - metadata.title
            - user_id
            - tags
        type:
          $ref: '#/components/schemas/PayloadSchemaType'
          description: >-
            Data type of the indexed field. Determines query capabilities and
            storage optimization. TEXT: Full-text search. KEYWORD: Exact
            matching, filtering. INTEGER/FLOAT: Range queries, sorting.
            DATETIME: Temporal queries. GEO: Geospatial queries. BOOL: Boolean
            filtering. UUID: Unique identifier matching.
        field_schema:
          anyOf:
            - $ref: '#/components/schemas/TextIndexParams'
            - $ref: '#/components/schemas/IntegerIndexParams'
            - $ref: '#/components/schemas/KeywordIndexParams'
            - $ref: '#/components/schemas/FloatIndexParams'
            - $ref: '#/components/schemas/GeoIndexParams'
            - $ref: '#/components/schemas/DatetimeIndexParams'
            - $ref: '#/components/schemas/UuidIndexParams'
            - $ref: '#/components/schemas/BoolIndexParams'
            - type: 'null'
          title: Field Schema
          description: >-
            Optional schema configuration for the index. If not provided, uses
            default parameters for the specified type. Different types support
            different parameters (e.g., KeywordIndexParams.is_tenant).
        is_protected:
          type: boolean
          title: Is Protected
          description: >-
            Whether this index is system-managed and cannot be modified by
            users. Protected indexes (is_protected=True) are created
            automatically by Mixpeek and are essential for internal operations
            like tenant isolation, lineage tracking, and document management.
            Users cannot create, modify, or delete protected indexes.
            User-created indexes always have is_protected=False.
          default: false
      type: object
      required:
        - field_name
        - type
      title: PayloadIndexConfig
      description: >-
        Configuration for a payload index.


        Defines the structure and behavior of a payload field index in Qdrant
        collections.

        Payload indexes enable efficient filtering and searching on document
        metadata.


        Protected Indexes:
            System-managed indexes (is_protected=True) cannot be modified or deleted by users.
            These are essential for Mixpeek's internal operations:
            - internal_id: Tenant isolation
            - namespace_id: Namespace scoping
            - collection_id, document_id: Document lineage
            - bucket_id, object_id, root_object_id, root_bucket_id, source_object_id: Object lineage
            - created_at, updated_at: Timestamps

        Use Cases:
            - Create custom metadata indexes for efficient filtering
            - Configure full-text search on text fields
            - Set up geospatial queries on location data
            - Enable range queries on numeric fields

        Requirements:
            - field_name: REQUIRED - Must be unique within the namespace
            - type: REQUIRED - Must match PayloadSchemaType enum
            - field_schema: OPTIONAL - Auto-generated from type if not provided
            - is_protected: OPTIONAL - Defaults to False (user-managed index)
      examples:
        - description: User-created text index for full-text search
          field_name: metadata.description
          is_protected: false
          type: text
        - description: User-created keyword index for exact filtering
          field_name: user_id
          is_protected: false
          type: keyword
        - description: System-managed protected index (created automatically)
          field_name: internal_id
          field_schema:
            is_tenant: true
          is_protected: true
          type: keyword
    ErrorDetail:
      properties:
        message:
          type: string
          title: Message
          description: Human-readable error message
        type:
          type: string
          title: Type
          description: Stable error type identifier (machine-readable)
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
          description: >-
            Fine-grained error code for programmatic handling (e.g.,
            namespace_name_taken, feature_extractor_not_found). Present only
            when consumers may need to branch on a specific error condition.
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
          description: >-
            Optional structured details to help debugging (validation errors,
            IDs, etc.)
      type: object
      required:
        - message
        - type
      title: ErrorDetail
      description: Error detail model.
    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
    PayloadSchemaType:
      type: string
      enum:
        - keyword
        - integer
        - float
        - bool
        - geo
        - datetime
        - text
        - uuid
      title: PayloadSchemaType
      description: Payload schema type.
    TextIndexParams:
      properties:
        type:
          type: string
          title: Type
          default: text
        tokenizer:
          $ref: '#/components/schemas/TokenizerType'
          default: word
        min_token_len:
          type: integer
          title: Min Token Len
          default: 2
        max_token_len:
          type: integer
          title: Max Token Len
          default: 15
        lowercase:
          type: boolean
          title: Lowercase
          default: true
      type: object
      title: TextIndexParams
      description: Configuration for text index.
    IntegerIndexParams:
      properties:
        type:
          type: string
          title: Type
          default: integer
        lookup:
          type: boolean
          title: Lookup
          default: true
        range:
          type: boolean
          title: Range
          default: true
      type: object
      title: IntegerIndexParams
      description: Configuration for integer index.
    KeywordIndexParams:
      properties:
        type:
          type: string
          title: Type
          default: keyword
        is_tenant:
          type: boolean
          title: Is Tenant
          default: false
      type: object
      title: KeywordIndexParams
      description: Configuration for keyword index.
    FloatIndexParams:
      properties:
        type:
          type: string
          title: Type
          default: float
      type: object
      title: FloatIndexParams
      description: Configuration for float index.
    GeoIndexParams:
      properties:
        type:
          type: string
          title: Type
          default: geo
      type: object
      title: GeoIndexParams
      description: Configuration for geo index.
    DatetimeIndexParams:
      properties:
        type:
          type: string
          title: Type
          default: datetime
      type: object
      title: DatetimeIndexParams
      description: Configuration for datetime index.
    UuidIndexParams:
      properties:
        type:
          type: string
          title: Type
          default: uuid
        is_tenant:
          type: boolean
          title: Is Tenant
          default: false
      type: object
      title: UuidIndexParams
      description: Configuration for UUID index.
    BoolIndexParams:
      properties:
        type:
          type: string
          title: Type
          default: bool
      type: object
      title: BoolIndexParams
      description: Configuration for boolean index.
    ComputeTier:
      type: string
      enum:
        - shared
        - dedicated_cpu
        - dedicated_gpu
      title: ComputeTier
      description: >-
        Available compute tiers for namespace workloads.


        Compute tiers determine the infrastructure resources allocated to a
        namespace

        for ingestion pipelines, clustering, and other data processing
        operations.


        Tiers:
            SHARED: Multi-tenant infrastructure with dynamic resource allocation.
                - Best for: Development, testing, low-volume production workloads
                - Resources: Shared CPU and memory pool
                - Cost: Lowest cost option, pay-per-use credits
                - SLA: Best-effort availability

            DEDICATED_CPU: Single-tenant CPU compute nodes.
                - Best for: Production workloads requiring consistent performance
                - Resources: Reserved CPU cores and memory
                - Cost: Fixed monthly cost plus usage credits
                - SLA: 99.9% uptime guarantee

            DEDICATED_GPU: Single-tenant GPU-accelerated compute nodes.
                - Best for: Video processing, embedding generation, ML inference
                - Resources: Reserved GPU(s), CPU cores, and memory
                - Cost: Premium pricing, fixed monthly cost plus usage credits
                - SLA: 99.9% uptime guarantee

        Examples:
            - Use SHARED for development and staging environments
            - Use DEDICATED_CPU for production document processing pipelines
            - Use DEDICATED_GPU for large-scale video ingestion and analysis
    NamespaceAuthorizationConfig:
      properties:
        enabled:
          type: boolean
          title: Enabled
          description: >-
            Master switch. False (default) = no authorization enforcement,
            namespace unchanged. True = document-level authorized retrieval is
            active for this namespace.
          default: false
        provider:
          type: string
          const: openfga
          title: Provider
          description: External authorization provider. Only OpenFGA is supported.
          default: openfga
        api_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Api Url
          description: Base URL of the customer's OpenFGA HTTP API.
          examples:
            - https://openfga.customer.example.com
            - http://localhost:8080
        store_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Store Id
          description: OpenFGA store id holding the customer's relationship tuples.
        model_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Model Id
          description: >-
            OpenFGA authorization-model id. When None, the store's latest model
            is used.
        api_token_secret_ref:
          anyOf:
            - type: string
            - type: 'null'
          title: Api Token Secret Ref
          description: >-
            Name of an organization-vault secret (OrganizationSecretsService)
            holding the OpenFGA bearer token. PREFERRED: the token is resolved
            from the encrypted org vault at call time and never stored in this
            config. Required for any non-local (https) OpenFGA deployment.
        api_token:
          anyOf:
            - type: string
            - type: 'null'
          title: Api Token
          description: >-
            DEPRECATED / dev-only plaintext bearer token. Rejected when
            enabled=True against a non-local OpenFGA URL — use
            api_token_secret_ref (org vault) instead. Allowed only for local dev
            (http:// or localhost), where the e2e OpenFGA runs without auth.
        object_type:
          type: string
          title: Object Type
          description: FGA object type that represents a Mixpeek document.
          default: document
        relation:
          type: string
          title: Relation
          description: OpenFGA relation that grants read/retrieve access.
          default: viewer
        user_type:
          type: string
          title: User Type
          description: FGA subject type for the acting principal (user:<id>).
          default: user
        mode:
          type: string
          enum:
            - push
            - pull_list_objects
            - pull_batch_check
            - auto
          title: Mode
          description: >-
            push = filter on the synced _acl payload field (fast, eventually
            consistent). pull_list_objects = ListObjects->document_id pre-filter
            (strongly consistent, bounded sets). pull_batch_check = unfiltered
            search then BatchCheck post-filter (strongly consistent, any size).
            auto = ListObjects when the result is under list_objects_max, else
            fall back to BatchCheck post-filter.
          default: auto
        list_objects_max:
          type: integer
          maximum: 100000
          minimum: 1
          title: List Objects Max
          description: >-
            Max objects ListObjects may return before auto mode falls back to
            BatchCheck post-filter (avoids the ListObjects explosion).
          default: 1000
        over_fetch_factor:
          type: integer
          maximum: 10
          minimum: 1
          title: Over Fetch Factor
          description: >-
            Post-filter (BatchCheck) over-fetch multiplier. Standard
            authorized-search guidance: over-fetch >=2x from the vector DB so
            that after dropping inaccessible documents the requested page is
            still full. Only applies in post-filter / auto-capped mode.
          default: 2
        cache_ttl_seconds:
          type: integer
          maximum: 3600
          minimum: 0
          title: Cache Ttl Seconds
          description: TTL for cached authorization decisions (subject->allowed set).
          default: 30
      type: object
      title: NamespaceAuthorizationConfig
      description: |-
        Opt-in external authorization config for document-level
        authorized retrieval.

        When ``enabled`` is False (the default) the namespace behaves EXACTLY as
        before: no ``_acl`` enforcement at retrieval, no ``_acl`` write at
        ingestion, no FGA calls. The whole feature is gated on this flag so a
        namespace that does not opt in is byte-for-byte unchanged.

        The customer runs their OWN OpenFGA; Mixpeek is a relying party. The
        document object id in OpenFGA must equal the Mixpeek ``document_id``
        (e.g. ``document:doc_abc123``). At retrieval we enforce the configured
        ``relation`` for the acting subject.

        Enforcement is fail-closed: a document with no resolvable grant is
        excluded, never leaked.
      examples:
        - api_token_secret_ref: openfga_bearer_token
          api_url: https://openfga.customer.example.com
          enabled: true
          mode: auto
          object_type: document
          provider: openfga
          relation: viewer
          store_id: 01J0X...
    TokenizerType:
      type: string
      enum:
        - word
        - whitespace
        - prefix
        - multilingual
      title: TokenizerType
      description: Tokenizer type.

````