JuzTim
05/16/2024, 10:21 AMVapi Support
05/16/2024, 10:21 AMVapi Support
05/16/2024, 10:21 AM/call/web
endpoint is not recommended for direct use. It's intended to be used via the Web SDK or other provided tools, rather than calling it directly via custom modifications [(1)]() [(2)]() .
To create and manage web calls, you should use the Web SDK. Here is how you can get started with the Web SDK:
1. **Installation**:
bash
yarn add @vapi-ai/web
or
bash
npm install @vapi-ai/web
2. **Usage**:
javascript
import Vapi from '@vapi-ai/web';
const vapi = new Vapi('your-public-key');
vapi.start({
model: {
provider: "openai",
model: "gpt-3.5-turbo",
messages: [
{
role: "system",
content: "You are an assistant.",
},
],
},
voice: {
provider: "11labs",
voiceId: "burt",
},
});
3. **Listening to Events**:
javascript
vapi.on('call-start', () => {
console.log('Call has started');
});
vapi.on('call-end', () => {
console.log('Call has ended');
});
vapi.on('message', (message) => {
console.log(message);
});
For more detailed information, you can refer to the Web SDK documentation [(3)]() [(4)]() [(5)]() [(6)]() [(7)]() .JuzTim
05/16/2024, 10:22 AMVapi Support
05/16/2024, 10:22 AMVapi Support
05/16/2024, 10:22 AM/call/web
endpoint is not documented or recommended. The intended approach is through the Web SDK. If you choose to proceed without the Web SDK, you may encounter issues with support or stability that aren't addressed in the documentation.
For more details on supported methods, you can refer to these sources:
- [Vapi Web SDK]() [(1)]()
- [Create Phone Call]() [(2)]()Vapi Support
05/16/2024, 10:23 AMJuzTim
05/16/2024, 10:24 AMSahil
05/16/2024, 10:33 AMJuzTim
05/16/2024, 10:34 AMJuzTim
05/16/2024, 10:34 AMVapi Support
05/16/2024, 10:37 AMSahil
05/16/2024, 10:37 AMSahil
05/16/2024, 10:38 AMJuzTim
05/16/2024, 10:40 AM