Skip to content

MusicGenerationInterfaceGenerateMusicMessage

HTTP API schema

← HTTP API reference

Generates a piece of music from a prompt and optional lyrics, genres and vocal gender. Fields the model does not support are rejected; the model catalog says which it supports.

MusicGenerationInterfaceGenerateMusicMessage fields

modelstringRequired

Model identifier from the model catalog (query-models). An unknown model is rejected.

promptstring

Describes the music: mood, instrumentation, tempo and, for models without a lyrics field, the lyrics. Required unless the model takes lyrics and they are given.

lyricsstring

Lyrics to sing, for models whose catalog entry supports a separate lyrics field

genresarray<string>

Genres from the model catalog list

vocalGenderVocalGender

vocalGender: Reference VocalGender

durationSecondsinteger

Target length in seconds, for models whose catalog entry supports a duration

minimum: 1

responseFormatBinaryResponseFormat

responseFormat: Reference BinaryResponseFormat

View source specification ↗