getWeights
Retrieves weights for a dataset from the data-cluster API. For each weight it also attempts to download the weight file from S3 into a temporary local file. Returns a single weight selected by index, plus the total count of weights found.
Parameters
| Param | Type | Required | Description |
|---|---|---|---|
dataset_id | integer | Yes | Dataset ID to get weights from |
weight_index | integer | No (default: 0) | Zero-based index of the weight to return. Raises an error if out of range |
type | string? | No | Filter weights by type before selecting by index. Example values: voice_id, conversation, lora. When omitted, no filtering is applied |
Output
| Field | Type | Description |
|---|---|---|
weight | object | The selected weight object |
count | integer | Total number of weights found after any type filtering |
weight object:
| Field | Type | Description |
|---|---|---|
weight_id | integer | Weight ID |
external_id | string? | External ID (e.g. an ElevenLabs voice ID) |
bucket_path | string | S3 bucket path to the weight file |
local_path | string? | Absolute path to the downloaded temporary file. null if the download was skipped or failed |
dataset_id | integer? | Source dataset ID |
ai_model_id | integer? | AI model ID associated with the weight |
model_metadata | object? | Arbitrary metadata stored on the weight record |
note
local_path will be null if bucket_path is empty or the download fails. The node does not raise an error in that case.
Example
{
"id": "getWeights",
"type": "getWeights",
"data": {
"label": "Get Weights",
"isExecuted": false,
"handles": ["outputs"],
"schema": {},
"params": {
"dataset_id": { "value": 42, "isExpression": false, "isAttachedToInputNode": false },
"weight_index": { "value": 0, "isExpression": false, "isAttachedToInputNode": false },
"type": { "value": "voice_id", "isExpression": false, "isAttachedToInputNode": false }
},
"inputs": [], "outputs": [], "errors": []
},
"position": { "x": 0, "y": 0 },
"isSelected": false,
"isDragging": false
}
The external_id from this node is typically passed as voice_id to the voiceGeneration node.