OpenAI API key used for authentication.
Sent as Authorization: Bearer <apiKey>.
Optional baseBase URL for the OpenAI API. Override for proxies, Azure OpenAI, or compatible third-party endpoints.
'https://api.openai.com/v1'
Optional modelDefault TTS model. tts-1 is optimized for real-time, tts-1-hd for quality.
OpenAI removes tts-1, tts-1-hd and the gpt-4o-mini-tts snapshots on
2027-01-06. The replacement it names, gpt-realtime-2.1-mini, runs only on
the Realtime API and is not accepted by /v1/audio/speech, which this
provider calls.
'tts-1'
Optional voiceDefault voice identifier. See OPENAI_VOICES for available options.
'nova'
Optional fetchCustom fetch implementation for dependency injection in tests.
Optional init: RequestInitOptional init: RequestInitglobalThis.fetch
Configuration for the OpenAITextToSpeechProvider.
See