Delete text-to-speech audio clip
December 27, 2024 (August 24, 2026)
Table of contents
This endpoint will delete audio clip generated by
This endpoint returns 200 for an audio clip that does not exist or has already been deleted. The one case that does not succeed is a generation still in flight — see the notes below.
https://api.useapi.net/v1/minimax/speech/
audio_id
Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
API tokenis required, see Setup useapi.net for details.
Path parameter
audio_idis required. Specify the audio_id you want to delete.
Notes:
- Accepts an
audioIdreturned by POST speech/create as well as anyaudio_idlisted by GET speech. - A generation that is still running cannot be deleted, because there is nothing stored yet. Cancel it with DELETE scheduler/
idinstead, passing the sameaudioId. - Deleting is permanent. The recording leaves the MiniMax account and stops appearing in GET speech.
Responses
-
A generation that is still running has nothing stored to delete yet:
{ "error": "Generation is still running. Cancel it with DELETE /v1/minimax/scheduler/user:12345-minimax:123456789012345678-audio:178737039436895391" }And one that never produced a recording:
{ "error": "Nothing was generated for this audioId, so there is nothing to delete" }Anything else:
{ "error": "<Error message>", "code": 400 } -
{ "error": "Unauthorized", "code": 401 } -
596 Account Error
{ "error": "Your minimax account has pending error. Please address this issue at https://useapi.net/docs/api-minimax-v1/post-minimax-accounts-account before making any new API calls.", "code": 596 }
Examples
-
curl -X DELETE "https://api.useapi.net/v1/minimax/speech/<audio_id>" \ -H "Accept: application/json" \ -H "Authorization: Bearer …" -
const token = "API token"; const audio_id = "audio_id to delete"; const apiUrl = `https://api.useapi.net/v1/minimax/speech/${audio_id}`; const response = await fetch(apiUrl, { method: 'DELETE', headers: { "Authorization": `Bearer ${token}`, }, }); const result = await response.json(); console.log("response", {response, result}); -
import requests token = "API token" audio_id = "audio_id to delete" apiUrl = f"https://api.useapi.net/v1/minimax/speech/{audio_id}" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {token}" } response = requests.delete(apiUrl, headers=headers) print(response, response.json())