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 response = await client.voiceAnalysis.retrieveDeployment('deploymentId');
console.log(response.id);{
"id": "<string>",
"name": "<string>",
"type": "VoiceDeployment",
"status": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"workerId": "<string>",
"flowId": "<string>",
"config": {},
"flowVersionId": "<string>",
"extractions": {},
"engineModel": "<string>",
"visualizations": {}
}Fetches a single deployment record by its ID, without requiring the worker ID. Works for all deployment types: Voice, VoiceV1, Chat, ChatEmbed, Whatsapp, SMS, Email, Slack, and API. Delegate-specific fields are flattened into the response automatically.
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 response = await client.voiceAnalysis.retrieveDeployment('deploymentId');
console.log(response.id);{
"id": "<string>",
"name": "<string>",
"type": "VoiceDeployment",
"status": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"workerId": "<string>",
"flowId": "<string>",
"config": {},
"flowVersionId": "<string>",
"extractions": {},
"engineModel": "<string>",
"visualizations": {}
}API key authentication
The deployment ID (e.g. deploy_531965ce-ff0f-45bd-8495-33cd86329610)
Comma-separated list of relations to include. Supported: sentinelAssignments, successCriteria, deploymentParameters.
Deployment record with type-specific fields flattened
The deployment delegate type
VoiceDeployment, VoiceV1Deployment, ChatDeployment, EmailDeployment, SlackDeployment