NeuralBridge
Giriş yap IDE'yi indir
ElevenLabs

ElevenLabs Music v2

müzik ve şarkılar

ElevenLabs music model: instrumental tracks and songs with vocals from a description or from a plan of parts with your own lyrics, 3 seconds to 10 minutes.

Özellikler

Bağlamsal pencere
—
Maks. yanıt tokenları
—
Satıcı
ElevenLabs
Sürüm
—
Giriş
metin
Çıkış
ses

Açıklama

What it does

  • Music from a description: genre, mood, instruments, tempo (BPM), key, production era. With instrumental: true the track is guaranteed to have no vocals.
  • A song from a description: without instrumental the model decides whether to sing and writes the lyrics to fit the length.
  • A song from a plan: composition_plan lists the parts of the song (verse, chorus, bridge), each with its own lyrics, styles and length. Lyrics can be in any language; styles work best in English.
  • Length from a description is duration, 3 to 600 seconds, required. A plan lasts as long as its parts together: each part 3 to 120 seconds, 600 seconds and 30 parts at most.
  • File format is output_format: MP3 (22–48 kHz, 32–320 kbit/s) or Opus; auto is MP3 48 kHz, 192 kbit/s.
  • seed makes results repeatable, with a plan only. sign_with_c2pa adds a C2PA mark to the MP3 saying the track was made by AI.
  • You may use the music and songs in your own videos and projects, including commercially.

How to call

POST /v1/audio/music with a JSON body. Describe the track in one of two ways: with a prompt (up to 4100 characters) or with a composition_plan. They cannot be sent together. With a description:

{"model": "elevenlabs/music-v2-08130", "prompt": "French house, 122 BPM, filtered disco sample chops, sidechained bass, rooftop-at-sunset mood", "duration": 30, "instrumental": true}

With a plan:

{"model": "elevenlabs/music-v2-08130", "composition_plan": {"chunks": [
  {"text": "[Verse]\nWalking down an empty street\nWondering who I'll meet", "duration_ms": 15000, "positive_styles": ["pop", "upbeat", "female vocals", "acoustic guitar"], "negative_styles": ["dark", "slow"]},
  {"text": "[Chorus]\nThis is my moment\nI won't let it go", "duration_ms": 15000, "positive_styles": ["powerful vocals", "full band"], "context_adherence": "high"}
]}}

The text of a part holds its name in square brackets ([Verse 1], [Chorus], [Outro]), the lyric lines separated by line breaks (up to 30 lines of 200 characters) and short cues in curly braces: {guitar solo}, {instrumental break}. A part without words has only its name: [Intro]. The styles of the first part set the sound of the whole track, so list 6–7 styles there.

Response

The response is the track file itself (audio/mpeg or audio/ogg), as with /v1/audio/speech. The X-NB-Audio-Seconds header holds the billed seconds. A one-minute track takes about half a minute, so set a client timeout of at least 10 minutes.

Errors

  • 400: invalid input, such as a description without duration, a prompt together with a plan, seed with a description, duration or instrumental with a plan, a part shorter than 3 or longer than 120 seconds, more than 30 lines in a part, empty styles, a description over 4100 characters. The error text names the field and the allowed values.
  • 402: not enough funds on the balance.
  • 502 or 504: the track was not received; nothing is charged.

Price

You pay per second of the finished track: for a description, the length you set; for a plan, the sum of its parts. The price is shown on this page.

Parametreler

prompt
İstek metni: ne elde edilmesi gerektiği. Videoda — sahne, kamera hareketi, ışık; müzikte — tür, ruh hali, enstrümanlar, tempo. Uzunluk sınırı — modelde.
duration
Saniye cinsinden süre: video için klip, müzik için parça. Fiyatı da etkiler.
instrumentalvarsayılan: false
true — parça kesinlikle ses içermeyecek. Ses olmadan model, açıklamaya göre şarkı söyleyip söylemeyeceğine karar verir ve sözleri kendisi yazar.
seed
Rastgeleliği sabitler: aynı seed ve aynı parametrelerle yapılan tekrar isteği aynı sonucu verir.
output_formatvarsayılan: auto · auto · mp3_48000_128 · mp3_48000_192 · mp3_48000_240 · mp3_48000_320 · mp3_22050_32 · mp3_24000_48 · mp3_44100_32 · mp3_44100_64 · mp3_44100_96 · mp3_44100_128 · mp3_44100_192 · opus_48000_32 · opus_48000_64 · opus_48000_96 · opus_48000_128 · opus_48000_192
Kodek, örnekleme hızı ve bit hızı: örneğin mp3_44100_128 — MP3, 44,1 kHz, 128 kbps; opus_48000_96 — Ogg konteynerinde Opus. auto — modelin varsayılan formatı.
sign_with_c2pavarsayılan: false
true — MP3 dosyasına C2PA imzası eklenir: parçanın bir yapay zeka tarafından oluşturulduğuna dair işaret.
composition_plan
Şarkı parçalar halinde: {"chunks": [{"text", "duration_ms", "positive_styles", "negative_styles", "context_adherence"}]}. text içinde parçanın adı köşeli parantez içinde ([Verse 1], [Chorus]), şarkı satırları ve süslü parantez içindeki talimatlar ({guitar solo}). prompt yerine; limit — parça sayısı.
section_duration_ms
Bir plan parçasının duration_ms sınırları, milisaniye cinsinden.
section_lines
Planın bir parçasındaki metin satırlarının en fazla sayısı.
section_line_chars
Parça metninin bir satırının maksimum uzunluğu.
section_name_chars
Köşeli parantez içindeki parça adının uzunluk sınırları, örneğin [Verse 1].
section_styles
Bir parçadaki positive_styles (en az bir) ve negative_styles stil sayısının sınırları. Stilleri İngilizce yazmak daha iyidir.
context_adherencevarsayılan: high · low · medium · high
low — parça komşularından ayrılabilir, high — onların sesine tutunur (varsayılan).

Uç noktalar

POSThttps://api.neuralbridge.ru/v1/audio/musicana
Audio — müzik — Müzik ve şarkılar: girişte parça parça açıklama veya plan, çıkışta audio file.

Kod örnekleri

bash
curl https://api.neuralbridge.ru/v1/audio/music \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "elevenlabs/music-v2-08130", "prompt": "Warm cinematic ambient, soft piano, subtle strings, hopeful mood", "duration": 30, "instrumental": true}' \
  --output music.mp3

Diğer ElevenLabs modelleri

Benzer modeller: müzik ve şarkılar

OpenAI SDK için belirtin /v1 base_url içinde. Anthropic SDK için — olmadan /v1.
Fiyatlar
Parça saniyesi / saniye0,3938 ₽
İstek maliyeti ruble cinsinden — yanıtın alanında. usage.cost
Tanımlayıcı
elevenlabs/music-v2-08130
API anahtarı al
Yapay Zeka ajanları için