> ## Documentation Index
> Fetch the complete documentation index at: https://wiz-myvocal.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a TTS voice

> Clone a custom Text to Speech voice from your recordings. The voiceId is returned in the response.

<sub>**Voice cloning** · Workflow: [How to use voices](https://wiz-myvocal.mintlify.site/guides/voice-quickstart.md)</sub>

> [!NOTE]
>
> The interactive playground on this page cannot send file uploads. This is a limitation of the documentation playground, not of the API. Send the `multipart/form-data` request to `https://api.myvocal.ai/sound_clone/api/v1/voices/tts` from your own code or an HTTP tool, as in the request example.

### Header

**accessKey** `string` *required*

Your API key. See [Authentication](https://wiz-myvocal.mintlify.site/api-reference/authentication.md).

### Body

**name** `string` *required*

Please do not exceed 32 characters in length.

**files** `Files` *required*

Please provide mp3/wav/m4a files. A single file cannot exceed 10MB, and up to 25 files can be uploaded.

### Response

**code** `number`

Indicates whether the call was successful. 1 if successful.

**message** `string`

When an exception occurs, specific exception information will be provided in the message.

**data** `object`

Includes specific data.

**Toggle object**

**id** `string`

When you need to use TTS or other features, voiceId needs to be provided.

```bash Example Request theme={null}
curl --location 'https://api.myvocal.ai/sound_clone/api/v1/voices/tts' \
--header 'accessKey: xxx' \
--form 'files=@"xxx/xxx.mp3"' \
--form 'name="111"'
```

```json 200（success） theme={null}
{
    "code": 1,
    "message": "Success",
    "data": {
        "id": "7812"
    }
}
```

```json 200（fail） theme={null}
{
  "code": -1,
  "message": "error msg",
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.