Delete Voice API
Remove unused custom voices in the current API key's organization using a project-scoped API key and immediately free organization voice slots. This endpoint deletes custom voices created through the Voice Cloning API, the Voice Design API, or the console.
Use cases
Quick start
Set your API base URL and API key first. If you do not have a key, see Get your API key.
This endpoint uses the X-API-Key request header and requires Voice Cloning to be enabled for the project along with active organization access for the key’s member. To look up custom voices visible in the API key's organization, call the List Voices API with source=personal.
export VUILABS_API_BASE_URL="https://api.vuilabs.ai"
export VUILABS_API_KEY="your-api-key"
Replace my_support_voice with the custom voice_id you want to remove and call DELETE /v1/voice/{voice_id}:
curl --request DELETE \
--url "$VUILABS_API_BASE_URL/v1/voice/my_support_voice" \
--header "X-API-Key: $VUILABS_API_KEY"
- Immediate slot release: When deletion succeeds, the organization’s used voice slots decrease immediately and the voice is removed from the List Voices API (
source=personal). If the voice was published, it is also unpublished. - No ID reuse: Once deleted, the same
voice_idcannot be reused to create a new voice in the organization. - Scope boundary: Only custom voices belonging to the API key’s organization can be deleted. System voices and other organizations’ voices are protected.
API details
Endpoint: DELETE /v1/voice/{voice_id}
Requires active organization access for the member associated with the API key (a deactivated or removed member returns HTTP 403 with error_code: 10004).
Request headers
| Header | Required | Description |
|---|---|---|
X-API-Key | Yes | Project API key with Voice Cloning enabled. |
Accept-Language | No | Controls the language of error_message: en (default) or zh-CN. |
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
voice_id | string | Yes | Custom voice ID to delete (including IDs returned by Voice Cloning and Voice Design). Pass the ID returned by the API as-is; leading/trailing whitespace is trimmed and ASCII letters are lowercased. |
Response format
Successful deletion returns HTTP 200 with the standard JSON envelope:
{
"error_code": 0,
"error_message": "",
"succeed": true,
"data": {}
}
- Repeated requests: Replaying the delete request for the same
voice_idby the same member returns HTTP200with the same successful envelope. - Missing or non-deletable voices: Deleting a nonexistent
voice_id, a system voice, another organization’s voice, or a voice already removed via the console or another member returns HTTP400witherror_code: 12950:
{
"error_code": 12950,
"error_message": "Voice is unavailable.",
"succeed": false,
"data": null
}
Common error codes
error_code | Meaning | What to do |
|---|---|---|
10001 | Path parameter voice_id is missing or empty (HTTP 400) | Pass a valid custom voice_id and retry |
10003 | API key is missing or invalid, or the organization/project is disabled (HTTP 401) | Check X-API-Key and organization/project status |
10004 | Member has no active organization access, or Voice Cloning is disabled for the project (HTTP 403) | Restore member access or enable Voice Cloning for the project before retrying |
12950 | Voice does not exist, was already deleted through another path, or is not a custom voice in your organization (for example, a system voice) (HTTP 400) | Call the List Voices API with source=personal to verify existing custom voice_id values |
10005 | Request rate exceeded for the project space (HTTP 429) | Reduce request frequency and retry |
10000 | Unexpected service error (HTTP 500) | Try again later; contact support if the error persists |
For authentication, rate-limit, billing, timeout, service, and other common errors, see Errors. For voice-slot rules, see Pricing.