v5
latestOpenAPI 3.1.02026-08-025631,1012.8 MBClusters
Create Cluster
Create a new cluster configuration and output collection.
This endpoint:
1. Creates cluster metadata
2. Creates output collection for cluster documents
3. Returns cluster metadata with output_collection_id
The cluster can then be executed via POST /v1/clusters/{id}/execute
post/v1/clusters
Request body
Example request
{
"cluster_name": "products_clip_hdbscan",
"cluster_type": "vector",
"collection_ids": [
"col_products_v1",
"col_products_v2"
],
"llm_labeling": {
"enabled": true,
"labeling_inputs": {
"input_mappings": [
{
"input_key": "text",
"path": "description",
"source_type": "payload"
}
]
},
"model_name": "gpt-4o-mini-2024-07-18",
"provider": "openai"
},
"vector_config": {
"clustering_method": "hdbscan",
"feature_uri": "mixpeek://clip_vit_l_14@v1/embedding",
"hdbscan_parameters": {
"min_cluster_size": 10,
"min_samples": 5
},
"sample_size": 5000
}
}Response
Successful Response
Example response
{
"source_enrichment_config": {
"field_mappings": [
{
"source_field": "cluster_id",
"target_field": "category_id"
},
{
"source_field": "cluster_label",
"target_field": "category_name"
},
{
"source_field": "distance_to_centroid",
"target_field": "category_confidence"
}
]
},
"llm_labeling": {
"description": "Text-only labeling with multiple fields",
"enabled": true,
"include_keywords": true,
"include_summary": true,
"labeling_inputs": {
"input_mappings": [
{
"input_key": "title",
"path": "title",
"source_type": "payload"
},
{
"input_key": "description",
"path": "description",
"source_type": "payload"
},
{
"input_key": "text",
"path": "text",
"source_type": "payload"
}
]
},
"model_name": "gpt-4o-mini-2024-07-18",
"provider": "openai"
}
}