Skip to main content
POST
/
v1
/
namespaces
Create Namespace
curl --request POST \
  --url https://api.mixpeek.com/v1/namespaces \
  --header 'Content-Type: application/json' \
  --data '
{
  "namespace_name": "spotify_playlists_dev",
  "feature_extractors": [
    {
      "feature_extractor_id": "multimodal_extractor_1.0.0",
      "feature_extractor_name": "multimodal_extractor",
      "version": "1.0.0"
    }
  ],
  "description": "This namespace contains playlists from Spotify",
  "payload_indexes": [
    {
      "field_name": "metadata.title",
      "field_schema": {
        "lowercase": true,
        "max_token_len": 15,
        "min_token_len": 2,
        "tokenizer": "word",
        "type": "text"
      },
      "is_protected": false,
      "type": "text"
    },
    {
      "field_name": "metadata.description",
      "field_schema": {
        "is_tenant": true,
        "type": "keyword"
      },
      "is_protected": false,
      "type": "keyword"
    }
  ],
  "auto_create_indexes": true
}
'
{
  "namespace_name": "spotify_playlists_dev",
  "namespace_id": "<string>",
  "infrastructure": {
    "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"
  },
  "cluster_id": "iclstr_abc123xyz",
  "description": "<string>",
  "feature_extractors": [
    {
      "feature_extractor_name": "<string>",
      "version": "<string>",
      "feature_extractor_id": "<string>"
    }
  ],
  "payload_indexes": [
    {
      "field_name": "<string>",
      "type": "keyword",
      "field_schema": {
        "type": "text",
        "tokenizer": "word",
        "min_token_len": 2,
        "max_token_len": 15,
        "lowercase": true
      },
      "is_protected": false
    }
  ],
  "document_count": 123,
  "auto_create_indexes": false,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Headers

Authorization
string

REQUIRED: Bearer token authentication using your API key. Format: 'Bearer sk_xxxxxxxxxxxxx'. You can create API keys in the Mixpeek dashboard under Organization Settings.

Examples:

"Bearer YOUR_API_KEY"

"Bearer YOUR_STRIPE_API_KEY"

Body

application/json

Request schema for creating a new namespace.

namespace_name
string
required

Name of the namespace to create

Example:

"spotify_playlists_dev"

feature_extractors
BaseFeatureExtractorModel · object[]
required

List of feature extractors to use. At least one feature extractor must be provided.

Minimum array length: 1
Example:
[
{
"feature_extractor_id": "multimodal_extractor_1.0.0",
"feature_extractor_name": "multimodal_extractor",
"version": "1.0.0"
}
]
description
string | null

Description of the namespace

Example:

"This namespace contains playlists from Spotify"

payload_indexes
PayloadIndexConfig · object[] | null

Optional list of custom payload index configurations. Indexes required by selected feature extractors will be added automatically.

Example:
[
{
"field_name": "metadata.title",
"field_schema": {
"lowercase": true,
"max_token_len": 15,
"min_token_len": 2,
"tokenizer": "word",
"type": "text"
},
"is_protected": false,
"type": "text"
},
{
"field_name": "metadata.description",
"field_schema": { "is_tenant": true, "type": "keyword" },
"is_protected": false,
"type": "keyword"
}
]
auto_create_indexes
boolean | null
default:false

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.

Example:

true

Response

Successful Response

Namespace model.

namespace_name
string
required

Name of the namespace

Example:

"spotify_playlists_dev"

namespace_id
string

Unique identifier for the namespace

infrastructure
NamespaceInfrastructure · object

Infrastructure configuration for the namespace (Ray, Qdrant).

Example:
{
"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"
}
cluster_id
string | null

Infrastructure cluster ID for this namespace (Enterprise only). When set, this namespace uses dedicated Anyscale/Ray + Qdrant cluster. If None, uses shared infrastructure or organization-level infrastructure. Format: iclstr_xxx

Example:

"iclstr_abc123xyz"

description
string | null

Description of the namespace

feature_extractors
BaseFeatureExtractorModel · object[]

List of feature extractors configured for this namespace

payload_indexes
PayloadIndexConfig · object[] | null

Custom payload indexes configured for this namespace

document_count
integer | null

Total number of documents in this namespace (from Qdrant collection)

auto_create_indexes
boolean
default:false

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.

created_at
string<date-time> | null

When the namespace was created

updated_at
string<date-time> | null

When the namespace was last updated