Compute new clusters
POST/ai/clusters
Starts a background task to compute how the data in an embedded storage bucket is clustered. This helps identify common themes and patterns in the data.
Request
- application/json
Body
required
The embedded storage bucket to compute the clusters from. The bucket must already be embedded.
Prefix to filter whcih files in the buckets are included.
Array of files to filter which are included.
Default value: 25
Smallest number of related text chunks to qualify as a cluster. Top-level clusters should be thought of as identifying broad themes in your data.
Default value: 5
Smallest number of related text chunks to qualify as a sub-cluster. Sub-clusters should be thought of as identifying more specific topics within a broader theme.
Responses
200: Successful Response
- application/json
422: Validation Error
- application/json
Request samples
curl -L 'https://api.telnyx.com/v2/ai/clusters' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"bucket": "string",
"prefix": "string",
"files": [
"string"
],
"min_cluster_size": 25,
"min_subcluster_size": 5
}'
Response samples
{
"data": {
"task_id": "string"
}
}
{
"detail": [
{
"loc": [
"string",
0
],
"msg": "string",
"type": "string"
}
]
}