curl --fail-with-body -X POST "$RAWCHUNKS_API/api/editing/activate" \
-H "x-session-user-address: $USER_ADDRESS" \
-H "Content-Type: application/json" \
--data "$(jq -nc --arg user "$USER_ADDRESS" --arg song "$SONG_ID" --arg take "$TAKE_ID" '{
"songId": $song,
"userAddress": $user,
"takeId": $take,
"action": "base"
}')"
{
"success": true,
"activeTakeId": "<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>"
},
"commit": {
"id": "<string>",
"song_id": "<string>",
"user_address": "<string>",
"parent_commit_id": {},
"message": "<string>",
"timeline_snapshot": {},
"created_at": "<string>"
},
"versionState": "<string>"
}Editing
Activate or merge a take
Select a take as the base or merge a candidate composition.
POST
/
api
/
editing
/
activate
curl --fail-with-body -X POST "$RAWCHUNKS_API/api/editing/activate" \
-H "x-session-user-address: $USER_ADDRESS" \
-H "Content-Type: application/json" \
--data "$(jq -nc --arg user "$USER_ADDRESS" --arg song "$SONG_ID" --arg take "$TAKE_ID" '{
"songId": $song,
"userAddress": $user,
"takeId": $take,
"action": "base"
}')"
{
"success": true,
"activeTakeId": "<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>"
},
"commit": {
"id": "<string>",
"song_id": "<string>",
"user_address": "<string>",
"parent_commit_id": {},
"message": "<string>",
"timeline_snapshot": {},
"created_at": "<string>"
},
"versionState": "<string>"
}base selects the take. A Layer candidate becomes a new unmuted stem. merge without composition merges the take’s recorded region. With composition, upload your rendered WAV and supply the latest history commitId.
Takes · Client-rendered merge.
Headers and parameters
string
required
Selected account address. Required for owner-scoped reads and writes. It identifies the account; your product must authenticate its own users.
JSON body
string
required
Opaque ID returned by the API. Minimum length:
1.string
Optional. Must match the take if supplied.
string
required
Opaque ID returned by the API. Minimum length:
1.string
Wallet address for the selected account. Use the same address as the session owner. Minimum length:
10.string
default:"base"
Values:
base, merge.object
Show Properties
Show Properties
string[]
required
object[]
object
required
boolean
required
Whether the client render includes original audio.
string | null
required
Latest commit from history, or null when no commit exists.
string
required
Uploaded client-rendered WAV for this composition.
Response (200)
Success.boolean
required
string
required
object
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
object
string
Values:
active, merged.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. |
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/activate" \
-H "x-session-user-address: $USER_ADDRESS" \
-H "Content-Type: application/json" \
--data "$(jq -nc --arg user "$USER_ADDRESS" --arg song "$SONG_ID" --arg take "$TAKE_ID" '{
"songId": $song,
"userAddress": $user,
"takeId": $take,
"action": "base"
}')"
⌘I