Rafal Kwiatkowski
06/05/2024, 2:53 PMVapi Support
06/05/2024, 2:53 PMVapi Support
06/05/2024, 2:53 PMVapi Support
06/05/2024, 2:53 PMjavascript
fetch('https://api.vapi.ai/assistant', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"transcriber": {
"provider": "deepgram",
"model": "nova",
"languages": ["en", "de", "pl"]
},
"voice": {
"provider": "11labs",
"voiceId": "t0jbNlBVZ17f02VDIeMI"
},
"languageMappings": {
"de": {
"voiceId": "vj2Y0u1NaT1ayH6VYkYu"
},
"pl": {
"voiceId": "7u8qsX4HQsSHJ0f8xsQZ"
}
}
})
})
.then(response => response.json())
.then(data => console.log(data));
This script assumes you have proper authentication and the necessary permissions to perform such operations. Adjust the endpoint URL and method according to whether you're creating a new assistant or updating an existing one.Vapi
06/05/2024, 2:55 PMVapi
06/05/2024, 2:55 PMVapi
06/05/2024, 2:56 PMChowderr
06/05/2024, 4:14 PM