GalaxyTranslate API v1

Real-time call translation, TTS, ASR, conferencing, and natural language — over a single REST surface.

This page is a 5-minute getting-started guide. For the full interactive reference (every endpoint, every parameter, every response — with a "Try it" button), open the Swagger UI.

Open Swagger UI → OpenAPI spec (JSON) Live status

1. Get your API key

Your account manager issues you a key from the GalaxyTranslate WordPress admin (one key per company). Keys look like:

gt_live_84b0f6b5a85ab8ce5cadfe1a6cc179e1

Treat it like a password — anyone with the key can make billable calls on your account. If it leaks, contact us and we'll rotate it (no downtime — old key is revoked, you get a fresh one).

2. Authentication

Every request must include the key as a Bearer token in the Authorization header:

Authorization: Bearer gt_live_…

3. Your first request

curl -sS -X POST https://api.galaxytranslate.com/api/v1/translate \
  -H "Authorization: Bearer gt_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"Hello world","target":"fr"}'
import requests

API_KEY = "gt_live_YOUR_KEY"
r = requests.post(
    "https://api.galaxytranslate.com/api/v1/translate",
    headers={"Authorization": f"Bearer {API_KEY}"},
    json={"text": "Hello world", "target": "fr"},
    timeout=10,
)
print(r.json())   # {'ok': True, 'source': 'en', 'target': 'fr', 'translations': ['Bonjour le monde']}
const fetch = require('node-fetch');

const API_KEY = 'gt_live_YOUR_KEY';
const r = await fetch('https://api.galaxytranslate.com/api/v1/translate', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${API_KEY}`,
    'Content-Type':  'application/json',
  },
  body: JSON.stringify({ text: 'Hello world', target: 'fr' }),
});
console.log(await r.json());
$ch = curl_init('https://api.galaxytranslate.com/api/v1/translate');
curl_setopt_array($ch, [
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_POST           => true,
  CURLOPT_HTTPHEADER     => [
    'Authorization: Bearer gt_live_YOUR_KEY',
    'Content-Type: application/json',
  ],
  CURLOPT_POSTFIELDS     => json_encode(['text' => 'Hello world', 'target' => 'fr']),
]);
$resp = curl_exec($ch);
echo $resp;

Expected response:

{
  "ok": true,
  "source": "en",
  "target": "fr",
  "translations": ["Bonjour le monde"]
}

4. What you can do

EndpointWhat it does
POST /api/v1/translateText translation between any two languages. Auto-detects source if not given.
POST /api/v1/ttsText-to-speech. Returns base64 MP3/WAV/OGG audio. Google or Piper voices.
POST /api/v1/tts/play-roomSynthesize text and play it directly into a live conference room.
POST /api/v1/asrSpeech-to-text. Multipart upload (any audio format) or inline base64. Diarized.
POST /api/v1/callsOriginate an outbound SIP call. Returns a Job-UUID for tracking.
GET  /api/v1/callsList active channels.
GET  /api/v1/calls/{uuid}Inspect a single call's state.
POST /api/v1/calls/{uuid}/hangupHang up an active call.
GET  /api/v1/conferencesList active conference rooms.
POST /api/v1/conferences/{room}/sayTTS-say text into a conference.
POST /api/v1/conferences/{room}/dialAdd another leg to an active conference.
POST /api/v1/nlm/completeChat completion (Surfiai NLM). Optional context for live-call operator suggestions.
POST /api/v1/nlm/summarizeSummarize a call transcript.
POST /api/v1/nlm/extractPull structured fields (caller name, callback number, reason) out of a transcript.
POST /api/v1/nlm/intentClassify caller intent against a list of candidate labels.
GET  /api/v1/healthCombined gateway + downstream health probe. No auth.

5. Common patterns

Translate a transcript chunk

POST /api/v1/translate
{ "text": "Bonjour, je m'appelle Marc", "source": "fr", "target": "en" }

Synthesize French Canadian speech

POST /api/v1/tts
{
  "text": "Veuillez patienter, je vous mets en relation.",
  "lang_code": "fr-CA",
  "voice": "fr-CA-Standard-A",
  "format": "MP3"
}

Transcribe an uploaded audio file

curl -X POST https://api.galaxytranslate.com/api/v1/asr \
  -H "Authorization: Bearer gt_live_YOUR_KEY" \
  -F "audio=@call.m4a" \
  -F "lang_code=en-US" \
  -F "diarize=true"

Originate a call into a translation conference

POST /api/v1/calls
{
  "gateway":            "didlogic",
  "destination_number": "15551234567",
  "from":               "+18883163088",
  "extension":          "galaxytranslate_auto_4200"
}

6. Errors

HTTPWhat it means
200Success. Body always has "ok": true for our endpoints.
400Bad request. Read message for the field that's wrong.
401Missing, invalid, or revoked API key.
404Resource not found (e.g. unknown call UUID).
500Something broke on our side. Check /api/status and retry.
502An upstream provider (Google, Surfiai) failed. Usually transient — retry once.
503Feature temporarily unavailable (e.g. NLM not configured).

Error responses look like:

{ "error": "bad_request", "message": "`text` required" }

7. Useful URLs

Interactive API reference

Swagger UI — every endpoint with a "Try it" button.

OpenAPI spec

Machine-readable JSON. Generate SDKs with openapi-generator.

Status page

Live health of the gateway + downstream providers.

Monitoring dashboard

Live channel + conference + request-rate view.

8. Support

Questions, integration help, key rotation, billing — email support@galaxytranslate.com or hit your account manager directly.