Migrate from OpenAI tts-1 before shutdown
OpenAI deprecated tts-1, tts-1-hd and gpt-4o-mini-tts ahead of their January 6, 2027 shutdown, and its Realtime API replacement is not a drop-in REST swap. Giggy supports both an OpenAI-compatible POST /v1/audio/speech endpoint and a native POST /v1/text-to-speech endpoint from $0.60 per million characters.
Before you start
- Create a server-side Giggy API key (giggy_sk_) in Speech API > API Keys and store it in GIGGY_API_KEY.
- Call GET https://api.giggy.ai/v1/voices with xi-api-key: $GIGGY_API_KEY and copy a Giggy voice_id UUID.
- Decide whether you want a two-line OpenAI SDK base_url swap (uses paid Streaming admission: $5/1M REST Latin-script, $10/1M otherwise) or native POST /v1/text-to-speech for $0.60/1M Batch or $0.80/1M Fast.
Create it in Giggy
- Audit your codebase for client.audio.speech.create or POST https://api.openai.com/v1/audio/speech.
- Generate a Giggy API key and fetch a matching voice UUID via GET https://api.giggy.ai/v1/voices.
- For an immediate drop-in swap, point your OpenAI SDK base_url to https://api.giggy.ai/v1, pass Authorization: Bearer $GIGGY_API_KEY, set model to "giggyspeech" and voice to your Giggy voice UUID.
- For non-streaming workloads such as articles, courses or audiobooks, switch to native POST /v1/text-to-speech with mode="fast" ($0.80/1M) or mode="batch" ($0.60/1M) and an Idempotency-Key header.
- Run a smoke test on production scripts and verify audio output before January 6, 2027.
Improve the result
- Keep GIGGY_API_KEY server-side and set per-key monthly budgets in Speech API > Usage & Billing.
- Use native POST /v1/text-to-speech with mode="batch" ($0.60/1M) or mode="fast" ($0.80/1M) whenever you save static MP3 files instead of streaming live.
- Pin a unique Idempotency-Key per logical native TTS job so timeouts never double-bill.
Examples
- OpenAI-compatible swap (Python/Node OpenAI SDK): set base_url="https://api.giggy.ai/v1", api_key=GIGGY_API_KEY, model="giggyspeech", and voice="<GIGGY_VOICE_UUID>".
- Native lowest-cost REST call: POST https://api.giggy.ai/v1/text-to-speech with xi-api-key, mode="fast" ($0.80/1M) or mode="batch" ($0.60/1M), and output_format="mp3_24000_160".
- Cost impact on 10M characters/month: $150 on OpenAI tts-1 ($300 on tts-1-hd) drops to $50 via OpenAI-compatible REST Latin-script Streaming, $8 on Giggy Fast, or $6 on Giggy Batch.
Common mistakes
- Passing built-in OpenAI voice names like "alloy" or "nova" instead of a Giggy voice UUID returned by GET /v1/voices or GET /v1/my-voices.
- Assuming changing an OpenAI client base_url migrates transcription too — Giggy POST /v1/audio/transcriptions accepts raw WAV bytes (Content-Type: audio/wav), not an OpenAI multipart form upload.
- Leaving automatic client retries enabled on streaming speech endpoints without an Idempotency-Key on native TTS.
Related guides
- How to create text to speech
- How to create a designed voice
- How to create a voice clone
- How Generation History works
- How My Voices and Voice Library work
- Twilio Media Streams with Giggy WebSocket STT
- Build a Pipecat voice agent with Giggy
- Use Giggy TTS in LiveKit Agents
- Configure Giggy as a Jambonz custom STT provider
- Connect the Giggy MCP server to Claude Code, Cursor and Codex
- Automate voiceovers and transcription in n8n