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"
}

Create custom sounds with AI using just a simple prompt.

Sound Generator lets you synthesize high-quality sound effects and audio textures directly from text prompts. Perfect for developers, game designers, filmmakers, and creative technologists who need original sounds on demand.

  • 🎛 Generate realistic or abstract sounds
  • 🧠 Fine-tuned AI audio creation
  • 🔁 Instant feedback or asynchronous delivery via webhook

Sound Generator is designed for flexibility, speed, and professional-grade quality.


Endpoint

POST /sound_generator

Use this endpoint to generate sounds based on a text description.


Sample Output

Listen to an actual sample:

Prompt: sound of waves crashing at the sea shore.

Download Audio

Try it Yourself

Visit the Sound Generator Endpoint Explorer to try live prompt-based sound creation.

🚀 Experiment with different descriptions — from realistic sounds (like “city street at night”) to fantastical ones (“alien spacecraft landing”)!


🛠️ Request Parameters

ParameterTypeRequiredDescription
promptStringYesA natural language description of the sound you want
webhook_urlStringOptionalWebhook URL to receive a callback with the audio result
user_idStringOptionalOptional user ID for tracking purposes

Sample Request

Python

import requests

url = "https://api.musicgpt.com/api/public/v1/SoundGenerator"
headers = {
    "Authorization": "<api_key>"
}
payload = {
    "prompt": "sound of an ancient temple door creaking open",
    "webhook_url": "https://abcd.requestcatcher.com/",
    "audio_length" : 20
}

response = requests.post(url, json=payload, headers=headers)
print(response.json())

Sample Response

Success (200 OK)

{
  "success":true,
  "task_id":"0af8567f-6156-4bb2-9adc-99b0c8792700",
  "conversion_id":"9e6ac90d-c09e-4ea6-8c39-d9f4e39bbbc8",
  "eta":84,
  "credit_estimate":0.99,
  "message":"",
  "status":"IN_QUEUE"
}

Webhook Response

Once the sound is ready, your webhook will receive:

{
  "success": true, 
  "conversion_type": "Sound Creator", 
  "task_id": "0af8567f-6156-4bb2-9adc-99b0c8792700", 
  "conversion_id": "9e6ac90d-c09e-4ea6-8c39-d9f4e39bbbc8", 
  "conversion_path": "https://lalals.s3.amazonaws.com/conversions/0af8567f-6156-4bb2-9adc-99b0c8792700_sound.mp3", 
  "conversion_path_wav": "https://lalals.s3.amazonaws.com/conversions/0af8567f-6156-4bb2-9adc-99b0c8792700_sound.wav", 
  "conversion_duration": 2.089795918367347, 
  "message": "Audio Generation Completed Successfully", 
  "conversion_paths": {"9e6ac90d-c09e-4ea6-8c39-d9f4e39bbbc8": "https://lalals.s3.amazonaws.com/https://lalals.s3.amazonaws.com/conversions/0af8567f-6156-4bb2-9adc-99b0c8792700_sound.mp3"}, 
  "conversion_paths_wav": {"9e6ac90d-c09e-4ea6-8c39-d9f4e39bbbc8": "https://lalals.s3.amazonaws.com/https://lalals.s3.amazonaws.com/conversions/0af8567f-6156-4bb2-9adc-99b0c8792700_sound.wav"}, 
  "conversion_durations": {"9e6ac90d-c09e-4ea6-8c39-d9f4e39bbbc8": 2.089795918367347}
}

Note: If your webhook is set, you’ll get the sound automatically once ready. Otherwise, you can fetch it manually using the conversion_id.


Payload and Request Formation

Authorizations

Authorization
string
header
required

Body

application/x-www-form-urlencoded

Response

200
application/json

Successfully initiated sound generation

The response is of type object.