Skip to main content
GET
/
ai
/
clusters
/
{task_id}
JavaScript
import Telnyx from 'telnyx';

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

const cluster = await client.ai.clusters.retrieve('task_id');

console.log(cluster.data);
{
  "data": {
    "status": "pending",
    "bucket": "<string>",
    "clusters": [
      {
        "cluster_id": "<string>",
        "cluster_summary": "<string>",
        "total_number_of_nodes": 123,
        "cluster_header": "<string>",
        "nodes": [
          {
            "filename": "<string>",
            "text": "<string>"
          }
        ],
        "subclusters": [
          "<unknown>"
        ]
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

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

Path Parameters

task_id
string
required

Query Parameters

top_n_nodes
integer
default:0

The number of nodes in the cluster to return in the response. Nodes will be sorted by their centrality within the cluster.

show_subclusters
boolean
default:false

Whether or not to include subclusters and their nodes in the response.

Response

Successful Response

data
ClusteringStatusResponse · object
required