Lyria 3 Pro Preview
google/lyria-3-pro-previewLyria 3 Pro is Google's music generation model for full-length songs up to about three minutes, with verses, choruses, bridges, vocals, and timed lyrics. It generates 48 kHz stereo MP3 audio from a text prompt, optionally guided by an image.
- Giá cơ bản
- $0.08USD / lần chạy
- Thực thi
- async
- Loại model
- audio
- Các trường đầu vào
- 2
Thử model
Phòng thử nghiệm
PNG, JPEG, WebP hoặc GIF · tối đa 20 MiB
Đầu ra của bạn sẽ xuất hiện ở đây
Hoàn tất đầu vào, rồi nhấp Run.
Thẻ model
Thông số kỹ thuật
Giá
- Đầu vào
- $0 / 1M token
- Đầu ra
- $0 / 1M token
- Giá cơ bản
- $0.08 / lần chạy
Ngữ cảnh & phương thức
- Đầu vào
- Định nghĩa theo schema
- Đầu ra
- audio
Tính năng
- Chat
- Không được hỗ trợ
- Thị giác
- Không được hỗ trợ
- Suy luận
- Không được hỗ trợ
- Đầu ra có cấu trúc
- Không được hỗ trợ
- Gọi hàm
- Không được hỗ trợ
- Đầu vào âm thanh
- Không được hỗ trợ
Truy cập
- Nhà cung cấp
- ID mô hình
- google/lyria-3-pro-preview
- Thực thi
- async
- URL cơ sở
- https://api.sandbase.ai
- API
- Unified Run API
- Endpoint
- /v1/run
README API
Lyria 3 Pro Preview
Lyria 3 Pro is Google's music model for full songs up to about three minutes: verses, choruses, and bridges with vocals and lyrics. An optional image sets the mood.
Fields
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, up to 5000 chars, required | — | Genre, mood, instruments, tempo, vocal style, and lyrics. Up to 5,000 characters. |
image | image file or URL | — | Optional image whose mood the music should match. |
Output
| Field | Notes |
|---|---|
url | MP3 file. |
lyrics | Lyrics and caption the model used, when available. |
Billing
$0.08 per song.
| Request | Price |
|---|---|
| One song | $0.08 |
| 10 songs | $0.80 |
Failed runs are not charged.
Prompting
- Name the genre, tempo, and instrumentation first, then the vocal style.
- Mark lyric sections, e.g.
[Verse],[Chorus].
Also on SandBase
Related: google/lyria-3.5, google/lyria-3-clip-preview, google/lyria-2.
Bắt đầu xây dựng
Gửi request đầu tiên của bạn
Endpoint tương thích OpenAI với xác thực và theo dõi mức sử dụng thống nhất.
# 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-3-pro-preview",
"image": "https://v3b.fal.media/files/b/0a93b559/qjT9o0CId1B65PbD6Yp06_9c94501900464c5aa98f302fa4b00375.png",
"prompt": "An uplifting indie pop song with bright acoustic guitar, warm female vocals, and a catchy chorus about a summer road trip, 110 BPM."
}
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"Schema đầu vào
2 tham số · 1 bắt buộc · 1 tùy chọn
| Tham số | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|
prompt | string | Bắt buộc | The text prompt describing the music you want to generate. Include genre, mood, instrumentation, tempo, and vocal style for best results. Supports vocals, lyrics, and multiple languages. · Độ dài tối thiểu: 1 · Độ dài tối đa: 5000 |
image | string | Tùy chọn | Optional image file or URL used as inspiration; the music will match the mood and theme of the image. |
Schema đầu ra
| Trường | Kiểu | Mô tả |
|---|---|---|
id | string | Mã định danh duy nhất cho tác vụ tạo |
status | string | Trạng thái tác vụ: pending, running, completed, failed, timeout |
model | string | Model được dùng cho quá trình tạo |
outputs | array | Mảng các mục đầu ra |
outputs[].url | string | URL của artifact đã tạo |
outputs[].content_type | string | Kiểu MIME (ví dụ image/png, video/mp4) |
error | object | null | Chi tiết lỗi nếu thất bại, null nếu thành công |
error.type | string | Mã loại lỗi có thể đọc bằng máy |
error.message | string | Mô tả lỗi dễ đọc cho người dùng |
Quy trình không đồng bộ
Model này chạy bất đồng bộ. Gửi yêu cầu, rồi thăm dò để lấy kết quả.
- Gửi: POST tới /v1/run và đọc
idđược trả về. - Thăm dò: GET /v1/run/{id} cho đến khi trạng thái là
completed,failedhoặctimeout. - Truy xuất: đọc
outputstừ phản hồi hoàn tất.
Chọn model của bạn
So sánh model
| Mô hình | Loại | Giá mặc định | Phát hành |
|---|---|---|---|
Lyria 3 Pro PreviewMô hình này Google | Âm thanh | $0.08 / lượt chạy | 30 thg 3, 2026 |
Google | Âm thanh | $0.04 / lượt chạy | 25 thg 9, 2026 |
Google | Âm thanh | $0.03 / lượt chạy | 25 thg 9, 2026 |
Google | Âm thanh | $0.10 / lượt chạy | 15 thg 9, 2026 |
Google | Âm thanh | $0.05 / lượt chạy | 16 thg 4, 2026 |
Google | Âm thanh | $0.04 / lượt chạy | 30 thg 3, 2026 |
Câu hỏi
FAQ
Làm thế nào để gọi Google Lyria 3 Pro Preview qua SandBase?
Tạo một API key SandBase, sau đó gửi yêu cầu với model ID "google/lyria-3-pro-preview" tới Unified Run API (/v1/run) tại https://api.sandbase.ai. Các ví dụ yêu cầu trên trang này cho thấy chính xác payload.
Google Lyria 3 Pro Preview có giá bao nhiêu?
$0 cho mỗi 1M token đầu vào và $0 cho mỗi 1M token đầu ra, tính phí theo từng yêu cầu từ số dư SandBase của bạn. Mức giảm giá, nếu có, được hiển thị trong phần giá trên trang này.
Tôi có cần tài khoản Google riêng không?
Không. Chỉ cần một API key và số dư SandBase là bạn có thể truy cập Google Lyria 3 Pro Preview và các model khác trong danh mục; bạn không cần đăng ký riêng với Google.
