---
title: "Upload a voice sample"
method: POST
path: "/voice"
tags: ["Voice"]
---

# Upload a voice sample

`POST /voice`

Upload a voice sample to create a new voice prompt in the voice bank. The audio data must be base64-encoded. Maximum file size is 20 MB.

## Headers

- `x-api-key` string, required

## Request body

- ModelVoiceBankAPIRequest — Request to upload a voice sample and create a voice prompt
  - `filename` string, required — Name of the audio file being uploaded
  - `data` string, required — Base64-encoded audio data
  - `title` string — Title for the voice prompt
  - `text` string — Transcript of the spoken text in the audio sample
  - `locale` string — Language locale code of the voice sample
  - `gender` 'MALE' | 'FEMALE' | 'NON_BINARY' — Gender of the speaker
  - `age` integer — Age of the speaker
  - `speaking_style` string — Speaking style descriptor
  - `speaker_id` string — Optional external speaker identifier
  - `publish` boolean — Whether to make the voice prompt publicly available

## Response `200`

Voice prompt created successfully

- object
  - `response` ModelVoiceBankAPIResponse — Response after creating or deleting a voice prompt
    - `voice_prompt_id` string — Unique identifier of the created/affected voice prompt

## Other responses

- `400` — Bad request — invalid audio data, missing fields, or file exceeds 20 MB limit
- `401` — Unauthorized — invalid or missing API key
- `403` — Forbidden — voice prompt limit reached for your account
- `500` — Internal server error

---

[API](https://skmtc.net/deepdub-ai/apis/deepdub-api.md) · [All operations](https://skmtc.net/deepdub-ai/apis/deepdub-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/deepdub-ai/deepdub-api/versions/f9c545698573/schema)
