Speech Translation API: STT, TTS, and Text Translation in One Service

When a product needs voice translation, the task quickly becomes more than a single model request. You need to recognize speech, detect the language, translate the text, synthesize audio, and connect everything into a stream that stays reliable during a live conversation.
The Loquora API provides these capabilities through one organization key: separate REST endpoints for text and audio, plus WebSocket for real-time translation.
What the API can do
The API has four main building blocks:
- text translation between supported languages;
- speech recognition from a WAV file;
- speech synthesis to MP3;
- a complete real-time voice pipeline over WebSocket: recognition → translation → speech.
These capabilities can power internal tools for international teams, voice bots, customer support systems, CRMs, education products, and call-processing services.
Text translation
POST /v1/translate accepts up to 5,000 characters plus the source and target languages. The response contains the translated text and the resolved language pair.
curl https://api.loquora.space/v1/translate \
-H "X-Api-Key: lq_your_key" \
-H "Content-Type: application/json" \
-d '{"text":"Hello!","source_lang":"en","target_lang":"es"}'
Text translation does not consume the organization's minute balance, which makes it suitable for interfaces, messages, and short documents.
Speech recognition
POST /v1/stt accepts a WAV file up to 25 MB. You can pass the language explicitly or omit it to enable automatic detection.
The response includes the transcript, language code, detection confidence, and audio duration. The duration is what counts against the organization's shared balance.
Speech synthesis
POST /v1/tts turns text into an MP3 file. It can use the default voice or an allowed cloned voice belonging to a member of the organization. The response includes the generated audio duration, which is counted as usage.
Cloned voices are restricted to the organization: an API key cannot request someone else's voice with an arbitrary voice_id.
Real-time translation over WebSocket
For live conversations, connect to wss://api.loquora.space/ws. Pass the API key as the token in session.init, then use the same streaming protocol that powers Loquora.
{
"type": "session.init",
"payload": {
"token": "lq_your_key",
"sourceCode": "en",
"targetCode": "es"
}
}
This mode is designed for calls, voice assistants, and other cases where uploading a finished file and waiting for a response is not enough.
How API keys work
Keys belong to an organization on the Business plan. Team owners and admins can create and revoke them in the Loquora desktop app.
The full key is shown only once after creation. After that, the interface keeps only a short prefix, last-used date, expiration, and status. If a key may have been exposed, revoke it and create a replacement.
Each key is limited to 120 requests per minute. When that limit is exceeded, the API returns 429 with a Retry-After header.
Getting started
- Open Team settings in the Loquora app.
- Create an API key and store it somewhere secure immediately.
- Send a test request to
/v1/translate. - Add
/v1/stt,/v1/tts, or WebSocket depending on your audio workflow.
See the complete endpoint, authentication, and error reference in the Loquora API documentation.