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
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).
Every request must include the key as a Bearer token in the Authorization header:
Authorization: Bearer gt_live_…
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"]
}
| Endpoint | What it does |
|---|---|
POST /api/v1/translate | Text translation between any two languages. Auto-detects source if not given. |
POST /api/v1/tts | Text-to-speech. Returns base64 MP3/WAV/OGG audio. Google or Piper voices. |
POST /api/v1/tts/play-room | Synthesize text and play it directly into a live conference room. |
POST /api/v1/asr | Speech-to-text. Multipart upload (any audio format) or inline base64. Diarized. |
POST /api/v1/calls | Originate an outbound SIP call. Returns a Job-UUID for tracking. |
GET /api/v1/calls | List active channels. |
GET /api/v1/calls/{uuid} | Inspect a single call's state. |
POST /api/v1/calls/{uuid}/hangup | Hang up an active call. |
GET /api/v1/conferences | List active conference rooms. |
POST /api/v1/conferences/{room}/say | TTS-say text into a conference. |
POST /api/v1/conferences/{room}/dial | Add another leg to an active conference. |
POST /api/v1/nlm/complete | Chat completion (Surfiai NLM). Optional context for live-call operator suggestions. |
POST /api/v1/nlm/summarize | Summarize a call transcript. |
POST /api/v1/nlm/extract | Pull structured fields (caller name, callback number, reason) out of a transcript. |
POST /api/v1/nlm/intent | Classify caller intent against a list of candidate labels. |
GET /api/v1/health | Combined gateway + downstream health probe. No auth. |
POST /api/v1/translate
{ "text": "Bonjour, je m'appelle Marc", "source": "fr", "target": "en" }
POST /api/v1/tts
{
"text": "Veuillez patienter, je vous mets en relation.",
"lang_code": "fr-CA",
"voice": "fr-CA-Standard-A",
"format": "MP3"
}
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"
POST /api/v1/calls
{
"gateway": "didlogic",
"destination_number": "15551234567",
"from": "+18883163088",
"extension": "galaxytranslate_auto_4200"
}
| HTTP | What it means |
|---|---|
200 | Success. Body always has "ok": true for our endpoints. |
400 | Bad request. Read message for the field that's wrong. |
401 | Missing, invalid, or revoked API key. |
404 | Resource not found (e.g. unknown call UUID). |
500 | Something broke on our side. Check /api/status and retry. |
502 | An upstream provider (Google, Surfiai) failed. Usually transient — retry once. |
503 | Feature temporarily unavailable (e.g. NLM not configured). |
Error responses look like:
{ "error": "bad_request", "message": "`text` required" }
Swagger UI — every endpoint with a "Try it" button.
Machine-readable JSON. Generate SDKs with openapi-generator.
Live health of the gateway + downstream providers.
Live channel + conference + request-rate view.
Questions, integration help, key rotation, billing — email support@galaxytranslate.com or hit your account manager directly.