Skip to main content
POST
Voice Clone
Important: Before using this endpoint, you must first generate a voice preview using the Voice Preview API. Use the preview audio file as voice_file and the original audio file as reference_audio_file when cloning the voice.

Authentication

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

Request

Content-Type: multipart/form-data (set automatically when using FormData/files)

Form Data

Notes

  • voice_file should be the audio file generated from the voice preview API
  • reference_audio_file should be the original audio file you used when generating the preview
  • text should match the text you used when generating the preview
  • The voice will be assigned a unique voice_id automatically upon creation

Response

Status Code: 200 OK Content-Type: application/json

Response Schema

Example Response

Error Responses

400 Bad Request
401 Unauthorized
500 Internal Server Error

Example Usage

JavaScript

Python

cURL

Voice Creation: After cloning a voice, you can use the returned voice_id in text-to-speech generation endpoints. The voice will be available immediately after successful creation.

Authorizations

x-api-key
string
header
required

API key for authentication

Body

multipart/form-data
voice_file
file
required

The generated preview audio file from the preview API

reference_audio_file
file
required

The original audio file used for the preview

text
string
required

The text used in preview generation

stability
number
required

Voice stability (0.0 to 1.0). Higher values produce more consistent output

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

Name for the cloned voice

model
string
required

Model identifier to use for voice cloning

description
string

Description of the voice

gender
string

Gender of the voice (e.g., 'male', 'female')

age
string

Age category of the voice (e.g., 'middle', 'elderly')

languages
string

Comma-separated list of language codes (e.g., 'ar,en')

dialects
string

Comma-separated list of dialects (e.g., 'najdi,hijazi')

avatar_url
string

URL to an avatar image for the voice (you can put your image URL here)

Response

Voice created successfully

id
string<uuid>
required

Unique identifier for the voice record

voice_id
string
required

Voice identifier used in API calls

name
string
required

Name of the cloned voice

languages
string[]
required

List of language codes supported by the voice

dialect
string[]
required

List of dialects supported by the voice

sample_url
string<uri>
required

URL to the sample audio file

stability
number
required

Voice stability value

description
string | null

Description of the voice

gender
string | null

Gender of the voice

age
string | null

Age category of the voice

type
string | null

Voice type

avatar_url
string<uri> | null

URL to the avatar image