Developer API

Build with the Loquora API

Add translation, speech recognition, speech synthesis, and the real-time voice pipeline to your products using one organization API key.

REST + WebSocket120 requests/minBusiness API
(I)Quick start

Your first request in minutes

API access is available to Business organizations. Owners and admins manage keys in the desktop app.

  1. 1

    Create a key

    Open Team settings in the Loquora app, find API keys, and create a key for your integration.

  2. 2

    Save the secret

    Copy the full lq_ key immediately. For security, it is displayed only once.

  3. 3

    Send a request

    Pass the key in X-Api-Key or Authorization: Bearer and call the required endpoint.

(II)REST API

Three building blocks

POST/v1/translate

Text translation

Translate up to 5,000 characters between supported languages. The response contains translated text and the resolved language pair.

Text translation does not consume the organization's minute balance.

curl https://api.loquora.space/v1/translate \
  -H "X-Api-Key: lq_your_key" \
  -H "Content-Type: application/json" \
  -d '{"text":"Привет!","source_lang":"ru","target_lang":"en"}'
POST/v1/tts

Speech synthesis

Generate MP3 audio with the default voice or an allowed cloned voice from your organization.

The generated audio duration is charged to the organization's shared balance.

curl https://api.loquora.space/v1/tts \
  -H "Authorization: Bearer lq_your_key" \
  -H "Content-Type: application/json" \
  -d '{"text":"Hello world","language":"en"}' \
  --output speech.mp3
POST/v1/stt?language=ru

Speech recognition

Send a WAV file up to 25 MB and receive text, detected language, confidence, and audio duration.

The audio duration is charged to the organization's shared balance. Omit language to enable auto-detection.

curl "https://api.loquora.space/v1/stt?language=ru" \
  -H "X-Api-Key: lq_your_key" \
  -H "Content-Type: audio/wav" \
  --data-binary @speech.wav
(III)Real time

Full pipeline over WebSocket

Connect to wss://api.loquora.space/ws and pass an API key as the session.init token. The existing STT → translation → TTS protocol is available without a user session.

If a key is revoked while connected, the session receives api_key_revoked and must be closed. Active keys are rechecked every minute.

{
  "type": "session.init",
  "payload": {
    "token": "lq_your_key",
    "sourceCode": "ru",
    "targetCode": "en"
  }
}
(IV)Errors

Predictable responses

401api_key_requiredThe request does not contain an API key.
401invalid_api_keyThe key is invalid, expired, or revoked.
403api_access_not_allowedThe organization does not have active API access.
429rate_limit_exceededThe 120 requests per minute limit was exceeded. Use the Retry-After header.
429usage_limit_reachedThe plan allowance and additional minute balance are exhausted.
Keep keys secret. Never embed an API key in browser code, public repositories, or mobile clients. Store it on your server and revoke it immediately if it may have been exposed.