POST
/
sound_generator
Generate Sound Based on Given Prompt
curl --request POST \
  --url https://api.musicgpt.com/api/public/v1/sound_generator \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data 'prompt=Generate a soothing ambient soundscape.' \
  --data webhook_url=http://your-webhook-url.com/callback \
  --data audio_length=30
{
  "success": true,
  "task_id": "soundgen789",
  "conversion_id": "conv456",
  "eta": -1,
  "credit_estimate": 100.1,
  "message": "Successfully published to queue"
}

Authorizations

Authorization
string
header
required

Body

application/x-www-form-urlencoded
prompt
string
required

Text prompt guiding the sound generation.

Example:

"Generate a soothing ambient soundscape."

webhook_url
string

Callback URL for async processing results.

Example:

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

audio_length
integer

Desired duration of generated audio in seconds (beta feature)

Example:

30

Response

Successfully initiated sound generation

success
boolean
task_id
string
conversion_id
string
eta
integer
credit_estimate
number
message
string