v5
latestOpenAPI 3.1.02026-08-025631,1012.8 MBClusters
Execute Clustering
Execute clustering on a specific cluster.
This endpoint:
1. Validates the cluster exists
2. Queues clustering job via Celery
3. Returns task_id immediately (non-blocking)
4. Celery prepares data and submits to Engine
5. Monitor progress via GET /v1/tasks/{task_id}
Flow:
- API: Receives request
- Celery: Fetches documents, creates parquet, uploads to S3
- Engine: Runs Ray job on parquet data
- Status: Automatically updates cluster when complete
Use GET /v1/clusters/{id}/executions to retrieve results.
Optional body (`ExecuteClusterByIdRequest`) accepts a `filters` override
that applies to this execution only and is not persisted on the cluster.
post/v1/clusters/{cluster_id}/execute
Path parameters
cluster_idstring required
Cluster ID to execute
Cluster ID to execute
Request body
Example request
{
"filters": {
"AND": [
{
"field": "name",
"operator": "eq",
"value": "John"
},
{
"field": "age",
"operator": "gte",
"value": 30
}
],
"OR": [
{
"field": "status",
"operator": "eq",
"value": "active"
},
{
"field": "role",
"operator": "eq",
"value": "admin"
}
],
"NOT": [
{
"field": "department",
"operator": "eq",
"value": "HR"
},
{
"field": "location",
"operator": "eq",
"value": "remote"
}
],
"case_sensitive": true
},
"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"
}
}Response
Successful Response
Example response
{
"additional_data": {
"batch_id": "btch_xyz789",
"bucket_id": "bkt_products",
"collection_ids": [
"col_tier0",
"col_tier1",
"col_tier2"
],
"current_tier": 1,
"job_id": "ray_job_123",
"namespace_id": "ns_abc123",
"object_count": 10000,
"sample_object_ids": [
"obj_001",
"obj_002",
"obj_003",
"obj_004",
"obj_005"
],
"total_tiers": 3
},
"description": "Multi-tier batch processing task in progress (tier 1 of 3) with 10k objects",
"inputs": [
"batch_xyz789"
],
"status": "IN_PROGRESS",
"task_id": "2d322a05-3178-4eca-aac6-b82b0a0313aa",
"task_type": "api_buckets_batches_process"
}