API Documentation

Build with Royedhill TTS

Authentication

All API requests require an API key. Include it in the Authorization header:

Authorization: Bearer sk_royedhill_xxx

Endpoints

POST /api/v1/tts/generate

Generate speech from text.

Request Body

{
  "text": "Hello world",
  "voice_id": "EXAVITQu4vr4xnSDxMaL",
  "speed": 1.0
}

Response

{
  "success": true,
  "audio_url": "https://storage.url/audio.mp3",
  "characters_used": 150,
  "character_limit": 10000
}

Example

curl -X POST https://tts.royedhill.com/api/v1/tts/generate \
  -H "Authorization: Bearer sk_royedhill_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Hello world",
    "voice_id": "EXAVITQu4vr4xnSDxMaL"
  }'

GET /api/v1/tts/voices

Get available voices for text-to-speech.

Response

{
  "voices": [
    {
      "voice_id": "EXAVITQu4vr4xnSDxMaL",
      "name": "Sarah",
      "category": "premade",
      "provider": "elevenlabs"
    }
  ]
}

Rate Limits

Free: 2,500 characters/month

Starter: 10,000 characters/month

Creator: 100,000 characters/month

Pro: 500,000 characters/month

Enterprise: Unlimited

Error Handling

401 Unauthorized

Invalid or missing API key

429 Too Many Requests

Rate limit exceeded

403 Forbidden

Character limit exceeded

SDKs & Libraries

Coming soon: Official SDKs for popular languages.

JavaScript/TypeScriptPythonGoRuby