API Reference

Voiceover API

Turn text into natural, studio-quality speech over a simple REST API. Submit text, pick a language and voice, and receive a ready-to-use audio file URL.

Base URL https://tts-api.sikasio.com Auth X-API-Key Formats WAV · MP3 Languages English · Arabic

1Authentication

Every request to /v1/* must include your secret key in the X-API-Key header (a Authorization: Bearer <key> fallback is also accepted). Keep the key server-side — never expose it in a browser or mobile client.

curl https://tts-api.sikasio.com/v1/voices \
  -H "X-API-Key: ttk_live_your_key_here"
Requests without a valid key return 401 invalid_key. Each key has its own rate + daily limits — see Limits.

2Quickstart

The fastest path: send text with ?wait=true and get the finished audio URL back in one call (blocks up to 120s).

curl -X POST "https://tts-api.sikasio.com/v1/speak?wait=true" \
  -H "X-API-Key: ttk_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"text":"Your brand, brought to life.","language":"en","gender":"female"}'

Response:

{
  "id": "c8db555a-…",
  "status": "done",
  "audio": {
    "url": "https://tts-api.sikasio.com/files/c8db555a-…wav",
    "durationSec": 4,
    "format": "wav"
  }
}

For longer text or batch jobs, omit wait to get a job id immediately (202) and poll it.

3Create speech

POST/v1/speak🔒 API key

Synthesizes speech from text. Returns 202 { id } immediately (async). Add ?wait=true to block until the audio is ready and receive the finished job.

Body parameters

FieldTypeDefaultDescription
text requiredstringThe text to speak. 1–5000 characters.
language optionalstringenSpoken language: en (English) or ar (Arabic).
gender optionalstringfemaleVoice gender: male or female.
format optionalstringwavAudio format: wav (24kHz PCM) or mp3.
rate optionalnumber1.0Speaking rate, 0.252.0. Lower is slower.
style optionalstringA short delivery hint, e.g. "warm and upbeat" (max 500 chars).

Query

waitSet true to block for the result (up to 120s) and return the settled job instead of 202.

Example

curl -X POST https://tts-api.sikasio.com/v1/speak \
  -H "X-API-Key: ttk_live_…" -H "Content-Type: application/json" \
  -d '{"text":"ابدأ رحلتك اليوم","language":"ar","gender":"male","format":"mp3"}'

→ 202 { "id": "7d09…", "status": "queued" }

4Poll a job

GET/v1/jobs/:id🔒 API key

Returns the current state of a job. A key can only read jobs it created; unknown or foreign ids return 404.

Lifecycle

statusmeaning
queuedAccepted, waiting for a worker.
runningSynthesizing.
doneFinished — audio is present.
failedCould not synthesize — see error.

Response (done)

{
  "id": "7d09…",
  "status": "done",
  "audio": { "url": "https://…/files/7d09…mp3", "durationSec": 4.7, "format": "mp3" }
}

Recommended polling: every 1–2s until status is done or failed.

5Voices

GET/v1/voices🔒 API key

Lists the available (language, gender) combinations. Voices are warm and natural, tuned for narration and marketing.

languagegendertonelocale
English (en)femalewarmen-US
English (en)malewarmen-US
Arabic (ar)femalewarmar-EG
Arabic (ar)malewarmar-EG

6Audio files

On success a job returns audio.url, a public link served from /files/<name> with unguessable filenames. Download it, or use it directly in a video/render pipeline.

propertyvalue
WAVLinear PCM, mono, 24 kHz, 16-bit — with a click-free fade-in and end padding.
MP3Compressed, smaller download.
durationSecMeasured length in seconds (rounded to 0.1). Useful for timing/sync.
CachingCache-Control: immutable, 7 days.
RetentionFiles are pruned after 7 days. Persist anything you need to keep.

7Errors

Errors return a JSON body { "error": { "code", "message" } } with the matching HTTP status.

HTTPcodewhen
400bad_requestMissing/invalid field (e.g. empty text, bad language).
400bad_jsonBody is not valid JSON.
401invalid_keyMissing or unrecognized API key.
404not_foundJob id doesn't exist or isn't yours; unknown endpoint.
413too_largeRequest body exceeds the size limit.
429rate_limitedPer-key rate or daily cap exceeded — retry after the window.
502failed / synth errorSynthesis failed (with ?wait=true).
503busyQueue is full — honor Retry-After and retry.

8Rate limits

Each API key has a requests-per-minute limit and a daily cap. Exceeding either returns 429. Jobs run with bounded concurrency, so a burst may briefly queue rather than fail. If you need higher limits, request a new key with a larger allowance.

endpointcounts toward limit?
POST /v1/speakYes — one unit per created job.
GET /v1/jobs/:id, GET /v1/voicesNo quota cost (subject to a basic IP floor).