OpenAI compatibility

The Moses speech APIs answer OpenAI's audio endpoints. Keep your OpenAI SDK or framework service, change the base URL and the key, and the audio is made in Germany with nothing stored. Keys: API console. Machine-readable: openapi.json.

Base URLs

APIBase URLEndpoint
Text to speechhttps://moses-ai.com/tts/v1POST /audio/speech
Speech to texthttps://moses-ai.com/stt/v1POST /audio/transcriptions

Authentication: Authorization: Bearer mk_…. For streaming (an LLM's tokens to speech as they arrive, live transcription) use the realtime WebSockets with @mosesai/tts and @mosesai/stt: JavaScript example.

Text to speech: what is accepted

FieldMoses
input1 to 20,000 characters (OpenAI: 4,096).
modelAny value is accepted and ignored (tts-1, gpt-4o-mini-tts, …).
voiceMoses voice ids (alba, german/…, clone:my-voice; list: GET /tts/v1/voices). OpenAI's names work too and map to built-in voices (table below). With a non-English language they map to that language's default voice.
response_formatwav (default), pcm (16-bit mono 24 kHz), mp3 (64 kbit/s), opus (in Ogg), flac. Not offered: aac. Note: OpenAI's default is mp3, Moses' is wav; send the format you want.
speed0.25 to 4.0 accepted, applied within 0.5 to 2.0.
stream_formataudio and sse are accepted; the audio always comes as audio (streamed while it is generated), not as events. Clients that ask for SSE read it as raw audio.
instructionsIgnored.
Moses extraslanguage, normalize (numbers, dates, currencies as words), markup (SSML subset), pauses, lexicon.

OpenAI voice names

For clients that only allow OpenAI's names (Pipecat's OpenAI service checks them), each name picks a Moses voice.

OpenAI nameMoses voiceOpenAI nameMoses voice
alloyalbaonyxjavert
ashmariusnovavera
balladjeansageeve
coralannashimmerjane
echocharlesversepaul
fablegeorgemarinmary
cedarmichael

Speech to text: what is accepted

FieldMoses
fileAudio file up to 25 MB (multipart, as with OpenAI).
modelAny value is accepted and ignored (whisper-1, gpt-4o-mini-transcribe, …).
languageTwo-letter code, or auto (default).
response_formatjson (default), text, verbose_json, srt, vtt.
timestamp_granularities[]segment, word.
prompt, temperatureIgnored.

OpenAI SDK

from openai import OpenAI

tts = OpenAI(api_key=MOSES_API_KEY, base_url="https://moses-ai.com/tts/v1")
with tts.audio.speech.with_streaming_response.create(
        model="tts-1", voice="alba", input="Hello from Moses!", response_format="mp3") as r:
    r.stream_to_file("hello.mp3")

stt = OpenAI(api_key=MOSES_API_KEY, base_url="https://moses-ai.com/stt/v1")
text = stt.audio.transcriptions.create(model="whisper-1", file=open("hello.mp3", "rb"), language="en").text
import OpenAI from "openai";

const tts = new OpenAI({ apiKey: process.env.MOSES_API_KEY, baseURL: "https://moses-ai.com/tts/v1" });
const audio = await tts.audio.speech.create({ model: "tts-1", voice: "alba", input: "Hello!", response_format: "mp3" });

Pipecat

For voice agents, use the plugin instead: pipecat-moses streams over the realtime WebSockets (faster finals, every Moses voice and language). Pipecat's OpenAI services with the Moses base URLs work without it. They use the HTTP endpoints, one request per sentence; use a server key. Pipecat only accepts OpenAI's voice names, so pick one from the table; its TTS service sends no language, so it speaks English.

from pipecat.services.openai.tts import OpenAITTSService
from pipecat.services.openai.stt import OpenAISTTService

tts = OpenAITTSService(api_key=MOSES_API_KEY, base_url="https://moses-ai.com/tts/v1",
                       settings=OpenAITTSService.Settings(voice="nova"))
stt = OpenAISTTService(api_key=MOSES_API_KEY, base_url="https://moses-ai.com/stt/v1")

LiveKit Agents

For voice agents, use the plugin instead: livekit-plugins-moses streams over the realtime WebSockets. LiveKit's OpenAI plugin with the Moses base URLs works without it. Its TTS asks for SSE and reads the plain audio Moses sends instead; any Moses voice id works, and so does its default format, mp3. Its STT here is the file endpoint, so LiveKit cuts the audio into utterances with its VAD.

from livekit.plugins import openai

tts = openai.TTS(base_url="https://moses-ai.com/tts/v1", api_key=MOSES_API_KEY, voice="alba", response_format="pcm")
stt = openai.STT(base_url="https://moses-ai.com/stt/v1", api_key=MOSES_API_KEY, model="whisper-1", language="en")

Limits

Server keys

A key used only from your own servers (a voice agent on Pipecat or LiveKit, a back end) sends everything from a few addresses, so per-address limits would get in the way. Tick Server key when you create or change the key in the console: it has no per-IP limits; your account's and the key's own limits still apply. Never put a server key into an app or a website.

Errors

Every error answer has a message, a code and, where waiting helps, Retry-After (header, and retry_after in seconds). The error object has OpenAI's shape, so OpenAI SDKs show the message.

HTTP/1.1 429 Too Many Requests
Retry-After: 23

{"detail": "at most 60 requests a minute for your account …", "code": "account_limit", "retry_after": 23,
 "error": {"message": "at most 60 requests a minute for your account …", "type": "rate_limit_error", "code": "account_limit"}}
CodeStatusMeaning
account_limit429Your account's requests a minute
key_limit429A limit you set on the key
ip_limit429The key's limit per IP address
too_many_at_once429Too many requests at the same time
daily_limit, daily_spend429A daily allowance or the daily spending limit (renews at midnight UTC)
no_credit402Top up in the console
unauthorized, wrong_scope, referer, blocked401 / 403Key missing or wrong, key not for this API, wrong website, account blocked
bad_request, bad_format, too_large400 / 413Something in the request
unavailable, busy503 / 429Busy right now: retry after Retry-After

Realtime WebSockets send the same codes in their error event, with retry_after where it applies.