OpenAI

Use OpenAI for text-to-speech in Vapi.

OpenAI provides text-to-speech for Vapi voice agents.

You can use OpenAI through Vapi’s default integration, or connect your own account in Integrations.

Supported capability

CapabilityProvider value
Text-to-speechopenai

Text-to-speech

Set voice.provider to openai, voice.model to a TTS model (tts-1, tts-1-hd, or gpt-4o-mini-tts), and voice.voiceId to a voice. Browse and copy a voice’s ID from the Voice Library; the default voice is alloy.

$curl -X PATCH "https://api.vapi.ai/assistant/ASSISTANT_ID" \
> -H "Authorization: Bearer $VAPI_API_KEY" \
> -H "Content-Type: application/json" \
> -d '{
> "voice": { "provider": "openai", "model": "gpt-4o-mini-tts", "voiceId": "alloy" }
> }'

For additional API configuration options, review the OpenAIVoice fields in the Create Assistant API reference.