import BrainbaseLabs from 'brainbase-labs';
const client = new BrainbaseLabs({
apiKey: process.env['BRAINBASE_LABS_API_KEY'], // This is the default and can be omitted
});
const flow = await client.voiceAnalysis.retrieveFlow('flowId');
console.log(flow.id);{
"id": "<string>",
"version": 123,
"name": "<string>",
"code": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"workerId": "<string>",
"variables": {},
"label": "<string>",
"lastEditedByType": "USER",
"lastEditedByUserId": "<string>",
"lastEditedByApiKeyId": "<string>"
}Fetches a single flow record by its ID, without requiring the worker ID. Supports the same versionId and deploymentId query parameters as the worker-scoped endpoint for version pinning and parameter merging.
import BrainbaseLabs from 'brainbase-labs';
const client = new BrainbaseLabs({
apiKey: process.env['BRAINBASE_LABS_API_KEY'], // This is the default and can be omitted
});
const flow = await client.voiceAnalysis.retrieveFlow('flowId');
console.log(flow.id);{
"id": "<string>",
"version": 123,
"name": "<string>",
"code": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"workerId": "<string>",
"variables": {},
"label": "<string>",
"lastEditedByType": "USER",
"lastEditedByUserId": "<string>",
"lastEditedByApiKeyId": "<string>"
}API key authentication
The flow ID (e.g. flow_a1b2c3d4-...)
If provided, returns the flow with code/variables from this specific version
If provided, returns the flow with merged flow+deployment parameters in _mergedParameters
Flow record
USER, API_KEY