Skip to main content

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

ParamTypeRequiredDescription
dataset_idintegerYesDataset ID to get weights from
weight_indexintegerNo (default: 0)Zero-based index of the weight to return. Raises an error if out of range
typestring?NoFilter weights by type before selecting by index. Example values: voice_id, conversation, lora. When omitted, no filtering is applied

Output

FieldTypeDescription
weightobjectThe selected weight object
countintegerTotal number of weights found after any type filtering

weight object:

FieldTypeDescription
weight_idintegerWeight ID
external_idstring?External ID (e.g. an ElevenLabs voice ID)
bucket_pathstringS3 bucket path to the weight file
local_pathstring?Absolute path to the downloaded temporary file. null if the download was skipped or failed
dataset_idinteger?Source dataset ID
ai_model_idinteger?AI model ID associated with the weight
model_metadataobject?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.