curl --fail-with-body -X POST "$RAWCHUNKS_API/api/editing/extract" \
-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 song "$SONG_ID" '{
"songId": $song,
"start": 15,
"end": 30
}')"
{
"success": true,
"take": {
"id": "take-example",
"song_id": "sng-example",
"url": "https://example.com/extracted.wav",
"is_active": false
}
}
Editing
Extract a section
Slice a source interval into an inactive take.
POST
/
api
/
editing
/
extract
curl --fail-with-body -X POST "$RAWCHUNKS_API/api/editing/extract" \
-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 song "$SONG_ID" '{
"songId": $song,
"start": 15,
"end": 30
}')"
{
"success": true,
"take": {
"id": "take-example",
"song_id": "sng-example",
"url": "https://example.com/extracted.wav",
"is_active": false
}
}
This slices the selected source track. It does not separate instruments or render your current mixed arrangement.
Extract and separate.
Budget headers use six-decimal USDC atomic units. See session payments.
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
number
required
Minimum:
0.number
required
Must exceed start and fit the source. Minimum:
0.Response (201)
Success.boolean
required
object
required
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
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/extract" \
-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 song "$SONG_ID" '{
"songId": $song,
"start": 15,
"end": 30
}')"
{
"success": true,
"take": {
"id": "take-example",
"song_id": "sng-example",
"url": "https://example.com/extracted.wav",
"is_active": false
}
}
⌘I