GPT-4o mini TTS until 2027-01-05
openai/gpt-4o-mini-tts
Overview
Speech
OpenAI's text-to-speech model built on GPT-4o mini, which can be steered with instructions on tone and delivery.
Made by OpenAI · released Mar 2025
Input
TextOutput
Audio- Max characters per request
- 4.096 characters
- Automatic fallback routes Not supported
Routes and pricing
Providers are tried in the order listed below. We try these providers in order. If one fails, we move on to the next, and you pay the rate of the one that answers.
OpenAI
primary until 2027-01-05
100% succeeded
4,5 s to first byte
last 7 days · 123 attempts
- Input
- Rp11.100per million tokens$0.6
- Audio output
- Rp222.000per million tokens$12
Per-part units
- Base audio tokens per request
- 32 Measured live on the SSE form, voice alloy, 2026-09-09
- Audio tokens per character
- 2 Measured live on the SSE form, voice alloy, 2026-09-09
Today's reference rate: Rp18.500/USD
Prices exclude the 5,5% service fee
Data and privacy
OpenAI OpenAI, Your data
- Used to train models
- No
- Retention
- Up to 30 days for abuse monitoring, unless the law requires longer.
- Processing location
- Not stated; storing data in a chosen region is a separate opt-in.
- At indoRouter
- We don't store your prompts or responses. Files you upload, batches, and responses you send with
store: trueare kept encrypted for up to 30 days.
Code samples
Use this model ID with any OpenAI SDK. The base URL is the same for every model.
curl https://api.indorouter.ai/v1/audio/speech \
-H "authorization: Bearer $INDOROUTER_API_KEY" \
-H "content-type: application/json" \
-d '{"model": "openai/gpt-4o-mini-tts", "input": "halo", "voice": "alloy"}' \
--output halo.mp3
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.indorouter.ai/v1",
api_key=os.environ["INDOROUTER_API_KEY"],
)
with client.audio.speech.with_streaming_response.create(
model="openai/gpt-4o-mini-tts", voice="alloy", input="halo"
) as response:
response.stream_to_file("halo.mp3")
import fs from "node:fs";
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.indorouter.ai/v1",
apiKey: process.env.INDOROUTER_API_KEY,
});
const speech = await client.audio.speech.create({ model: "openai/gpt-4o-mini-tts", voice: "alloy", input: "halo" });
fs.writeFileSync("halo.mp3", Buffer.from(await speech.arrayBuffer()));