curl -X POST "https://api.tts.runatlas.com/v1/audio/speech" \
-H "Authorization: Bearer $ATLAS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"atlas-tts","voice":"lylla","input":"Hello from Lylla.","response_format":"wav"}' \
--output out.wav
from openai import OpenAI
import os
client = OpenAI(
base_url="https://api.tts.runatlas.com/v1",
api_key=os.environ["ATLAS_API_KEY"],
)
with client.audio.speech.with_streaming_response.create(
model="atlas-tts",
voice="lylla",
input="Hello from Lylla.",
response_format="wav",
) as resp:
resp.stream_to_file("out.wav")
import OpenAI from "openai";
import fs from "node:fs";
const client = new OpenAI({
baseURL: "https://api.tts.runatlas.com/v1",
apiKey: process.env.ATLAS_API_KEY,
});
const res = await client.audio.speech.create({
model: "atlas-tts",
voice: "lylla",
input: "Hello from Lylla.",
response_format: "wav",
});
fs.writeFileSync("out.wav", Buffer.from(await res.arrayBuffer()));
{
"error": {
"message": "Unknown voice",
"type": "proxy_error"
}
}
API reference
Generate speech
Synthesize a complete audio clip from text. OpenAI-compatible.
POST
/
v1
/
audio
/
speech
curl -X POST "https://api.tts.runatlas.com/v1/audio/speech" \
-H "Authorization: Bearer $ATLAS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"atlas-tts","voice":"lylla","input":"Hello from Lylla.","response_format":"wav"}' \
--output out.wav
from openai import OpenAI
import os
client = OpenAI(
base_url="https://api.tts.runatlas.com/v1",
api_key=os.environ["ATLAS_API_KEY"],
)
with client.audio.speech.with_streaming_response.create(
model="atlas-tts",
voice="lylla",
input="Hello from Lylla.",
response_format="wav",
) as resp:
resp.stream_to_file("out.wav")
import OpenAI from "openai";
import fs from "node:fs";
const client = new OpenAI({
baseURL: "https://api.tts.runatlas.com/v1",
apiKey: process.env.ATLAS_API_KEY,
});
const res = await client.audio.speech.create({
model: "atlas-tts",
voice: "lylla",
input: "Hello from Lylla.",
response_format: "wav",
});
fs.writeFileSync("out.wav", Buffer.from(await res.arrayBuffer()));
{
"error": {
"message": "Unknown voice",
"type": "proxy_error"
}
}
Generates speech for the given text and returns raw audio bytes. The endpoint is
drop-in compatible with the OpenAI Audio API — point the OpenAI SDK at
https://api.tts.runatlas.com/v1 with your sk_ key.
Authorization
string
required
Bearer sk_… — your secret API key.Body
string
required
The voice id, e.g.
lylla. List available voices via /v1/models.string
required
The text to speak.
string
default:"wav"
One of
wav, mp3, pcm, opus, flac. With pcm, audio is streamed to the
response as it is synthesized (lowest time-to-first-byte).string
Accepted for OpenAI SDK compatibility but ignored — the voice selects the model.
Response
Raw audio bytes with the matchingContent-Type (audio/wav, audio/mpeg, audio/pcm,
audio/opus, or audio/flac) and Cache-Control: no-store.
header
Model inference time for this request, in milliseconds.
header
Total gateway time in milliseconds. Subtract
x-upstream-ms to get exact gateway
overhead for the same request.curl -X POST "https://api.tts.runatlas.com/v1/audio/speech" \
-H "Authorization: Bearer $ATLAS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"atlas-tts","voice":"lylla","input":"Hello from Lylla.","response_format":"wav"}' \
--output out.wav
from openai import OpenAI
import os
client = OpenAI(
base_url="https://api.tts.runatlas.com/v1",
api_key=os.environ["ATLAS_API_KEY"],
)
with client.audio.speech.with_streaming_response.create(
model="atlas-tts",
voice="lylla",
input="Hello from Lylla.",
response_format="wav",
) as resp:
resp.stream_to_file("out.wav")
import OpenAI from "openai";
import fs from "node:fs";
const client = new OpenAI({
baseURL: "https://api.tts.runatlas.com/v1",
apiKey: process.env.ATLAS_API_KEY,
});
const res = await client.audio.speech.create({
model: "atlas-tts",
voice: "lylla",
input: "Hello from Lylla.",
response_format: "wav",
});
fs.writeFileSync("out.wav", Buffer.from(await res.arrayBuffer()));
{
"error": {
"message": "Unknown voice",
"type": "proxy_error"
}
}