API reference
Generate songs from lyrics and a style with YuE2, HeartMuLa or ACE-Step; cover, extend, repaint and re-arrange existing audio; split stems; write lyrics. Authenticate with an API key from the studio (Authorization: Bearer ws_...).
Base URL https://studio.weavyaudio.com/api/v1 · OpenAPI 3.1: /api/v1/openapi.json · Quickstart: API quickstart
Authentication
Create a key in the studio (API keys) and send it on every request: Authorization: Bearer ws_…. Keys can be revoked at any time.
Endpoints
POST/generations
Create a song (one or more takes). Queues one render per take on separate GPUs. Returns immediately; poll each id until its status is done.
Request body
| Field | Type | Default · range | Description |
|---|---|---|---|
engine | "yue2" | "heartmula" | "ace" | "yue2" | Model: yue2 (CC BY-NC), heartmula (Apache 2.0) or ace (MIT). |
task | "create" | "cover" | "reference" | "extend" | "repaint" | "accompany" | "create" | create a new song, or work from `source`: cover, reference (ace), extend (ace), repaint (ace), accompany (ace). |
source | object | Source audio for every task except create. | |
edit | object | Options for extend / repaint / accompany / covers. | |
heart | object | HeartMuLa-only options. | |
ace | object | ACE-Step-only options. | |
titlerequired | string | length 1–120 | Song title. |
artist | string | length 0–120 | Artist / act name (label only). |
language | string | length 0–40 | Vocal language, e.g. "English" or "Polish". Put first in the style. |
stylerequired | string | length 3–1000 | Genre, instruments, voice, mood, BPM, key - comma separated. |
lyricsrequired | string | length 1–6000 | Lyrics with section tags: [Verse], [Chorus], [Bridge]... |
cot | "full" | "melody" | "off" | "full" | full = write a melody-and-chord score first (most stable); melody = melody only; off = direct. |
cfg_scale | number | 2 1–4 | Style strength (classifier-free guidance), YuE2 and HeartMuLa. 1 = off. |
takes | integer | 2 1–8 | How many versions to render (each on its own GPU slot). |
seed | integer | 0–2147483647 | Fixed seed for the first take; omitted = random. |
lock_seed | boolean | false | Use the same seed for every take (only settings differ). |
max_len_s | integer | 300 30–360 | Upper bound for the song length in seconds. |
abc | string | length 0–20000 | Optional ABC score (melody + chords) to sing instead of planning one. |
abc_sampling | object | Sampling for the score stage. | |
semantic_sampling | object | Sampling for the audio-token stage. |
Responses
201Queued.401Missing or invalid API key.422Validation error.429Hourly limit reached.
curl -X POST https://studio.weavyaudio.com/api/v1/generations \
-H "Authorization: Bearer $WEAVY_KEY" -H "Content-Type: application/json" \
-d '{"title":"City Lights","language":"English","style":"warm piano pop, expressive female voice, 88 BPM","lyrics":"[Verse]\nNeon fades along the lane\n\n[Chorus]\nLet the day come into view","takes":2,"cfg_scale":2}'GET/generations
List generations. Newest first. To page, pass before = created_at of the last item.
| Parameter | In | Type | Description |
|---|---|---|---|
limit | query | integer 1–200 | |
before | query | integer | Unix ms cursor. |
Responses
200A page of generations.401Missing or invalid API key.
curl https://studio.weavyaudio.com/api/v1/generations?limit=20 -H "Authorization: Bearer $WEAVY_KEY"GET/generations/{id}
Get one generation.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Generation id. |
Responses
200The generation.401Unauthorized.404Not found.
curl https://studio.weavyaudio.com/api/v1/generations/GEN_ID -H "Authorization: Bearer $WEAVY_KEY"DELETE/generations/{id}
Delete a generation and its files. Cancels it first if it is still running.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Generation id. |
Responses
204Deleted.401Unauthorized.404Not found.
curl -X DELETE https://studio.weavyaudio.com/api/v1/generations/GEN_ID -H "Authorization: Bearer $WEAVY_KEY"POST/generations/{id}/stems
Split a finished take into stems. Vocals, drums, bass, guitar, piano, other. Runs in the background; read the take again for its `stems` field.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Generation id. |
Responses
202Started.401Unauthorized.409Not finished, or already splitting.503Stem service not configured.
curl -X POST https://studio.weavyaudio.com/api/v1/generations/GEN_ID/stems -H "Authorization: Bearer $WEAVY_KEY"POST/uploads
Upload an audio file (max 60 MB).
Request body · multipart/form-data
| Field | Type | Default · range | Description |
|---|---|---|---|
filerequired | string |
Responses
201Stored (converted to MP3 320k).401Unauthorized.413Too large.415Not audio.422Undecodable.
curl -X POST https://studio.weavyaudio.com/api/v1/uploads -H "Authorization: Bearer $WEAVY_KEY" -F file=@demo.mp3GET/uploads
List your uploads.
Responses
200Newest first.401Unauthorized.
GET/voices
List ACE-Step voices.
Responses
200All voices; only status "ready" can be used.401Unauthorized.
curl https://studio.weavyaudio.com/api/v1/voices -H "Authorization: Bearer $WEAVY_KEY"POST/lyrics
Write or rewrite lyrics with Claude. 30 drafts per hour. Returns lyrics with section tags, ready for any engine.
Request body
| Field | Type | Default · range | Description |
|---|---|---|---|
idea | string | length 0–1000 | What the song is about. |
language | string | length 0–40 | |
style | string | length 0–1000 | |
artist | string | length 0–120 | |
current | string | length 0–6000 | Existing lyrics (mode rewrite). |
mode | "new" | "rewrite" |
Responses
200Draft.401Unauthorized.429Hourly limit reached.502Writer failed.
curl -X POST https://studio.weavyaudio.com/api/v1/lyrics -H "Authorization: Bearer $WEAVY_KEY" -H "Content-Type: application/json" \
-d '{"idea":"a night drive after a breakup","language":"Polish","style":"synthwave, male vocal"}'POST/generations/{id}/cancel
Cancel a queued or running generation.
| Parameter | In | Type | Description |
|---|---|---|---|
id | path | string | Generation id. |
Responses
200The generation.401Unauthorized.404Not found.
curl -X POST https://studio.weavyaudio.com/api/v1/generations/GEN_ID/cancel -H "Authorization: Bearer $WEAVY_KEY"The Generation object
| Field | Type | Default · range | Description |
|---|---|---|---|
idrequired | string | Generation id (one per take). | |
batch_idrequired | string | Shared by all takes created in one request. | |
statusrequired | "queued" | "running" | "done" | "failed" | "cancelled" | ||
enginerequired | "yue2" | "heartmula" | "ace" | ||
taskrequired | "create" | "cover" | "reference" | "extend" | "repaint" | "accompany" | What the take was made with: a new song or work on a source. | |
source_refrequired | object | null | The source audio, if any. | |
stemsrequired | object | null | Separated stems after POST /generations/{id}/stems. | |
stagerequired | "transcribing" | "planning" | "generating" | "encoding" | "uploading" | null | Current stage while running. | |
titlerequired | string | ||
artistrequired | string | null | ||
languagerequired | string | null | ||
stylerequired | string | ||
cotrequired | "full" | "melody" | "off" | ||
cfg_scalerequired | number | ||
seedrequired | integer | -9007199254740991–9007199254740991 | |
max_len_srequired | integer | -9007199254740991–9007199254740991 | |
abc_samplingrequired | object | null | ||
semantic_samplingrequired | object | null | ||
progressrequired | object | null | ||
errorrequired | string | null | ||
duration_srequired | number | null | Song length in seconds (done only). | |
render_srequired | number | null | GPU time in seconds (done only). | |
audiorequired | object | null | Absolute download URLs (done only). | |
lyrics | string | ||
abc_in | string | null | ||
abc_out | string | null | The ABC score the model sang. | |
created_atrequired | integer | -9007199254740991–9007199254740991 | Unix ms. |
finished_atrequired | integer | null |
The Voice object
| Field | Type | Default · range | Description |
|---|---|---|---|
idrequired | string | Use as ace.voice. | |
namerequired | string | ||
artistrequired | string | null | ||
statusrequired | "training" | "ready" | "failed" | ||
errorrequired | string | null | ||
has_lorarequired | boolean | ||
referencerequired | boolean |
The Sampling object
| Field | Type | Default · range | Description |
|---|---|---|---|
temperature | number | 0–2 | Randomness. 0 = greedy. |
top_p | number | 0.1–1 | Nucleus sampling cut-off. |
top_k | integer | 1–500 | Only the k most likely tokens are considered. |
repetition_penalty | number | 1–3 | Penalty for tokens repeated inside the window. |
penalty_window | integer | 1–1000 | How many recent tokens the penalty looks at. |
Errors and limits
Errors are JSON {"error": "...", "issues": [...]}. Codes: 401 bad or missing key · 404 not found · 422 validation (see issues) · 429 more than 40 takes in the last hour.