Roy Li
09/19/2025, 1:00 AMcurl -X POST https://api.vapi.ai/chat \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"assistantId": "your-assistant-id",
"input": "Explain how to set up API authentication in detail",
"stream": true
}'
Right now the assistant replies as if it’s in a voice call. We want to add an override (or maybe additional is better) system prompt to make sure it knows this is text chat.
Question 2: We’re also considering Pass Dynamic Variables so the assistant can detect the mode in text chat. For example:
You are a helpful {{chatMode}} customer support agent
In the Widget Chat API we can set:
"assistantOverrides": {
"variableValues": {
"chatMode": "text chat"
}
}
So the question is: if we only modify the prompt in the front-end GUI for the voice assistant, how can we do the same variable substitution so the voice assistant knows it’s in voice mode?Vapi Support Bot
09/19/2025, 1:01 AMassistantOverrides.variableValues in your API call.
For example:
json
{
"assistantId": "your-assistant-id",
"input": "Explain how to set up API authentication in detail",
"assistantOverrides": {
"variableValues": {
"chatMode": "text chat"
}
}
}
Make sure your assistant's prompt includes {{chatMode}} for this to take effect.
[See documentation](https://docs.vapi.ai/chat/quickstart#pass-variables-in-your-chat-request)
Sources:
- [Chat quickstart – Pass variables in your chat request](https://docs.vapi.ai/chat/quickstart#pass-variables-in-your-chat-request)
- [Assistants: Dynamic Variables](https://docs.vapi.ai/assistants/dynamic-variables)Roy Li
09/19/2025, 1:49 AMVapi Support Bot
09/19/2025, 1:50 AM{{chatMode}}) within the dashboard, and then set their values in your API call using assistantOverrides.variableValues.
Example:
json
{
"assistantId": "your-assistant-id",
"input": "Hello!",
"assistantOverrides": {
"variableValues": {
"chatMode": "text chat"
}
}
}
Set the variable value in your API request, not in the dashboard UI.
[See documentation](https://docs.vapi.ai/assistants/dynamic-variables)
Source:
- [Assistants: Dynamic Variables](https://docs.vapi.ai/assistants/dynamic-variables)Chiranjeet Mishra
09/22/2025, 10:09 PM