Installation
Install the package:Starting a Call
Assistants can either be created on the fly (temporary) or created & persisted to your account (persistent).Option 1: Temporary Assistant
If you want to customize properties from the frontend on the fly, you can create an assistant configuration object and pass it to the.start()
method.
Assistant Configuration
Assistant Configuration
.start()
:- name: the display name for the assistant in our dashboard (for internal purposes only)
- firstMessage: the first message that our assistant will say when it picks up the web call
- transcriber: the transcriber is what turns user speech into processable text for our LLM. This is the first step in the end-to-end voice pipeline. We are using Deepgram for transcription, specifically, their
Nova 2
model. We also set the language to be transcribed as English. - voice: the final portion of the voice pipeline is turning LLM output-text into speech. This process is called “Text-to-speech” (or TTS for short). We use a voice provider called PlayHT, & a voice provided by them called
jennifer
. - model: for our LLM, we use
gpt-4
(from OpenAI) & set our system prompt for the assistant. The system prompt configures the context, role, personality, instructions and so on for the assistant. In our case, the system prompt above will give us the behaviour we want.
.start()
, passing the temporary assistant configuration:
Option 2: Persistent Assistant
If you want to create an assistant that you can reuse across multiple calls, you can create a persistent assistant in the Vapi Dashboard. Here’s how you can do that:Sign-up or Log-in to Vapi
Sign-up or Log-in to Vapi


Your dashboard may look a bit different if you already have an account with assistants in it. The main idea is that we’re in the dashboard now.
Create an Assistant
Create an Assistant

Ensure you are in the 'Assistants' dashboard tab, then this button will allow you to begin the assistant creation flow.
Blank Template
option.
Ensure you are in the 'Assistants' dashboard tab, then this button will allow you to begin the assistant creation flow.
Vapi’s Pizza Front Desk
, for example):
Name your assistant.

The assistant overview. You can edit your assistant’s transcriber, model, & voice — and edit other advanced configuration.
Model Setup
Model Setup
GPT-4
(from OpenAI) for this demo (though you’re free to use GPT-3.5
, or any one of your favorite LLMs).Set Your OpenAI Provider Key (optional)
Set Your OpenAI Provider Key (optional)

We set our provider key for OpenAI so Vapi can make requests to their API.
Set a First Message
Set a First Message
First Message
. This first message will be spoken by your assistant when either:- A Web Call Connects: when a web call is started with your assistant
- An Inbound Call is Picked-up: an inbound call is picked-up & answered by your assistant
- An Outbound Call is Dialed & Picked-up: an outbound call is dialed by your assistant & a person picks up
Set the System Prompt
Set the System Prompt
System Prompt
for our assistant. If you’re familiar with OpenAI’s API, this is the first prompt in the message list that we feed our LLM (learn more about prompt engineering on the OpenAI docs).The system prompt can be used to configure the context, role, personality, instructions and so on for the assistant. In our case, a system prompt like this will give us the behaviour we want:System Prompt
field. Now the model configuration for your assistant should look something like this:
Note how our model provider is set to OpenAI & the model is set to GPT-4.
Transcriber Setup
Transcriber Setup
Set Your Deepgram Provider Key (optional)
Set Your Deepgram Provider Key (optional)

Set Transcriber
Set Transcriber
Nova 2
& the language to en
for English. Now your assistant’s transcriber configuration should look something like this:
Note how our transcriber is set to 'deepgram', the model is set to 'Nova 2', & the language is set to English.
Voice Setup
Voice Setup
Jennifer
(female
, en-US
).You are free to use your favorite TTS voice platform here. ElevenLabs is
another alternative — by now you should get the flow of plugging in vendors into Vapi (add
provider key + pick provider in assistant config).You can skip the next step(s) if you don’t intend to use PlayHT.Set Your PlayHT Provider Key (optional)
Set Your PlayHT Provider Key (optional)
API Key
& User ID
from them.
Set Voice
Set Voice
playht
in the “provider” field, & Jennifer
in the “voice” field. We will leave all of the other settings untouched.
Each voice provider offers a host of settings you can modulate to customize voices. Here we will leave all the defaults alone.

.start()
, passing the persistent assistant’s ID:
assistantOverrides
as the second argument.
For example, if the first message is “Hello {{name}}
”, you can set assistantOverrides
to replace {{name}}
with John
: