> This page is for version v1 (default).
> For other versions, use one of these documentation indexes:
> - v1 (default): https://doc.youratlas.com/v1/llms.txt
> - v2: https://doc.youratlas.com/v2/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://doc.youratlas.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://doc.youratlas.com/_mcp/server.

# Clone voice

POST https://api.youratlas.com/v1/api/voices
Content-Type: multipart/form-data

Create a custom cloned voice from audio samples

Reference: https://doc.youratlas.com/api-reference/atlas-api/voices/clone-voice

## Authentication

- `api-key` header (required) — Your Atlas API key. Get it from the Atlas Portal under Settings > API Keys.

## Request

### Body (multipart/form-data)

This endpoint expects a multipart form with multiple files.

- `files` (files, required)
- `name` (string, required)
- `language` (string, required)
- `description` (string, optional)
- `gender` (enum, required)
- `provider` (enum, required)
- `removeBackgroundNoise` (boolean, optional)

## Response

### 200

Voice cloned

- `odata.etag` (string, optional)
- `PartitionKey` (string, optional)
- `RowKey` (string, optional)
- `Timestamp` (datetime, optional)
- `Name` (string, optional)
- `Description` (string, optional)
- `Gender` (string, optional)
- `Language` (string, optional)
- `Provider` (string, optional)
- `ProviderID` (string, optional)
- `PreviewUrl` (string, optional)
- `ProviderSettings` (string, optional) — JSON-encoded string, e.g. \{"Stability":0.5,"SimilarityBoost":0.75,"Model":"eleven\_monolingual\_v1"}

## Errors

### 400 Bad Request Error

Bad request

- `error` (ErrorError, optional)

### 401 Unauthorized Error

Invalid or missing API key

- `error` (ErrorError, optional)

### 500 Internal Server Error

Internal server error

- `error` (ErrorError, optional)

## Types

### ErrorError

- `message` (string, optional)
- `code` (string, optional)
- `requestId` (string, optional)

## Examples

**Request**

```json
{
  "files": [
    "<file: sample.mp3>"
  ],
  "gender": "female",
  "language": "en-US",
  "name": "Brand voice",
  "provider": "11labs"
}
```

**Response**

```json
{
  "odata.etag": "string",
  "PartitionKey": "string",
  "RowKey": "string",
  "Timestamp": "2024-01-15T09:30:00Z",
  "Name": "string",
  "Description": "string",
  "Gender": "string",
  "Language": "string",
  "Provider": "string",
  "ProviderID": "string",
  "PreviewUrl": "string",
  "ProviderSettings": "string"
}
```

**SDK Code**

```python Voices_cloneVoice_example
import requests

url = "https://api.youratlas.com/v1/api/voices"

files = { "files": "open('sample.mp3', 'rb')" }
payload = {
    "description": ,
    "gender": "female",
    "language": "en-US",
    "name": "Brand voice",
    "provider": "11labs",
    "removeBackgroundNoise": 
}
headers = {"api-key": "<apiKey>"}

response = requests.post(url, data=payload, files=files, headers=headers)

print(response.json())
```

```javascript Voices_cloneVoice_example
const url = 'https://api.youratlas.com/v1/api/voices';
const form = new FormData();
form.append('description', '');
form.append('files', 'sample.mp3');
form.append('gender', 'female');
form.append('language', 'en-US');
form.append('name', 'Brand voice');
form.append('provider', '11labs');
form.append('removeBackgroundNoise', '');

const options = {method: 'POST', headers: {'api-key': '<apiKey>'}};

options.body = form;

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Voices_cloneVoice_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.youratlas.com/v1/api/voices"

	payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"; filename=\"sample.mp3\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"gender\"\r\n\r\nfemale\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"language\"\r\n\r\nen-US\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nBrand voice\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"provider\"\r\n\r\n11labs\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"removeBackgroundNoise\"\r\n\r\n\r\n-----011000010111000001101001--\r\n")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("api-key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Voices_cloneVoice_example
require 'uri'
require 'net/http'

url = URI("https://api.youratlas.com/v1/api/voices")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["api-key"] = '<apiKey>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"; filename=\"sample.mp3\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"gender\"\r\n\r\nfemale\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"language\"\r\n\r\nen-US\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nBrand voice\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"provider\"\r\n\r\n11labs\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"removeBackgroundNoise\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"

response = http.request(request)
puts response.read_body
```

```java Voices_cloneVoice_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.youratlas.com/v1/api/voices")
  .header("api-key", "<apiKey>")
  .body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"; filename=\"sample.mp3\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"gender\"\r\n\r\nfemale\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"language\"\r\n\r\nen-US\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nBrand voice\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"provider\"\r\n\r\n11labs\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"removeBackgroundNoise\"\r\n\r\n\r\n-----011000010111000001101001--\r\n")
  .asString();
```

```php Voices_cloneVoice_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.youratlas.com/v1/api/voices', [
  'multipart' => [
    [
        'name' => 'files',
        'filename' => 'sample.mp3',
        'contents' => null
    ],
    [
        'name' => 'gender',
        'contents' => 'female'
    ],
    [
        'name' => 'language',
        'contents' => 'en-US'
    ],
    [
        'name' => 'name',
        'contents' => 'Brand voice'
    ],
    [
        'name' => 'provider',
        'contents' => '11labs'
    ]
  ]
  'headers' => [
    'api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Voices_cloneVoice_example
using RestSharp;

var client = new RestClient("https://api.youratlas.com/v1/api/voices");
var request = new RestRequest(Method.POST);
request.AddHeader("api-key", "<apiKey>");
request.AddParameter("undefined", "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"; filename=\"sample.mp3\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"gender\"\r\n\r\nfemale\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"language\"\r\n\r\nen-US\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nBrand voice\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"provider\"\r\n\r\n11labs\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"removeBackgroundNoise\"\r\n\r\n\r\n-----011000010111000001101001--\r\n", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Voices_cloneVoice_example
import Foundation

let headers = ["api-key": "<apiKey>"]
let parameters = [
  [
    "name": "description",
    "value": 
  ],
  [
    "name": "files",
    "fileName": "sample.mp3"
  ],
  [
    "name": "gender",
    "value": "female"
  ],
  [
    "name": "language",
    "value": "en-US"
  ],
  [
    "name": "name",
    "value": "Brand voice"
  ],
  [
    "name": "provider",
    "value": "11labs"
  ],
  [
    "name": "removeBackgroundNoise",
    "value": 
  ]
]

let boundary = "---011000010111000001101001"

var body = ""
var error: NSError? = nil
for param in parameters {
  let paramName = param["name"]!
  body += "--\(boundary)\r\n"
  body += "Content-Disposition:form-data; name=\"\(paramName)\""
  if let filename = param["fileName"] {
    let contentType = param["content-type"]!
    let fileContent = String(contentsOfFile: filename, encoding: String.Encoding.utf8)
    if (error != nil) {
      print(error as Any)
    }
    body += "; filename=\"\(filename)\"\r\n"
    body += "Content-Type: \(contentType)\r\n\r\n"
    body += fileContent
  } else if let paramValue = param["value"] {
    body += "\r\n\r\n\(paramValue)"
  }
}

let request = NSMutableURLRequest(url: NSURL(string: "https://api.youratlas.com/v1/api/voices")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```