Skip to main content
The Nexus Voice Generation endpoints convert written text into natural-sounding speech and let you create custom cloned voices from audio samples. You submit your text content along with optional parameters to select the voice, output language, and speaking speed. Nexus AI processes your request and returns a URL to an MP3 audio file hosted on the Verbosec CDN, ready to download or stream. This page covers the following endpoints:
  • POST /voice/synthesize — Convert text to speech
  • POST /voice/clone — Clone a voice from an audio sample

Synthesize speech

Endpoint
POST https://api.verbosec.com/v1/voice/synthesize

Request parameters

text
string
required
The text you want to convert to speech. There is no strict character limit, but longer inputs take more time to process and consume more of your plan’s quota.
voice_id
string
The identifier of the voice to use for synthesis. If omitted, the API uses the default voice for the specified language.
language
string
The BCP-47 language code for the output speech — for example, "en", "fr", or "de". Defaults to "en". The voice you select must support the language you specify.
speed
float
A multiplier that controls how fast the speech is delivered. Accepts a value between 0.5 (half speed) and 2.0 (double speed). Defaults to 1.0 (normal speed).

Example request

synthesize-voice.sh
curl -X POST https://api.verbosec.com/v1/voice/synthesize \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Welcome to Verbosec. Your AI-powered content platform.",
    "voice_id": "voice_en_clara",
    "language": "en",
    "speed": 1.1
  }'

Example response

response.json
{
  "id": "voice_def456",
  "audio_url": "https://cdn.verbosec.com/audio/voice_def456.mp3",
  "duration_seconds": 12.4,
  "created_at": "2025-01-15T10:32:00Z"
}

Response fields

id
string
A unique identifier for this voice synthesis request.
audio_url
string
The CDN URL for the generated MP3 audio file. Use this URL to download or stream the audio in your application.
duration_seconds
float
The total playback duration of the generated audio file, in seconds.
created_at
string
An ISO 8601 timestamp indicating when the audio file was generated.
Audio files are available for 24 hours after generation. Download and store them in your own storage if you need long-term access.

Clone a voice

Create a custom cloned voice from an audio sample. Once cloned, the voice receives a unique voice_id that you can pass to POST /voice/synthesize to generate speech in that voice. Endpoint
POST https://api.verbosec.com/v1/voice/clone

Request parameters

name
string
required
A display name for the cloned voice — for example, "My Brand Voice". Used to identify the voice in your account.
sample_url
string
required
A publicly accessible URL pointing to an audio file (MP3 or WAV) to use as the voice sample. For best results, provide a clean recording of at least 30 seconds with minimal background noise.

Example request

clone-voice.sh
curl -X POST https://api.verbosec.com/v1/voice/clone \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My Brand Voice",
    "sample_url": "https://example.com/samples/brand-voice.mp3"
  }'

Example response

clone-response.json
{
  "voice_id": "voice_clone_uvw890",
  "name": "My Brand Voice",
  "status": "processing",
  "created_at": "2025-01-15T10:34:00Z"
}

Response fields

voice_id
string
The unique identifier for the cloned voice. Pass this value as voice_id in a POST /voice/synthesize request to use this voice for speech synthesis.
name
string
The display name you assigned to the cloned voice.
status
string
The processing status of the clone. The voice becomes available for synthesis once the status is "ready". Possible values are "processing" and "ready".
created_at
string
An ISO 8601 timestamp indicating when the cloning request was submitted.
Poll the status field or wait a few minutes after submitting a clone request before attempting synthesis. Voice cloning typically completes within two to five minutes depending on the length of the sample.

Error responses

Returned when the text field is missing from a synthesize request, the speed value is outside the accepted range, or a required field is absent from a clone request.
400-response.json
{
  "error": {
    "code": "invalid_parameter",
    "message": "The 'speed' parameter must be between 0.5 and 2.0."
  }
}
Returned when your API key is missing or invalid. See the Authentication guide for help.
401-response.json
{
  "error": {
    "code": "unauthorized",
    "message": "Invalid or missing API key."
  }
}
Returned when you have exceeded your plan’s rate limit. Wait the number of seconds indicated in the Retry-After header before retrying.
429-response.json
{
  "error": {
    "code": "rate_limit_exceeded",
    "message": "You have exceeded your plan's rate limit. Please wait before retrying."
  }
}