curl --fail-with-body -X POST "$RAWCHUNKS_API/api/editing/separate" \
-H "Authorization: Bearer $SESSION_TOKEN" \
-H "x-network-id: $NETWORK" \
-H "x-session-user-address: $USER_ADDRESS" \
-H "Content-Type: application/json" \
--data "$(jq -nc --arg user "$USER_ADDRESS" --arg song "$SONG_ID" '{
"songId": $song,
"userAddress": $user,
"stemType": "all"
}')"
{
"status": "<string>",
"progress": 123,
"error": "<string>",
"take": {
"id": "<string>",
"song_id": "<string>",
"stem_id": {},
"take_number": 123,
"model": "<string>",
"task": "<string>",
"url": "<string>",
"is_active": true,
"prompt": {},
"lyrics": {},
"repainting_start": {},
"repainting_end": {},
"seed": {},
"provenance": {
"target": "<string>",
"targetStemId": {},
"region": {
"start": 123,
"end": 123
},
"regions": [
{
"start": 123,
"end": 123
}
],
"audioOffset": 123,
"outputDuration": {},
"mergedInto": "<string>",
"layerName": "<string>"
},
"created_at": "<string>"
},
"audioUrl": "<string>",
"audioUrls": [
"<string>"
],
"stems": [
{
"id": "<string>",
"song_id": "<string>",
"name": "<string>",
"url": "<string>",
"volume": 123,
"pan": 123,
"is_muted": true,
"is_solo": true,
"waveform_peaks_url": {},
"created_at": "<string>"
}
],
"versionState": "<string>",
"taskId": "<string>",
"songId": "<string>",
"task": "<string>"
}Editing
Separate stems
Separate source audio into instrument stems.
POST
/
api
/
editing
/
separate
curl --fail-with-body -X POST "$RAWCHUNKS_API/api/editing/separate" \
-H "Authorization: Bearer $SESSION_TOKEN" \
-H "x-network-id: $NETWORK" \
-H "x-session-user-address: $USER_ADDRESS" \
-H "Content-Type: application/json" \
--data "$(jq -nc --arg user "$USER_ADDRESS" --arg song "$SONG_ID" '{
"songId": $song,
"userAddress": $user,
"stemType": "all"
}')"
{
"status": "<string>",
"progress": 123,
"error": "<string>",
"take": {
"id": "<string>",
"song_id": "<string>",
"stem_id": {},
"take_number": 123,
"model": "<string>",
"task": "<string>",
"url": "<string>",
"is_active": true,
"prompt": {},
"lyrics": {},
"repainting_start": {},
"repainting_end": {},
"seed": {},
"provenance": {
"target": "<string>",
"targetStemId": {},
"region": {
"start": 123,
"end": 123
},
"regions": [
{
"start": 123,
"end": 123
}
],
"audioOffset": 123,
"outputDuration": {},
"mergedInto": "<string>",
"layerName": "<string>"
},
"created_at": "<string>"
},
"audioUrl": "<string>",
"audioUrls": [
"<string>"
],
"stems": [
{
"id": "<string>",
"song_id": "<string>",
"name": "<string>",
"url": "<string>",
"volume": 123,
"pan": 123,
"is_muted": true,
"is_solo": true,
"waveform_peaks_url": {},
"created_at": "<string>"
}
],
"versionState": "<string>",
"taskId": "<string>",
"songId": "<string>",
"task": "<string>"
}HTTP 200 can contain a pending job. Check
Budget headers use six-decimal USDC atomic units. See session payments.
status and poll with task: "extract". Ready stems start muted.
Extract and separate.
Headers and parameters
string
required
Bearer $SESSION_TOKEN. Use the complete token from your active Rawchunks session.string
required
Selected account address. Required for owner-scoped reads and writes. It identifies the account; your product must authenticate its own users.
string
Session network in CAIP-2 form, for example eip155:8453.
JSON body
string
required
Opaque ID returned by the API. Minimum length:
1.string
required
Wallet address for the selected account. Use the same address as the session owner. Minimum length:
10.string
Optional source override, for example the url from Upload source. Use an HTTP(S) URL.
string
default:"all"
Use a stem ID from GET /api/options. Omitted value is all.
Response (200)
Success.string
required
Values:
pending, processing, ready, error.number
string
object | null
Show Properties
Show Properties
string
required
string
required
string | null
integer
string
string
string
required
boolean
required
string | null
string | null
number | null
number | null
integer | null
object | null
Show Properties
Show Properties
string
Values:
master, stem, layer.string | null
object | null
object[]
number
Source-buffer offset for the eligible section, in seconds.
number | null
string
string
string
string
string[]
object[]
string
Candidate state. Initially pending; later reads can report merged or discarded. Values:
pending, merged, discarded.string
required
string
required
string
required
Values:
extract.Errors
Failed JSON responses contain anerror string. Check the HTTP status before reading a successful result. See job handling for interrupted or uncertain submissions.
| Status | Meaning |
|---|---|
400 | Invalid request. |
401 | Invalid or expired session token. |
402 | Payment required or insufficient session budget. |
403 | Account does not match resource. |
404 | Resource not found. |
409 | Resource conflict; reload state or open an editable version. |
500 | Request failed. |
curl --fail-with-body -X POST "$RAWCHUNKS_API/api/editing/separate" \
-H "Authorization: Bearer $SESSION_TOKEN" \
-H "x-network-id: $NETWORK" \
-H "x-session-user-address: $USER_ADDRESS" \
-H "Content-Type: application/json" \
--data "$(jq -nc --arg user "$USER_ADDRESS" --arg song "$SONG_ID" '{
"songId": $song,
"userAddress": $user,
"stemType": "all"
}')"
⌘I