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 campaign = await client.workers.deployments.voicev1.campaigns.create('deploymentId', {
workerId: 'workerId',
});
console.log(campaign.id);
{
"id": "<string>",
"status": "RUNNING",
"steps": [
{}
]
}
API key authentication
Campaign created successfully
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 campaign = await client.workers.deployments.voicev1.campaigns.create('deploymentId', {
workerId: 'workerId',
});
console.log(campaign.id);
{
"id": "<string>",
"status": "RUNNING",
"steps": [
{}
]
}
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 campaign = await client.workers.deployments.voicev1.campaigns.create('deploymentId', {
workerId: 'workerId',
});
console.log(campaign.id);
{
"id": "<string>",
"status": "RUNNING",
"steps": [
{}
]
}
API key authentication
Campaign created successfully
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 campaign = await client.workers.deployments.voicev1.campaigns.create('deploymentId', {
workerId: 'workerId',
});
console.log(campaign.id);
{
"id": "<string>",
"status": "RUNNING",
"steps": [
{}
]
}