Endpoints

Music Generation

POSThttps://api.oneinfer.ai/v1/ula/generate-music

Generate music from text prompts and lyrics using Google Lyria or ElevenLabs Music. Supports JSON and multipart/form-data for supported reference uploads.

01Request Headers

Authorizationstringrequired

Bearer token for authentication. Format: Bearer <YOUR_TOKEN>. Exchange your API key for a token via the Authentication endpoint.

Content-Typestringrequired

application/json or multipart/form-data (use multipart when uploading supported reference images).

02Request Parameters

providerstring

Use google, or omit when inferable from the model. OneInfer routes may use provider=oneinfer with a configured public alias.

modelstringrequired

Use google/lyria-3 (MP3 only, no images) or google/lyria-3.5 (MP3/WAV and up to 10 reference images).

promptstringrequired

Describe the music. Lyrics and instrumental instructions are added to this prompt.

streamboolean

Must be false. Google music is non-streaming.

lyricsstring

Custom lyrics are added to the generation prompt.

audio_settingobject

format: mp3 only. Sample-rate and bitrate controls are not forwarded.

is_instrumentalboolean

Request an instrumental track without vocals.

03Example Request

{
  "model": "google/lyria-3",
  "provider": "google",
  "stream": false,
  "prompt": "A calm piano track with soft strings",
  "is_instrumental": true,
  "audio_setting": {
    "format": "mp3"
  }
}

Multipart input

Send scalar fields as form values and composition_plan, images, or audio_setting as JSON strings. Alternatively put the full request JSON in music_request_json and append files. endpoint_id is unsupported for music.

04Response

Non-streaming requests return the standard API envelope with data.audios, usage and optional provider_metadata. Streaming returns audio bytes; detailed ElevenLabs streaming returns newline-delimited JSON events with audio_base64 and metadata. Invalid model-specific combinations return HTTP 422. Only enabled models with configured pricing can execute; listing a model here does not enable it.

Response

202 - application/json