Lyria 2
google/lyria-2Lyria 2 is Google's text-to-music model that generates a 30-second instrumental track as 48 kHz WAV audio from a description of genre, mood, instruments, and tempo.
- Taban fiyat
- $0.10USD / çalıştırma
- Çalıştırma
- async
- Model türü
- audio
- Girdi alanları
- 3
Modeli deneyin
Oynatma Alanı
Çıktınız burada görünecek
Girdileri tamamlayın, ardından Çalıştır'a tıklayın.
Model kartı
Teknik özellikler
Fiyatlandırma
- Temel fiyat
- $0.10 / çalıştırma
Bağlam ve modaliteler
- Girdi
- Şemada tanımlı
- Çıktı
- audio
Yetenekler
- Sohbet
- Desteklenmiyor
- Görsel
- Desteklenmiyor
- Akıl yürütme
- Desteklenmiyor
- Yapılandırılmış çıktı
- Desteklenmiyor
- Fonksiyon çağırma
- Desteklenmiyor
- Ses girdisi
- Desteklenmiyor
Erişim
- Sağlayıcı
- Model kimliği
- google/lyria-2
- Çalıştırma
- async
- Temel URL
- https://api.sandbase.ai
- API
- Unified Run API
- Uç nokta
- /v1/run
API README
Lyria 2
Lyria 2 is Google's instrumental music model: one 30-second 48 kHz WAV clip per request.
Fields
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, up to 2000 chars, required | — | Genre, mood, instruments, tempo. |
negative_prompt | string | low quality | What to leave out, e.g. vocals. |
seed | integer | random | Fix it to compare prompt changes. |
Billing
$0.10 per 30-second clip.
| Request | Price |
|---|---|
| One clip | $0.10 |
| 10 clips | $1.00 |
Failed runs are not charged.
Prompting
- Lyria 2 makes instrumentals only; describe instruments and mood rather than lyrics.
Also on SandBase
Related: google/lyria-3.5, google/lyria-3-clip-preview, google/lyria-3-pro-preview.
Geliştirmeye başlayın
İlk isteğinizi gönderin
Birleşik kimlik doğrulama ve kullanım takibi sunan OpenAI uyumlu uç nokta.
# The quoted heredoc keeps Unicode and shell metacharacters unchanged.
result=$(curl --fail-with-body --silent \
-X POST "https://api.sandbase.ai/v1/run" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'SANDBASE_JSON'
{
"model": "google/lyria-2",
"prompt": "A lush, ambient soundscape featuring the serene sounds of a flowing river, complemented by the distant chirping of birds, and a gentle, melancholic piano melody that slowly unfolds.",
"negative_prompt": "vocals, slow tempo"
}
SANDBASE_JSON
)
run_id=$(printf '%s' "$result" | jq -r .id)
for attempt in $(seq 1 120); do
status=$(printf '%s' "$result" | jq -r .status)
case "$status" in completed|failed|timeout) break ;; esac
sleep 2
result=$(curl --fail-with-body --silent \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
"https://api.sandbase.ai/v1/run/$run_id")
done
status=$(printf '%s' "$result" | jq -r .status)
[ "$status" = completed ] || { echo "Generation ended: $status" >&2; exit 1; }
printf '%s\n' "$result"Giriş Şeması
3 parametre · 1 zorunlu · 2 isteğe bağlı
| Parametre | Tür | Zorunlu | Açıklama |
|---|---|---|---|
prompt | string | Zorunlu | Description of the music to generate: genre, mood, instruments, tempo. Up to 2000 characters. · Min. uzunluk: 1 · Maks. uzunluk: 2000 |
seed | integer | İsteğe bağlı | Random seed for reproducible results. Leave empty for a random seed. |
negative_prompt | string | İsteğe bağlı | What to exclude from the generated audio. · Varsayılan: "low quality" |
Çıkış Şeması
| Alan | Tür | Açıklama |
|---|---|---|
id | string | Üretim görevinin benzersiz tanımlayıcısı |
status | string | Görev durumu: pending, running, completed, failed, timeout |
model | string | Üretimde kullanılan model |
outputs | array | Çıkış öğelerinin dizisi |
outputs[].url | string | Oluşturulan çıktının URL'si |
outputs[].content_type | string | MIME türü (örn. image/png, video/mp4) |
error | object | null | Başarısız olursa hata ayrıntıları, başarıda null |
error.type | string | Makine tarafından okunabilir hata türü kodu |
error.message | string | İnsan tarafından okunabilir hata açıklaması |
Asenkron İş Akışı
Bu model asenkron çalışır. Bir istek gönderin, ardından sonuç için sorgulayın.
- Gönder: /v1/run adresine POST yapın ve dönen
idalanını okuyun. - Sorgula: durum
completed,failedveyatimeoutolana kadar /v1/run/{id} adresine GET yapın. - Al: tamamlanan yanıttan
outputsalanını okuyun.
Modelinizi seçin
Modelleri karşılaştırın
| Model | Tür | Varsayılan fiyat | Yayınlanma |
|---|---|---|---|
Lyria 2Bu model Google | Ses | $0.10 / çalıştırma | 20 May 2025 |
Google | Ses | $0.04 / çalıştırma | 25 Eyl 2026 |
Google | Ses | $0.03 / çalıştırma | 25 Eyl 2026 |
Google | Ses | $0.10 / çalıştırma | 15 Eyl 2026 |
Google | Ses | $0.05 / çalıştırma | 16 Nis 2026 |
Google | Ses | $0.08 / çalıştırma | 30 Mar 2026 |
Sorular
SSS
Google Lyria 2'i SandBase üzerinden nasıl çağırırım?
Bir SandBase API anahtarı oluşturun, ardından model kimliği "google/lyria-2" ile https://api.sandbase.ai adresindeki Unified Run API (/v1/run) uç noktalarına istek gönderin. Bu sayfadaki istek örnekleri tam yükü gösterir.
Ayrı bir Google hesabına ihtiyacım var mı?
Hayır. Tek bir SandBase API anahtarı ve bakiyesi size Google Lyria 2 ve katalogdaki diğer modellere erişim sağlar; Google için ayrıca kayıt olmanız gerekmez.
