Lyria 3 Clip Preview

وثائق المطور

Lyria 3 Clip Preview

Lyria 3 Clip Preview 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 3 Clip Preview

lyria-3-clip-preview

Lyria 3 Clip Preview for music generation, clips, songs, or realtime music workflows.

Music Context window: 131,072 tokens
minimum hold $0.010000
Integration reference

Connect Lyria 3 Clip Preview

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_music
  • Context window: 131,072 tokens
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-3-clip-preview Use `lyria-3-clip-preview`. 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-3-clip-preview",
    "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-3-clip-preview",
    "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-3-clip-preview",
    "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-3-clip-preview\",\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-3-clip-preview",
    "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-3-clip-preview",
    "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-3-clip-preview"",
    ""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-3-clip-preview",
    "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.
تخفيض السعر المنسوخ