POST
/
v1
/
t2a
curl --request POST \
  --url https://geoff.ai/api/v1/t2a \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "text": "Hello, welcome to Geoff AI.",
    "voice_id": "default",
    "format": "mp3",
    "sample_rate": 44100
  }' \
  --output speech.mp3
{
  "data": {
    "audio": "hex-encoded audio data",
    "status": 2
  },
  "trace_id": "04ede0ab069fb1ba8be5156a24b1e081",
  "extra_info": {
    "audio_duration": 3200,
    "audio_sample_rate": 44100,
    "audio_channel": 1,
    "bitrate": 128000,
    "audio_size": 51200
  }
}

Authorization

Authorization
string
required
Bearer token. Bearer API_key, can be found in Settings > API Keys.

Request Body

text
string
required
The text to convert to speech.
voice_id
string
Voice identifier to use. Default: default.
speed
number
Speech speed multiplier. Range: 0.5 to 2.0. Default: 1.0.
format
string
Output audio format. Options: mp3, wav, ogg. Default: mp3.
sample_rate
integer
Audio sample rate in Hz. Default: 44100.
curl --request POST \
  --url https://geoff.ai/api/v1/t2a \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "text": "Hello, welcome to Geoff AI.",
    "voice_id": "default",
    "format": "mp3",
    "sample_rate": 44100
  }' \
  --output speech.mp3
{
  "data": {
    "audio": "hex-encoded audio data",
    "status": 2
  },
  "trace_id": "04ede0ab069fb1ba8be5156a24b1e081",
  "extra_info": {
    "audio_duration": 3200,
    "audio_sample_rate": 44100,
    "audio_channel": 1,
    "bitrate": 128000,
    "audio_size": 51200
  }
}