Clone a collection with optional modifications.
Purpose: Creates a NEW collection (with new ID) based on an existing one. This is the recommended way to iterate on collection designs when you need to modify core configuration that PATCH doesn’t allow (source, feature_extractor, field_passthrough).
Clone vs PATCH vs Template:
Common Use Cases:
How it works:
REQUIRED: Bearer token authentication using your API key. Format: 'Bearer sk_xxxxxxxxxxxxx'. You can create API keys in the Mixpeek dashboard under Organization Settings.
"Bearer YOUR_API_KEY"
"Bearer YOUR_STRIPE_API_KEY"
REQUIRED: Namespace identifier for scoping this request. All resources (collections, buckets, taxonomies, etc.) are scoped to a namespace. You can provide either the namespace name or namespace ID. Format: ns_xxxxxxxxxxxxx (ID) or a custom name like 'my-namespace'
"ns_abc123def456"
"production"
"my-namespace"
Source collection ID or name to clone.
Request to clone a collection with optional modifications.
Purpose: Cloning creates a NEW collection (with new ID) based on an existing one, allowing you to make changes that aren't allowed via PATCH (source, feature_extractor, field_passthrough). This is the recommended way to iterate on collection designs.
Clone vs Template vs Version:
Use Cases:
All fields are OPTIONAL:
REQUIRED. Name for the cloned collection. Must be unique and different from the source collection.
1"product_embeddings_v2"
"video_frames_clip_v2"
OPTIONAL. Description override. If omitted, copies from source collection.
"Cloned from product_embeddings with CLIP v2"
OPTIONAL. Override source configuration. If omitted, copies from source collection. Allows switching between buckets or collections.
{
"bucket_ids": ["bkt_marketing_videos"],
"description": "Single bucket source",
"type": "bucket"
}OPTIONAL. Override feature extractor configuration. If omitted, copies from source collection. This is where you'd change models, parameters, or field_passthrough.
{
"description": "Text extractor with field passthrough",
"feature_extractor_name": "text_extractor",
"field_passthrough": [
{ "required": true, "source_path": "title" },
{ "source_path": "author" }
],
"input_mappings": { "text": "content" },
"parameters": { "model": "text-embedding-3-small" },
"version": "v1"
}OPTIONAL. Override enabled status. If omitted, copies from source collection.
OPTIONAL. Override metadata. If omitted, copies from source collection.
OPTIONAL. Override taxonomy applications. If omitted, copies from source collection.
Successful Response
Response after cloning a collection.
Cloned collection configuration with new collection_id.
{
"collection_id": "col_a1b2c3d4e5",
"collection_name": "article_embeddings",
"description": "Simple text collection: News articles with text embeddings from bucket source",
"enabled": true,
"feature_extractor": {
"feature_extractor_name": "text_extractor",
"field_passthrough": [{ "source_path": "title" }],
"input_mappings": { "text": "content" },
"version": "v1"
},
"input_schema": {
"properties": {
"title": { "type": "string" },
"content": { "type": "text" }
}
},
"output_schema": {
"properties": {
"title": { "type": "string" },
"text_extractor_v1_embedding": { "type": "array" }
}
},
"source": {
"bucket_id": "bkt_articles",
"type": "bucket"
}
}{
"collection_id": "col_xyz789abc",
"collection_name": "video_frames",
"description": "Video frames: Extracted at 1 FPS with CLIP embeddings and campaign_id passthrough",
"enabled": true,
"feature_extractor": {
"feature_extractor_name": "multimodal_extractor",
"field_passthrough": [{ "source_path": "campaign_id" }],
"input_mappings": { "video": "video" },
"parameters": { "fps": 1 },
"version": "v1"
},
"input_schema": {
"properties": {
"video": { "type": "video" },
"campaign_id": { "type": "string" }
}
},
"output_schema": {
"properties": {
"campaign_id": { "type": "string" },
"multimodal_extractor_v1_embedding": { "type": "array" }
}
},
"source": {
"bucket_id": "bkt_marketing_videos",
"type": "bucket"
}
}{
"collection_id": "col_scenes_def",
"collection_name": "detected_scenes",
"description": "Tier 2 decomposition: Scenes detected from frame embeddings (collection source)",
"enabled": true,
"feature_extractor": {
"feature_extractor_name": "scene_extractor",
"field_passthrough": [{ "source_path": "campaign_id" }],
"input_mappings": {
"embedding": "multimodal_extractor_v1_embedding"
},
"version": "v1"
},
"input_schema": {
"properties": {
"campaign_id": { "type": "string" },
"multimodal_extractor_v1_embedding": { "type": "array" }
}
},
"output_schema": {
"properties": {
"campaign_id": { "type": "string" },
"scene_extractor_v1_embedding": { "type": "array" }
}
},
"source": {
"collection_id": "col_video_frames",
"type": "collection"
}
}ID of the source collection that was cloned.