NeuralBridge
Մուտք Ներբեռնել IDE
ElevenLabs

ElevenLabs Music v2

երաժշտություն և երգեր

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.

Հատկություններ

Կոնտեքստային պատուհան
—
Առավելագույն token-ներ պատասխանում
—
Վենդոր
ElevenLabs
Թողարկում
—
Մուտք
տեքստ
Ելք
ձայն

Նկարագրություն

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.

Պարամետրեր

prompt
Հարցման տեքստ՝ ինչ պետք է ստացվի։ Տեսանյութի համար — սցենար, კამերայի շարժում, լուսավորություն; երաժշտության համար — ժանր, տրամադրություն, գործիքներ, տեմպ։ Երկարության սահմանը՝ մոդելում։
duration
Տևողությունը վայրկյաններով՝ վիդեոի համար ռոլիկ, երաժշտության համար տրեք. Բազում է նաև գնի վրա.
instrumentalլռելյայն: false
true — տրեքը երաշխավորված է առանց ձայնի։ Առանց դրա մոդելը ինքնուրույն որոշում է նկարագրության հիման վրա, պետք է երգի, և ինքնուրույն գրվում են բառերը։
seed
Ֆիքսում է պատահականությունը՝ նույն seed‑ը և նույն պարամետրերով կրկնակի հարցումը տալիս է նույն արդյունքը։
output_formatլռելյայն: 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
Կոդեկ, հաճախականություն և բիթրեյտ՝ օրինակ mp3_44100_128 — MP3, 44,1 կՀց, 128 կբիթ/վ; opus_48000_96 — Opus Ogg կոնտեյներում։ auto — մոդելի լռելյայն ձևաչափը։
sign_with_c2paլռելյայն: false
true — MP3 ֆայլին ավելացվում է C2PA ստորագրություն՝ նշում, որ տրեքը ստեղծված է նեյրոնային ցանցով։
composition_plan
Երգը մասերով՝ {\"chunks\": [{\"text\", \"duration_ms\", \"positive_styles\", \"negative_styles\", \"context_adherence\"}]}. text-ում՝ մասի անվանումը քառակուսային փակագծերում ([Verse 1], [Chorus]), երգի տողերը և նշումները փակագծերում ({guitar solo}). prompt-ի փոխարեն; սահմանափակում՝ մասերի քանակը։
section_duration_ms
duration_ms-ի սահմանները մեկ պլանային մասի համար, միլիվայրկյաններով։
section_lines
Մեկ պլանային մասի տեքստում առավելագույն տողերի թիվը։
section_line_chars
Մասի տեքստի մեկ տողի առավելագույն երկարությունը։
section_name_chars
Մասի անվան երկարության սահմանները քառակուսային փակագծերում, օրինակ՝ [Verse 1]։
section_styles
positive_styles (մեկից) և negative_styles մեկ մասի համար ոճերի քանակի սահմանները։ Ոճերը ավելի լավ է գրել անգլերենով։
context_adherenceլռելյայն: high · low · medium · high
low — մասը կարող է հեռանալ հարևաններից, high — պահում է նրանց ձայնը (լռելյայն).

Ենդպոինտներ

POSThttps://api.neuralbridge.ru/v1/audio/musicհիմնական
Audio — երաժշտություն — Երաժշտություն և երգեր՝ նկարագրություն կամ պլան մասերով մուտքում, audio file ելքում.

Կոդի օրինակներ

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

Այլ ElevenLabs մոդելներ

Նման մոդելներ՝ երաժշտություն և երգեր

OpenAI SDK-ի համար նշեք /v1 base_url-ում։ Anthropic SDK-ի համար — առանց /v1.
Գիներ
Թրեքի վայրկյան / վայրկյան0,3938 ₽
Հարցման արժեքը ռուբլիով — պատասխանում, դաշտում usage.cost
Նույնացուցիչ
elevenlabs/music-v2-08130
Ստանալ API բանալի