---
title: "Create a custom XTTS voice and reserve latent upload URLs"
method: POST
path: "/v1/models/custom"
tags: ["models"]
---

# Create a custom XTTS voice and reserve latent upload URLs

`POST /v1/models/custom`

## Request

- Base URL: `https://api.ditto.audio` (the document declares no server; this is the origin it was published from)
- URL: `https://api.ditto.audio/v1/models/custom`
- Auth: HTTP bearer

## Request body

- CreateCustomVoiceDto
  - `name` string, required
  - `engine` 'piper' | 'xtts' | 'kokoro' | 'pocket' | 'rvc' | 'system' | 'morpho': xtts (default) or rvc. RVC voices persist model.onnx + model.pth.
  - `sourceHash` string: sha-256 of the source model.pth (for an in-browser pth→onnx voice). Stored so a future client can skip re-converting via GET /models/custom/by-source/:hash.
  - `baseSlug` string: base XTTS voice to overlay (omit for a full self-contained bundle)
  - `files` CustomVoiceFileDto[]: the files to upload (full-bundle mode)
    - `fileName` string, required
    - `role` 'model' | 'config' | 'vocab' | 'speakers' | 'index' | 'sample' | 'archive' | 'other'
    - `contentHash` string, required: sha-256 of the file — drives dedup (skip re-upload if present)
    - `sizeBytes` number
  - `language` string
  - `sampleRate` number

## Response `201`

---

[API](https://skmtc.dev/ditto/apis/ditto-audio-api.md) · [All operations](https://skmtc.dev/ditto/apis/ditto-audio-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ditto/apis/ditto-audio-api/revisions/30c8d7c218da?raw)
