curl --request POST \
--url https://api.withhopper.com/voices/clone \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file' \
--form 'name=<string>' \
--form 'language=<string>' \
--form mode=similarity \
--form 'transcript=<string>' \
--form model_id=omnivoice \
--form 'profile_version=<string>'import requests
url = "https://api.withhopper.com/voices/clone"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = {
"name": "<string>",
"language": "<string>",
"mode": "similarity",
"transcript": "<string>",
"model_id": "omnivoice",
"profile_version": "<string>"
}
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('name', '<string>');
form.append('language', '<string>');
form.append('mode', 'similarity');
form.append('transcript', '<string>');
form.append('model_id', 'omnivoice');
form.append('profile_version', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.withhopper.com/voices/clone', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.withhopper.com/voices/clone",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"language\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mode\"\r\n\r\nsimilarity\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"transcript\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model_id\"\r\n\r\nomnivoice\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"profile_version\"\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.withhopper.com/voices/clone"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"language\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mode\"\r\n\r\nsimilarity\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"transcript\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model_id\"\r\n\r\nomnivoice\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"profile_version\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.withhopper.com/voices/clone")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"language\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mode\"\r\n\r\nsimilarity\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"transcript\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model_id\"\r\n\r\nomnivoice\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"profile_version\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withhopper.com/voices/clone")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"language\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mode\"\r\n\r\nsimilarity\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"transcript\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model_id\"\r\n\r\nomnivoice\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"profile_version\"\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"language": "<string>",
"gender": "<string>",
"tags": [
"<string>"
],
"featured": true,
"parent_voice_id": "<string>",
"source_audio_blob_id": "<string>",
"source_transcript": "<string>",
"source_metadata": {},
"source_version": "<string>",
"profiles": [
{
"model_id": "<string>",
"upstream_id": "<string>",
"profile_version": "<string>",
"source_version": "<string>",
"cached_at": "<string>",
"expires_at": "<string>"
}
],
"model_family": "<string>",
"sample_blob_id": "<string>",
"is_owner": true,
"saved": true,
"created_at": "<string>"
}{
"job_id": "<string>",
"voice_id": "<string>",
"status": "queued"
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "Incorrect API key provided. Check your key at https://withhopper.com/dashboard.",
"type": "invalid_request_error",
"code": "invalid_api_key",
"param": null
}
}{
"error": {
"message": "You have run out of credits. Contact us to add more.",
"type": "insufficient_quota",
"code": "insufficient_quota",
"param": null
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "Rate limit reached: 600 requests per minute per key. Retry after 21s.",
"type": "rate_limit_error",
"code": "rate_limit_exceeded",
"param": null
}
}Clone voice (instant)
Creates a voice from one audio clip of at least 10 s. Send the clip as multipart, or reference an already-uploaded blob as JSON. Exactly one clip is required. Caps: 25 MB per blob, 250 MB per org. If the clone-capable upstream is online the voice returns synchronously (201); otherwise a job is queued (202) — poll GET /jobs/:id.
curl --request POST \
--url https://api.withhopper.com/voices/clone \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file' \
--form 'name=<string>' \
--form 'language=<string>' \
--form mode=similarity \
--form 'transcript=<string>' \
--form model_id=omnivoice \
--form 'profile_version=<string>'import requests
url = "https://api.withhopper.com/voices/clone"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = {
"name": "<string>",
"language": "<string>",
"mode": "similarity",
"transcript": "<string>",
"model_id": "omnivoice",
"profile_version": "<string>"
}
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('name', '<string>');
form.append('language', '<string>');
form.append('mode', 'similarity');
form.append('transcript', '<string>');
form.append('model_id', 'omnivoice');
form.append('profile_version', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.withhopper.com/voices/clone', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.withhopper.com/voices/clone",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"language\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mode\"\r\n\r\nsimilarity\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"transcript\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model_id\"\r\n\r\nomnivoice\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"profile_version\"\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.withhopper.com/voices/clone"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"language\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mode\"\r\n\r\nsimilarity\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"transcript\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model_id\"\r\n\r\nomnivoice\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"profile_version\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.withhopper.com/voices/clone")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"language\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mode\"\r\n\r\nsimilarity\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"transcript\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model_id\"\r\n\r\nomnivoice\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"profile_version\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withhopper.com/voices/clone")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"language\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mode\"\r\n\r\nsimilarity\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"transcript\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"model_id\"\r\n\r\nomnivoice\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"profile_version\"\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"language": "<string>",
"gender": "<string>",
"tags": [
"<string>"
],
"featured": true,
"parent_voice_id": "<string>",
"source_audio_blob_id": "<string>",
"source_transcript": "<string>",
"source_metadata": {},
"source_version": "<string>",
"profiles": [
{
"model_id": "<string>",
"upstream_id": "<string>",
"profile_version": "<string>",
"source_version": "<string>",
"cached_at": "<string>",
"expires_at": "<string>"
}
],
"model_family": "<string>",
"sample_blob_id": "<string>",
"is_owner": true,
"saved": true,
"created_at": "<string>"
}{
"job_id": "<string>",
"voice_id": "<string>",
"status": "queued"
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "Incorrect API key provided. Check your key at https://withhopper.com/dashboard.",
"type": "invalid_request_error",
"code": "invalid_api_key",
"param": null
}
}{
"error": {
"message": "You have run out of credits. Contact us to add more.",
"type": "insufficient_quota",
"code": "insufficient_quota",
"param": null
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "Rate limit reached: 600 requests per minute per key. Retry after 21s.",
"type": "rate_limit_error",
"code": "rate_limit_exceeded",
"param": null
}
}Authorizations
API key in the Authorization header: Bearer sk_hopper_... Keys are minted in the dashboard at withhopper.com/console/keys and shown once at creation. WebSocket connections also accept ?api_key=.
Body
One audio clip, at least 10 s. Max 25 MB.
Name for the new voice.
similarity tracks the source speaker more closely; stability trades likeness for consistency.
stability, similarity Transcript of the clip.
20000Response
Cloned synchronously.
library, instant_clone, pro_clone, localized Show child attributes
Show child attributes
True when your org owns the voice.