POST
/
audio_speed_changer
Python
import requests

url = "https://api.musicgpt.com/api/public/v1/audio_speed_changer"
headers = {"Authorization": "<API_KEY>"}

# Option 1: Use audio URL
payload = {
    "audio_url": "https://example.com/input_audio.mp3",
    "speed_change_factor": 1.5,
    "output_extension": "mp3"
}
response = requests.post(url, headers=headers, data=payload)
print(response.json())

# Option 2: Upload local audio file
payload = {
    "speed_change_factor": 1.25,
    "output_extension": "wav"
}
with open("input_audio.mp3", "rb") as f:
    files = {"audio_file": f}
    response = requests.post(url, headers=headers, data=payload, files=files)
print(response.json())
{
  "success": true,
  "conversion_id": "conv999",
  "credit_estimate": 45,
  "conversion_path": "https://example.com/output/converted_audio.mp3",
  "message": "Speed change task queued successfully"
}

Authorizations

Authorization
string
header
required

Body

multipart/form-data
audio_url
string
required

URL of the input audio to change speed.

Example:

"https://example.com/input_audio.mp3"

speed_change_factor
number
required

Factor to change the audio speed (min: 0.25, max: 4.0)

Required range: 0.25 <= x <= 4
Example:

1.5

audio_path
string

Deprecated: use audio_url instead.

Example:

"https://example.com/input_audio.mp3"

audio_file
file

Audio file to upload and process directly.

output_extension
enum<string>

Desired output format.

Available options:
mp3,
wav,
flac,
ogg,
aac,
webm
Example:

"mp3"

webhook_url
string

Callback URL for async processing results.

Example:

"http://your-webhook-url.com/callback"

Response

Successfully initiated audio speed change

success
boolean
conversion_id
string
credit_estimate
number
conversion_path
string
message
string