Skip to main content
POST
Voice Preview

Authentication

Requires API key authentication via x-api-key header.

Request

Content-Type: multipart/form-data

Form Data

Notes

  • The API will process the provided audio file to generate the voice preview
  • text must be at least 3 words and 10 characters long

Response

Status Code: 200 OK Headers:
  • Content-Type: audio/raw;codec=pcm16;rate=24000;channels=1
  • Cache-Control: no-cache
  • Connection: keep-alive
Body: Streaming PCM16 audio (24000 Hz, Mono, 16-bit)

Error Responses

400 Bad Request
401 Unauthorized
402 Payment Required
500 Internal Server Error

Example Usage

JavaScript

Python

cURL

Voice Preview: This endpoint generates a preview of a cloned voice. If you’re satisfied with the preview, you can proceed to create it as a permanent voice using the voice creation endpoint.

Authorizations

x-api-key
string
header
required

API key for authentication

Body

multipart/form-data
text
string
required

Text to generate preview with (minimum 3 words, 10 characters)

similarity
number
required

Voice similarity to source (0.0 to 1.0). Higher values produce more similar voice

Required range: 0 <= x <= 1
model_id
string
required

The model identifier to use for generation

file
file
required

Audio file containing the voice to preview

speed
number
default:1

Speech speed (0.7 to 1.2, default 1.0)

Required range: 0.7 <= x <= 1.2

Response

Streaming PCM16 audio preview

PCM16 audio stream (24000 Hz, Mono, 16-bit)