We use cookies. Cookies and browser storage keep you signed in and remember your preferences. With your permission we also measure how the site is used. You can any time. See our cookie policy.
Text to speech API
Generate natural voices for apps, videos and accessibility. Pick a model and voice, set speed and output format (mp3, wav, opus, flac) and stream the audio back.
- Voice-overs for videos
- Reading articles aloud
- Voice assistants and IVR
- Accessibility features
Sign in to use thisCreate free account
input_references
0/3
reference_transcript
Results will appear here.
5 of 5 free messages left today. A free account adds free usage and an API key.Create free accountSign inSession cost $0.00
Settings
Text to speech API · 36 models
How to call the Text to speech API API
- Create an API key in your dashboard.
- Install the official openai SDK for your language.
- Set baseURL to https://api14.com/api/v1 and model to "mistralai/voxtral-mini-tts-2603".
How is TTS priced?
Per character of input text. A 1,000-character paragraph usually costs a fraction of a cent to a few cents.
Which formats are supported?
mp3, wav, opus and flac, depending on the model.
Can I choose a voice?
Yes. Pass the voice parameter; each model page lists how many voices the model offers.
Can I stream the audio?
Yes. Read the response body as a stream and start playback before the whole file arrives.
import { writeFile } from "node:fs/promises";
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api14.com/api/v1",
apiKey: process.env.API14_API_KEY,
});
const audio = await client.audio.speech.create({
"model": "mistralai/voxtral-mini-tts-2603",
"input": "Hello from api14! One API for every model.",
"voice": "alloy",
"response_format": "mp3"
});
await writeFile("speech.mp3", Buffer.from(await audio.arrayBuffer()));