POST
/
v1
/
music_generation
curl --request POST \
  --url https://geoff.ai/api/v1/music_generation \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "magma",
    "prompt": "Indie folk, melancholic, introspective, longing",
    "lyrics": "[verse]\nStreetlights flicker, the night breeze flows\nShadows dance where nobody goes\n\n[chorus]\nWe are the echoes of yesterday\nFading but never gone away",
    "audio_setting": {
      "sample_rate": 44100,
      "bitrate": 256000,
      "format": "mp3"
    }
  }'
{
  "data": {
    "audio": "hex-encoded audio data",
    "status": 2
  },
  "trace_id": "04ede0ab069fb1ba8be5156a24b1e081",
  "extra_info": {
    "music_duration": 25364,
    "music_sample_rate": 44100,
    "music_channel": 2,
    "bitrate": 256000,
    "music_size": 813651
  }
}

Authorization

Authorization
string
required
Bearer token. Bearer API_key, can be found in Settings > API Keys.

Request Body

model
enum
default:"magma"
required
Music generation model. E.g., magma.
prompt
string
required
Style and mood description. E.g., "Indie folk, melancholic, introspective, longing".
lyrics
string
Song lyrics with section markers like [verse], [chorus], [bridge], [outro].
audio_setting
object
Audio output configuration.
curl --request POST \
  --url https://geoff.ai/api/v1/music_generation \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "magma",
    "prompt": "Indie folk, melancholic, introspective, longing",
    "lyrics": "[verse]\nStreetlights flicker, the night breeze flows\nShadows dance where nobody goes\n\n[chorus]\nWe are the echoes of yesterday\nFading but never gone away",
    "audio_setting": {
      "sample_rate": 44100,
      "bitrate": 256000,
      "format": "mp3"
    }
  }'
{
  "data": {
    "audio": "hex-encoded audio data",
    "status": 2
  },
  "trace_id": "04ede0ab069fb1ba8be5156a24b1e081",
  "extra_info": {
    "music_duration": 25364,
    "music_sample_rate": 44100,
    "music_channel": 2,
    "bitrate": 256000,
    "music_size": 813651
  }
}