TTS API

Crikk text-to-speech, hosted at https://audio.crikk.com

Authentication

All requests require a Bearer token in the Authorization header.

Authorization: Bearer YOUR_TOKEN

Endpoints

GET /api/voices List available voices

Query Parameters

ParameterTypeRequiredDescription
localestringNoFilter by locale, e.g. en-US
genderstringNoMale or Female

Request

GET /api/voices?locale=en-US&gender=Female
Authorization: Bearer YOUR_TOKEN

Response 200

[
  {
    "name": "en-US-AriaNeural",
    "friendlyName": "Aria (United States)",
    "locale": "en-US",
    "gender": "Female",
    "status": "GA",
    "contentCategories": ["General"],
    "voicePersonalities": ["Friendly"]
  }
]
POST /api/tts Submit a TTS job

Returns immediately with a job ID. Audio is generated asynchronously — poll /api/tts/:jobId for the result.

Request Body (JSON)

FieldTypeRequiredDefaultDescription
textstringYesText to synthesize. Max 12,000 characters.
voicestringNoen-US-AriaNeuralVoice name from /api/voices
ratestringNodefaultSpeaking rate, e.g. +10%, -20%
pitchstringNodefaultPitch, e.g. +5Hz, -10Hz
volumestringNodefaultVolume, e.g. +20%, -10%

Request

POST /api/tts
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json

{
  "text": "Hello, world!",
  "voice": "en-US-GuyNeural",
  "rate": "+10%"
}

Response 202

{
  "jobId": "a3f8c2e1d4b7..."
}

Error Responses

400 Missing or empty text field
400 Text exceeds 12,000 characters
401 Unauthorized
GET /api/tts/:jobId Get job status or download audio

Poll this endpoint after submitting a job. Once done, the audio file is returned directly and the job is deleted — it can only be retrieved once.

Processing 200

{
  "status": "processing"
}

Failed 500

{
  "status": "failed"
}

Done 200

Content-Type: audio/mpeg

<binary audio buffer>

Error Responses

404 Job not found

Example Flow

# 1. Submit job
POST https://audio.crikk.com/api/tts
  → 202 { "jobId": "abc123" }

# 2. Poll until done
GET  https://audio.crikk.com/api/tts/abc123
  → 200 { "status": "processing" }

GET  https://audio.crikk.com/api/tts/abc123
  → 200 { "status": "processing" }

# 3. Receive audio (job is deleted after this)
GET  https://audio.crikk.com/api/tts/abc123
  → 200 audio/mpeg <binary>

Jobs expire after 40 minutes regardless of retrieval status.