Speakr
Home

API Reference

The Speakr API lets you generate speech, transcribe audio, manage voices, and pull usage programmatically. Everything you can do in the dashboard is available via the API.

Authentication

All endpoints require a Bearer token. Get one at /keys.

Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Base URL: https://speakr.flexifunnels.com/api/v1

Generate speech

POST
/tts/generatescope: tts:generate
curl -X POST https://speakr.flexifunnels.com/api/v1/tts/generate \
  -H "Authorization: Bearer $SPEAKR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Hello from the Speakr API.",
    "voice_id": "uuid-of-your-voice",
    "emotion": "calm",
    "speed": 1.0,
    "cfg": 2.0,
    "inference_timesteps": 10
  }'

Returns audio_url (signed, 24h expiry), duration_s, and inference_ms.

Transcribe audio

POST
/transcribescope: (any scope)

Multipart form with an audio file:

curl -X POST https://speakr.flexifunnels.com/api/v1/transcribe \
  -H "Authorization: Bearer $SPEAKR_KEY" \
  -F "audio=@recording.wav" \
  -F "language=auto"

Or JSON with a URL:

curl -X POST https://speakr.flexifunnels.com/api/v1/transcribe \
  -H "Authorization: Bearer $SPEAKR_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "audio_url": "https://...", "language": "en" }'

Voices

GET
/voicesscope: voices:read

List voices. Query params: ?limit=20&kind=clone&status=ready

curl https://speakr.flexifunnels.com/api/v1/voices \
  -H "Authorization: Bearer $SPEAKR_KEY"
POST
/voicesscope: voices:write

Clone a voice from public URLs:

curl -X POST https://speakr.flexifunnels.com/api/v1/voices \
  -H "Authorization: Bearer $SPEAKR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My Voice",
    "language": "en",
    "reference_audio_url": "https://example.com/me.wav",
    "consent_audio_url":   "https://example.com/me-consent.wav"
  }'
POST
/voices/designscope: voices:write

Design a voice from text description:

curl -X POST https://speakr.flexifunnels.com/api/v1/voices/design \
  -H "Authorization: Bearer $SPEAKR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Aurora",
    "description": "Warm young woman with a soft British accent",
    "language": "en"
  }'
GET
/voices/{id}scope: voices:read
DELETE
/voices/{id}scope: voices:write

Generations history

GET
/generationsscope: generations:read

List recent generations. Query params: ?limit=50&status=succeeded&voice_id=...

curl https://speakr.flexifunnels.com/api/v1/generations \
  -H "Authorization: Bearer $SPEAKR_KEY"
GET
/generations/{id}scope: generations:read

Returns a fresh signed audio_url (1h expiry).

Account usage

GET
/usagescope: (any scope)
curl https://speakr.flexifunnels.com/api/v1/usage \
  -H "Authorization: Bearer $SPEAKR_KEY"

# Response:
{
  "plan": "creator",
  "subscription_status": "active",
  "audio":  { "seconds_used": 1200, "seconds_limit": 18000, "percent_used": 7 },
  "voices": { "used": 3, "limit": 50, "remaining": 47 }
}

Errors

All errors return a consistent shape:

{ "error": { "message": "Voice quota reached.", "code": "quota_exceeded" } }

Common codes: unauthorized, scope_required, quota_exceeded, not_found, voice_not_ready.

Scopes

When you create an API key, you can scope it down:

  • tts:generate — call /tts/generate
  • voices:read — list and fetch voices
  • voices:write — clone, design, delete voices
  • generations:read — list and fetch past generations

New keys default to all four scopes. /transcribe and /usage need any valid key.