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 voiceV1Deployment = await client.workers.deployments.voicev1.create('workerId', {
allowedTransferNumbers: ['string'],
config: {},
endSentence: 'endSentence',
extractions: { foo: { description: 'description', required: true, type: 'string' } },
flowId: 'flowId',
functions: 'functions',
language: 'language',
model: 'model',
name: 'name',
objective: 'objective',
phoneNumber: 'phoneNumber',
resourceKeys: ['string'],
startSentence: 'startSentence',
voiceId: 'voiceId',
wsBaseUrl: 'wsBaseUrl',
});
console.log(voiceV1Deployment.id);
{
"id": "<string>",
"phoneNumber": "<string>",
"objective": "<string>",
"startSentence": "<string>",
"endSentence": "<string>",
"voiceId": "<string>",
"language": "<string>",
"allowedTransferNumbers": "<string>",
"functions": {},
"model": "<string>",
"resourceKeys": "<string>",
"wsBaseUrl": "<string>"
}
API key authentication
Voice v1 deployment created
The response is of type object
.
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 voiceV1Deployment = await client.workers.deployments.voicev1.create('workerId', {
allowedTransferNumbers: ['string'],
config: {},
endSentence: 'endSentence',
extractions: { foo: { description: 'description', required: true, type: 'string' } },
flowId: 'flowId',
functions: 'functions',
language: 'language',
model: 'model',
name: 'name',
objective: 'objective',
phoneNumber: 'phoneNumber',
resourceKeys: ['string'],
startSentence: 'startSentence',
voiceId: 'voiceId',
wsBaseUrl: 'wsBaseUrl',
});
console.log(voiceV1Deployment.id);
{
"id": "<string>",
"phoneNumber": "<string>",
"objective": "<string>",
"startSentence": "<string>",
"endSentence": "<string>",
"voiceId": "<string>",
"language": "<string>",
"allowedTransferNumbers": "<string>",
"functions": {},
"model": "<string>",
"resourceKeys": "<string>",
"wsBaseUrl": "<string>"
}
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 voiceV1Deployment = await client.workers.deployments.voicev1.create('workerId', {
allowedTransferNumbers: ['string'],
config: {},
endSentence: 'endSentence',
extractions: { foo: { description: 'description', required: true, type: 'string' } },
flowId: 'flowId',
functions: 'functions',
language: 'language',
model: 'model',
name: 'name',
objective: 'objective',
phoneNumber: 'phoneNumber',
resourceKeys: ['string'],
startSentence: 'startSentence',
voiceId: 'voiceId',
wsBaseUrl: 'wsBaseUrl',
});
console.log(voiceV1Deployment.id);
{
"id": "<string>",
"phoneNumber": "<string>",
"objective": "<string>",
"startSentence": "<string>",
"endSentence": "<string>",
"voiceId": "<string>",
"language": "<string>",
"allowedTransferNumbers": "<string>",
"functions": {},
"model": "<string>",
"resourceKeys": "<string>",
"wsBaseUrl": "<string>"
}
API key authentication
Voice v1 deployment created
The response is of type object
.
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 voiceV1Deployment = await client.workers.deployments.voicev1.create('workerId', {
allowedTransferNumbers: ['string'],
config: {},
endSentence: 'endSentence',
extractions: { foo: { description: 'description', required: true, type: 'string' } },
flowId: 'flowId',
functions: 'functions',
language: 'language',
model: 'model',
name: 'name',
objective: 'objective',
phoneNumber: 'phoneNumber',
resourceKeys: ['string'],
startSentence: 'startSentence',
voiceId: 'voiceId',
wsBaseUrl: 'wsBaseUrl',
});
console.log(voiceV1Deployment.id);
{
"id": "<string>",
"phoneNumber": "<string>",
"objective": "<string>",
"startSentence": "<string>",
"endSentence": "<string>",
"voiceId": "<string>",
"language": "<string>",
"allowedTransferNumbers": "<string>",
"functions": {},
"model": "<string>",
"resourceKeys": "<string>",
"wsBaseUrl": "<string>"
}