GPT-4o mini TTS
OpenAI’s GPT-4o mini TTS: text to speech in eleven voices, with instructions for tone and pace.
- Model ID
openai/gpt-4o-mini-tts- Endpoint
POST /v1/audio/speech
Price
What a call costs, beside the official price: the list price of the model's own vendor for the same model and settings.
| Applies to | Minu | Official price | vs official price |
|---|---|---|---|
| Every requestper minute | $0.00375 | $0.015 | 75% less |
Text to speech is billed by the length of the audio it makes, after each response. A request that makes no audio costs nothing.
The official price is the list price the vendor of the model publishes for the same model and settings, as recorded in our catalog. It can change; check the vendor's own pricing page for the current figure.
Request example
The official OpenAI SDKs work as they are: set baseURL to https://api.minu.ai/v1 and use your Minu key. The response is the audio file.
curl https://api.minu.ai/v1/audio/speech \
-H "Authorization: Bearer $MINU_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-4o-mini-tts",
"voice": "alloy",
"input": "Your order has shipped and will arrive on Friday."
}' \
--output speech.mp3import fs from 'node:fs';
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: process.env.MINU_API_KEY,
baseURL: 'https://api.minu.ai/v1',
});
const speech = await client.audio.speech.create({
model: 'openai/gpt-4o-mini-tts',
voice: 'alloy',
input: 'Your order has shipped and will arrive on Friday.',
});
await fs.promises.writeFile('speech.mp3', Buffer.from(await speech.arrayBuffer()));import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["MINU_API_KEY"],
base_url="https://api.minu.ai/v1",
)
speech = client.audio.speech.create(
model="openai/gpt-4o-mini-tts",
voice="alloy",
input="Your order has shipped and will arrive on Friday.",
)
speech.write_to_file("speech.mp3")Input parameters
Send a JSON body with model, input (the text) and voice: one of alloy, ash, ballad, coral, echo, fable, nova, onyx, sage, shimmer, verse. instructions, response_format and speed are optional.