分轨提取
- 从已有歌曲中分离出指定的一条分轨,异步任务
- 支持 90 多种乐器与声部类型
- 只要人声与伴奏用全量分轨,要特定乐器用这个
认证
All endpoints authenticate with a Bearer token.
Get an API key: open the console and create one.
Add it to the request header:
Authorization: Bearer YOUR_OAIRoute_KEY请求参数
音频模型,默认 suno,当前仅 suno。
产出源音轨那次任务的 task_id。缺失或无法定位源音轨时,提交阶段即返回 400。
指定 data.result.music[] 中的第几首,默认 1。一次生成通常有 2 首,索引为 1 或 2。
要提取的分轨类型,默认 lead_vocal。
取值见下方分类。注意 808 必须作为字符串传递。
输出音频格式,取值 mp3、m4a、wav。
The audio model; defaults to suno, currently the only one.
The task_id of the task that produced the source track. Missing, or the source track can't be located, returns a 400 at submission.
Which track in data.result.music[], default 1. A single generation usually yields 2, at indexes 1 and 2.
The track type to extract; defaults to lead_vocal.
Values are listed by category below. Note that 808 must be passed as a string.
Output audio format: mp3, m4a, or wav.
stem_type 可选值
人声类
lead_vocal、backing_vocals、choir、synth_voice
鼓与打击乐
drum_kit、electronic_drum_kit、kick、snare、hi_hat、cymbals、hand_clap、percussion、tambourine、shaker、cowbell、bells、congas、bongos、djembe、tabla、taiko、timpani、steel_drums、music_box、glockenspiel
贝斯类
bass、synth_bass、electric_bass、upright_bass、double_bass、808
吉他类
guitar、acoustic_guitar、electric_guitar、lead_guitar、lead_electric_guitar、rhythm_electric_guitar、distorted_electric_guitar、bass_guitar、pedal_steel_guitar、lap_steel_guitar、fiddle、banjo、mandolin、ukulele、sitar、koto
键盘类
piano、electric_piano、digital_piano、rhodes、organ、synth、synth_pad、synth_keys、synth_lead、arpeggiator、keyboards、harpsichord、celesta、accordion、melodica
管乐类
brass_section、synth_brass、trumpet、trombone、tuba、french_horn、horns、saxophone、alto_saxophone、tenor_saxophone、baritone_saxophone、clarinet、oboe、bassoon、flute、piccolo、woodwinds、harmonica、bagpipes、whistle、didgeridoo
弦乐类
string_section、synth_strings、violin、viola、cello、harp、orchestra
其他
sound_effects、risers、drone、theremin、vibraphone、marimba、xylophone
Vocals
lead_vocal, backing_vocals, choir, synth_voice
Drums and percussion
drum_kit, electronic_drum_kit, kick, snare, hi_hat, cymbals, hand_clap, percussion, tambourine, shaker, cowbell, bells, congas, bongos, djembe, tabla, taiko, timpani, steel_drums, music_box, glockenspiel
Bass
bass, synth_bass, electric_bass, upright_bass, double_bass, 808
Guitar
guitar, acoustic_guitar, electric_guitar, lead_guitar, lead_electric_guitar, rhythm_electric_guitar, distorted_electric_guitar, bass_guitar, pedal_steel_guitar, lap_steel_guitar, fiddle, banjo, mandolin, ukulele, sitar, koto
Keyboards
piano, electric_piano, digital_piano, rhodes, organ, synth, synth_pad, synth_keys, synth_lead, arpeggiator, keyboards, harpsichord, celesta, accordion, melodica
Wind
brass_section, synth_brass, trumpet, trombone, tuba, french_horn, horns, saxophone, alto_saxophone, tenor_saxophone, baritone_saxophone, clarinet, oboe, bassoon, flute, piccolo, woodwinds, harmonica, bagpipes, whistle, didgeridoo
Strings
string_section, synth_strings, violin, viola, cello, harp, orchestra
Other
sound_effects, risers, drone, theremin, vibraphone, marimba, xylophone
响应
响应状态码,成功时为 200。
提交成功后为 submitted。
任务唯一标识,用于轮询查询结果。
轮询用 GET /v1/music/tasks/{task_id},建议每 3 到 5 秒一次,直到 status 为 completed 或 failed。
完成后分轨音频的 URL 出现在 data.result 里。失败原因写在 data.error.message,预扣额度会自动退回。
引用源音轨只需 task_id 加 audio_index,无需记录其他标识。stem_type 省略时默认 lead_vocal,传非法值会触发 400。
808 是唯一一个纯数字的取值,必须传字符串 "808"。传数字 808 可能被解析成别的含义。
The response status code; 200 on success.
submitted after successful submission.
The unique task identifier, for polling.
Poll with GET /v1/music/tasks/{task_id} every 3 to 5 seconds until status is completed or failed.
On completion the extracted track's URL appears in data.result. The failure reason is in data.error.message, and the held balance is refunded automatically.
Referencing the source track needs only task_id plus audio_index; no other identifier needs recording. stem_type defaults to lead_vocal when omitted; an invalid value returns a 400.
808 is the only purely numeric value and must be passed as the string "808". Passing the number 808 may be parsed as something else.
错误码
For error response formats, status codes, and retry guidance see Error codes and rate limits; for troubleshooting steps on common errors see the FAQ.
使用示例
提交一个任务并拿到 task_id:
提交成功只表示任务已受理。真正的产物要拿返回的 task_id 去任务查询接口轮询,status 变成 completed 之后才有结果。
Submit a task and get a task_id:
A successful submission only means the task was accepted. To get the actual output, poll the task query endpoint with the returned task_id; results appear only after status becomes completed.