Skip to main content
POST
/
ai
/
clusters
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: 'My API Key',
});

const response = await client.ai.clusters.compute({ bucket: 'bucket' });

console.log(response.data);
{
  "data": {
    "task_id": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
bucket
string
required

The embedded storage bucket to compute the clusters from. The bucket must already be embedded.

prefix
string

Prefix to filter whcih files in the buckets are included.

files
string[]

Array of files to filter which are included.

min_cluster_size
integer
default: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.

min_subcluster_size
integer
default: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.

Response

Successful Response

data
TextClusteringResponse · object
required