Lyria Realtime Experimental

开发者文档

Lyria Realtime Experimental

Lyria Realtime Experimental 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://www.omixa.cloud/api/v1/music/jobs

Lyria Realtime Experimental

lyria-realtime-exp

Lyria Realtime Experimental for music generation, clips, songs, or realtime music workflows.

Music 流媒体 Streaming supported
minimum hold $0.010000
Integration reference

Connect Lyria Realtime Experimental

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

POST https://www.omixa.cloud/api/v1/music/jobs
  • Provider: google
  • Endpoint type: google_lyria_realtime
  • Streaming supported
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-realtime-exp Use `lyria-realtime-exp`. 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-realtime-exp",
    "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-realtime-exp",
    "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
curl -X POST https://www.omixa.cloud/api/v1/music/jobs \
  -H "Authorization: Bearer omx_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "lyria-realtime-exp",
    "prompt": "A clean electronic intro with warm bass, light percussion, and optimistic movement.",
    "duration_seconds": 30,
    "bpm": 112,
    "temperature": 0.8
}'
JavaScript fetch
const response = await fetch('https://www.omixa.cloud/api/v1/music/jobs', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer omx_live_xxx',
    'Content-Type': 'application/json'
  },
  body: "{\n    \"model\": \"lyria-realtime-exp\",\n    \"prompt\": \"A clean electronic intro with warm bass, light percussion, and optimistic movement.\",\n    \"duration_seconds\": 30,\n    \"bpm\": 112,\n    \"temperature\": 0.8\n}"
});
const data = await response.json();
Python requests
import requests

response = requests.post(
    'https://www.omixa.cloud/api/v1/music/jobs',
    headers={'Authorization': 'Bearer omx_live_xxx', 'Content-Type': 'application/json'},
    json={
    "model": "lyria-realtime-exp",
    "prompt": "A clean electronic intro with warm bass, light percussion, and optimistic movement.",
    "duration_seconds": 30,
    "bpm": 112,
    "temperature": 0.8
}
)
print(response.json())
PHP cURL
$ch = curl_init('https://www.omixa.cloud/api/v1/music/jobs');
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_HTTPHEADER => ['Authorization: Bearer omx_live_xxx', 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => '{
    "model": "lyria-realtime-exp",
    "prompt": "A clean electronic intro with warm bass, light percussion, and optimistic movement.",
    "duration_seconds": 30,
    "bpm": 112,
    "temperature": 0.8
}',
    CURLOPT_RETURNTRANSFER => true,
]);
$response = curl_exec($ch);
C# HttpClient
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", "omx_live_xxx");
var json = @"{
    ""model"": ""lyria-realtime-exp"",
    ""prompt"": ""A clean electronic intro with warm bass, light percussion, and optimistic movement."",
    ""duration_seconds"": 30,
    ""bpm"": 112,
    ""temperature"": 0.8
}";
var response = await client.PostAsync("https://www.omixa.cloud/api/v1/music/jobs", new StringContent(json, System.Text.Encoding.UTF8, "application/json"));
var body = await response.Content.ReadAsStringAsync();
Go net/http
payload := []byte(`{
    "model": "lyria-realtime-exp",
    "prompt": "A clean electronic intro with warm bass, light percussion, and optimistic movement.",
    "duration_seconds": 30,
    "bpm": 112,
    "temperature": 0.8
}`)
req, _ := http.NewRequest("POST", "https://www.omixa.cloud/api/v1/music/jobs", bytes.NewReader(payload))
req.Header.Set("Authorization", "Bearer omx_live_xxx")
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
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.
复制的 Markdown