Skip to main content
POST
/
music
/
generate
Generate music
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    model: '<string>',
    prompt: '<string>',
    duration: 123,
    format: 'mp3',
    provider: {
      order: ['<string>'],
      only: ['<string>'],
      ignore: ['<string>'],
      include_alpha: true
    },
    suno: {
      prompt: '<string>',
      style: '<string>',
      title: '<string>',
      customMode: true,
      instrumental: true,
      personaId: '<string>',
      model: '<string>',
      negativeTags: '<string>',
      vocalGender: 'm',
      styleWeight: 0.5,
      weirdnessConstraint: 0.5,
      audioWeight: 0.5,
      callBackUrl: '<string>'
    },
    elevenlabs: {
      prompt: '<string>',
      composition_plan: {},
      music_length_ms: 123,
      model_id: '<string>',
      force_instrumental: true,
      store_for_inpainting: true,
      with_timestamps: true,
      sign_with_c2pa: true,
      output_format: '<string>'
    },
    echo_upstream_request: true,
    debug: {
      enabled: true,
      return_upstream_request: true,
      return_upstream_response: true,
      trace: true,
      trace_level: 'summary'
    }
  })
};

fetch('https://api.phaseo.app/v1/music/generate', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{}
Creates an asynchronous music generation job. Poll completion with GET /music/generate/{music_id}.

Authorizations

Authorization
string
header
required

Bearer token authentication

Body

application/json
model
string
required
prompt
string
duration
integer
format
enum<string>
Available options:
mp3,
wav,
ogg,
aac
provider
object

Provider routing preferences for gateway selection.

suno
object
elevenlabs
object
echo_upstream_request
boolean
debug
object

Gateway debug controls. These flags are never forwarded upstream.

Response

200 - application/json

Music generation response

The response is of type object.

Last modified on February 17, 2026