Omixa API Docs

Lyria 2

Developer documentation

Lyria 2

Lyria 2 for music generation, clips, songs, or realtime music workflows.

Model Reference

Music generation models

Prompted music generation, clip creation, tempo control, and realtime music descriptors. Endpoint: https://omixa.cloud/api/v1/music/jobs

Lyria 2

lyria-002

Lyria 2 for music generation, clips, songs, or realtime music workflows.

Music
Minimum hold $0.010000
Integration reference

Connect Lyria 2

Use Omixa's unified endpoint and your workspace API key. Provider routing, billing, failover, and usage records are handled by Omixa.

POST https://omixa.cloud/api/v1/music/jobs
  • Provider: google
  • Endpoint type: google_lyria_music
Request schema

Request fields

Only send options supported by this model. Required fields and accepted values are listed below.

Field يكتب Required Accepted values وصف
model string Yes lyria-002 Use `lyria-002`. Omixa resolves the active provider route and failover key automatically.
prompt string Yes Any valid value Music description: genre, instrumentation, mood, tempo, vocals, and structure.
duration_seconds number No 1-240 Target duration.
bpm integer No 40-240 Tempo in beats per minute.
temperature number No 0-3 Creative variation control.
style string No Any valid value Optional style/motion hint used by the playground and compatible provider routes.
Ready to send

Payload and response

Start with this model-safe payload and expect the normalized Omixa response shape shown beside it.

Example JSON payload
{
    "model": "lyria-002",
    "prompt": "A clean electronic intro with warm bass, light percussion, and optimistic movement.",
    "duration_seconds": 30,
    "bpm": 112,
    "temperature": 0.8
}
Response shape
{
    "provider": "google",
    "model": "lyria-002",
    "status": "succeeded",
    "data": [
        {
            "audio_base64": "<base64-audio>",
            "content_type": "audio/wav"
        }
    ]
}
Language examples

Copy-ready integration code

Replace the example API key with a workspace key and keep model-specific fields unchanged unless the table above marks them optional.

curl -X POST https://omixa.cloud/api/v1/music/jobs \
  -H "Authorization: Bearer omx_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "lyria-002",
    "prompt": "A clean electronic intro with warm bass, light percussion, and optimistic movement.",
    "duration_seconds": 30,
    "bpm": 112,
    "temperature": 0.8
}'
Production checklist

Operational notes

  • Authenticate with `Authorization: Bearer omx_live_xxx`.
  • Omixa handles provider keys, routing, billing, failover, and usage recording behind this endpoint.
  • Google Vertex requests use active Vertex accounts configured by the admin; Omixa retries the next healthy account when a route fails before output starts.
Copied Markdown