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

Node.js (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.

import OpenAI from "openai";
import fs from "node:fs";

const client = new OpenAI({
  baseURL: "https://tts.deadlinkpatrol.com/v1",          // was: default api.openai.com
  apiKey: process.env.TTS_SWAP_KEY,
});

const res = await client.audio.speech.create({
  model: "tts-1", voice: "alloy", input: "Hello from TTS Swap.",
});
fs.writeFileSync("speech.wav", Buffer.from(await res.arrayBuffer())); // WAV bytes

Set TTS_SWAP_KEY to your key (free keys start with sk-tts-free-). For Spanish, French, Chinese, Japanese or Korean, pass language (add language: "es" to the request body). 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