← SpineAI

Local voices for your app

The administrator issues a separate, revocable key under Settings → TTS API access. Each key permits selected voices only. It cannot read chats, use the language model, transcribe audio or manage users.

Call from your backend

Keep the key in an environment variable on your server. Never embed it in frontend JavaScript, a mobile app or a public repository. Browser cross-origin calls are deliberately unsupported.

curl https://spineai.urbanstudioz.com/tts-api/v1/speech 
  -H "Authorization: Bearer $SPINEAI_TTS_KEY" 
  -H "Content-Type: application/json" 
  --data '{"text":"Akpe","language":"ewe"}' 
  --output reply.wav

Join the command lines with your shell's continuation character, or paste them as one line. Successful responses contain audio/wav. Check the HTTP status before treating the response as audio. Errors are JSON.

const response = await fetch(
  'https://spineai.urbanstudioz.com/tts-api/v1/speech', {
    method: 'POST',
    headers: {
      Authorization: `Bearer ${process.env.SPINEAI_TTS_KEY}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({text: 'Akpe', language: 'ewe'})
  });
if (!response.ok) throw new Error(await response.text());
const wav = Buffer.from(await response.arrayBuffer());
// Return wav to your application's user with Content-Type: audio/wav.

GET /tts-api/v1/voices, with the same Bearer key, returns that key's permitted voices, model credit links and limits. Do not send the private home-server gateway key.

Available modules and attribution

These installed voices require non-commercial use. Educational branding alone does not establish permitted use. Commercial, paid or ad-supported use needs appropriate rights or replacement models. Preserve attribution and applicable license notices; review the linked model terms. This API does not grant additional rights.

Limits and operation

1,500 characters per request; 5 requests per minute per key; an admin-set daily request limit (1–500). Daily quotas reset at midnight UTC. Keys expire after 1–90 days. Accepted synthesis attempts consume quota even if the voice later fails. Usage records contain counters and timestamps, not submitted speech text. Audio is returned directly without being saved by this API.

401: missing, expired or revoked key. 403: voice not permitted. 400/415: invalid input. 422: text cannot be spoken by that voice. 429: quota reached or voice busy. 502/503: home server unavailable. Back off on busy responses; don't retry in a tight loop. The home server must be powered on and connected, and concurrent speech requests share its capacity.

Pronunciation remains model-dependent. Have a fluent speaker review educational recordings, especially number and alphabet lessons, before publishing them.