TTS Swap · Migration guide: tts-1 · gpt-4o-mini-tts · curl · Node · Python · tts-1 shutdown facts · free key

Python (openai SDK): keep /v1/audio/speech working

Source: OpenAI's deprecations page, entry "2026-10-01: Text-to-speech models", lists tts-1, tts-1-hd and both gpt-4o-mini-tts snapshots (gpt-4o-mini-tts-2025-03-20, gpt-4o-mini-tts-2025-12-15) with a shutdown date of Jan 6, 2027 and gpt-realtime-2.1-mini as the recommended replacement. Checked 2026-11-02.

from openai import OpenAI
import os

client = OpenAI(
    base_url="https://tts.deadlinkpatrol.com/v1",  # was: default api.openai.com
    api_key=os.environ["TTS_SWAP_KEY"],
)

res = client.audio.speech.create(model="tts-1", voice="alloy", input="Hello from TTS Swap.")
res.write_to_file("speech.wav")  # WAV bytes, even if response_format is mp3

Set TTS_SWAP_KEY to your key (free keys start with sk-tts-free-). For Spanish, French, Chinese, Japanese or Korean, pass language (extra_body={"language":"es"}). response_format="pcm" returns raw 24 kHz 16-bit mono.

Try it free

Get a free key on the home page (10,000 characters a month, no card), then run one of the snippets above.

TTS Swap by Swift Labs. Not affiliated with OpenAI. · Terms · Privacy · Manage or cancel subscription