Generate Sound Based on Given Prompt

Creates an audio file based on a textual prompt. The generation process is asynchronous and returns a task ID for tracking.

post/v1/sound_generator

Request

  • Base URL
    https://api.musicgpt.com/api/public
  • Auth
    API key in header Authorization

Request body application/x-www-form-urlencoded

promptstring required

Text prompt guiding the sound generation.

generate_album_coverboolean

Whether to generate an album cover for the generated audio

webhook_urlstring

Callback URL for async processing results.

audio_lengthinteger

Desired duration of generated audio in seconds (beta feature)

Example request

{
  "prompt": "Generate a soothing ambient soundscape.",
  "webhook_url": "http://your-webhook-url.com/callback",
  "audio_length": 30
}

Response

Successfully initiated sound generation

successboolean
task_idstring
conversion_idstring
etainteger
credit_estimatenumber float
messagestring

Example response

{
  "success": true,
  "task_id": "soundgen789",
  "conversion_id": "conv456",
  "eta": -1,
  "credit_estimate": 100.1,
  "message": "Successfully published to queue"
}

Changes

No recorded changes to this operation across all 1 revision of this API.